Behavior between upstream hash and backup
simowitz at google.com
Thu Jan 12 15:03:47 UTC 2017
Thank you Maxim; that is exactly the detailed response I was looking for.
If possible I would recommend updating the docs to clarify this for others.
On Thu, Jan 12, 2017 at 9:44 AM, Maxim Dounin <mdounin at mdounin.ru> wrote:
> On Wed, Jan 11, 2017 at 04:27:51PM -0500, Jonathan Simowitz via nginx
> > Hello,
> > I would like to define an upstream block with a number of servers and
> > utilize the hash directive to choose a particular server dependent on the
> > request. There is a chance that the chosen server could fail and so I
> > also like to configure a backup server to handle the request in this
> If there are more than one server in the upstream block, the
> default behaviour is to try another server if a choosen one fails,
> see http://nginx.org/r/proxy_next_upstream. The exact algorithm
> to select "another server" varies depending on the balancing
> algorithm used - e.g., in case of "hash .. consistent" it means
> selecting the next point in the continuum, like if the failed
> server was removed from the list.
> > If I define an additional server in this upstream and declare it as
> > will it handle the request if the hash-chosen server fails as defined by
> > proxy_next_upstream directive?
> No, backup servers are not supported by the hash balancer.
> Maxim Dounin
Jonathan Simowitz | Jigsaw | Software Engineer | simowitz at google.com |
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nginx