How to send a REST request to another node if the service on the current node is not available?

Maxim Dounin mdounin at
Mon Jun 1 13:42:08 UTC 2015


On Mon, Jun 01, 2015 at 02:25:49AM -0400, Lu, Boying wrote:

> Hi, All,
> We setup a cluster of three nodes and running ngix on each node 
> to load balance.
> I found that if a REST service is unavailable on current node, 
> the corresponding REST request sending to this node
> will return the service unavailable response to the client.  Is 
> there a way (e.g. configuration parameter) to let ngix service 
> running in this node
> to redirect the REST request to another node automatically in 
> this case?

Depending on your configuration, you may consider using one or 
more of the following mechanisms:

- error_page, see
- proxy_next_upstream, see
- backup servers in an upstream blocks, see

Maxim Dounin

More information about the nginx mailing list