Using round robin for load balancing if hash key is empty

Vladimir Homutov vl at
Thu May 23 15:21:27 UTC 2019

On Wed, May 22, 2019 at 09:59:46PM +0200, Niklas Keller wrote:
> Hey,
> I'd like to propose falling back to round robin if the hash key is
> empty. This allows using hashed cookie values for sticky sessions
> while using round robin for all requests that do not carry any session
> information and thus do not need the stickiness. While Nginx Plus
> allows to use the learning mode, this patch avoids the need for
> synchronization between multiple instances.

Can you please elaborate on balancing/sticky scheme you are using?

Say, first request without cookie is balanced by round-robin, arrives
at some backend, which responds with cookie.
Next time, the request with cookie is balanced by hash algorithm,
and the result can be easily another backend. How do you deal with this?

More information about the nginx-devel mailing list