Upstream fail over?

merlin corey merlincorey at dc949.org
Fri Jun 26 13:33:01 MSD 2009


Hello,

Yes, very easily with 0.7.x and above.  It would be something like
below ( check http://wiki.nginx.org/NginxHttpCoreModule#try_files )

location / {
  try_files @varnish @application;
}

location @varnish {
  // proxy to varnish
}

location @application {
  // proxy to application
}

-- Merlin


On Tue, Jun 23, 2009 at 7:48 AM, MortenP<nginx-forum at nginx.us> wrote:
> Hi,
>
> Is it possible to have nginx proxy to upstream_a and if that fails then default to upstream_b?
>
> What I would like to accomplish is to have a Varnish upstream, and if that's down, then nginx should just proxy to the application backend directly.
>
> Thanks.
>
> Morten
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,3296,3296#msg-3296
>
>
>





More information about the nginx mailing list