Hi:
I found a error:
upstream test have two servers:
upstream test{ server 192.168.46.111:80; server 192.168.46.110:80; }
if upstream use consistent_hash method, if one of upstream server is down, this method can not failover up to good server.
I guess Problem may be in the function of try_cluster_consistent_hash:
_
-- try backup node
local hash_backup_node = cls.hash_backup_node or 1
local q = (p + hash % hash_backup_node + 1) % server_len + 1
if p ~= q then
local try = cls.try or #cls.servers
res, err = base.tryserver(skey, ups, cls.servers[q], callback, args, try - 1)
if res then
return res
end
end
Hi: I found a error: upstream test have two servers:
upstream test{ server 192.168.46.111:80; server 192.168.46.110:80; }
if upstream use consistent_hash method, if one of upstream server is down, this method can not failover up to good server.
I guess Problem may be in the function of try_cluster_consistent_hash:
_
-- try backup node local hash_backup_node = cls.hash_backup_node or 1 local q = (p + hash % hash_backup_node + 1) % server_len + 1 if p ~= q then local try = cls.try or #cls.servers res, err = base.tryserver(skey, ups, cls.servers[q], callback, args, try - 1) if res then return res end end
It so?
I am anticipating your reply.