openresty / lua-resty-balancer

A generic consistent hash implementation for OpenResty/Lua
322 stars 77 forks source link

Any plan to share the state of load balancing across workers? #23

Closed ElvinEfendi closed 6 years ago

ElvinEfendi commented 6 years ago

I might be mistaken but looking at the implementation seems like the state of a load balancing algorithm is per Nginx worker. This means if for example there are 4 requests hitting 4 different workers then they will all be proxied to the first upstream server.

If that is not the case then could you give some hints how the state is shared?

Thanks!

Tieske commented 6 years ago

removed: commented on the wrong repo. Sorry for the noise.

ElvinEfendi commented 6 years ago

I've realized that neither Round Robin nor Consistent Hashing requires a shared state.