You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func NewProducer(beanstalks []Beanstalk) Producer {
if len(beanstalks) < minWrittenNodes {
log.Fatalf("nodes must be equal or greater than %d", minWrittenNodes)
}
var nodes []Producer
producers := make(map[string]lang.PlaceholderType)
for _, node := range beanstalks {
if _, ok := producers[node.Endpoint]; ok {
log.Fatal("all node endpoints must be different")
}
producers[node.Endpoint] = lang.Placeholder
nodes = append(nodes, NewProducerNode(node.Endpoint, node.Tube))
}
return &producerCluster{nodes: nodes}
}
NewProducer 方法里面要求 Endpoint 必须大于 2 且 Endpoints 必须是多个不同的实例,那是不是需要一个 beanstalkd 集群呢?
看了一下,好像没有 beanstalkd 集群部署方式? 都是多个 beanstalkd 实例,那假如某个 beanstalkd 实例宕机了,数据不就丢失了吗
The text was updated successfully, but these errors were encountered: