upyun / lua-resty-checkups

Manage Nginx upstreams in pure Lua.
259 stars 65 forks source link

Request distributed Uneven with consistent_hash method #9

Open xiaoxuanzi opened 7 years ago

xiaoxuanzi commented 7 years ago

I did a test found Request distributed Uneven with consistent_hash method. upstream test have two servers: upstream test{ server 192.168.46.111:80; server 192.168.46.110:80; }

hash arguments is cid. I use 10w cid to test. I found that the request deliver to server 192.168.46.111:80 is about 89036 . More than eighty percent

BUT i also test original nginx with consistent method,the number of request forward to two server is equality.

DO YOU encounter the same problem? OR What is wrong with me?

yejingx commented 7 years ago

Can you share your 10w cid?We will check if there is something wrong.

hy05190134 commented 6 years ago

@xiaoxuanzi why consistent method come to equal for requests