[nginx] Upstream: enable hash balancing method support parameter "backup".
ru at nginx.com
Mon Sep 24 11:47:24 UTC 2018
On Mon, Sep 24, 2018 at 08:44:15AM +0000, Elza Scarlet wrote:
> Dear Development Team,
> Thanks all of you make nginx so nice to use. We have a use case, we use hash
> balancing method to increasing service's cache hit rate, but it doesn't
> support "backup" parameter, which can be use to make doing online backup
> server easier. After reading the source code, we found it's very easy to
> support "backup" parameter when using hash balancing method, so we submit
> this changes. Hope you can accept this changes.
> Kind regards, Scarlet
Generally, hash methods don't support the "backup" parameter,
but for those who need backup when falling back to round robin,
there's a work around: put the "hash" directive after the
"server" directives in the "upstream" block.
More information about the nginx-devel