Skip to content

Instantly share code, notes, and snippets.

@agibralter
Created December 26, 2011 04:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agibralter/1520537 to your computer and use it in GitHub Desktop.
Save agibralter/1520537 to your computer and use it in GitHub Desktop.
# haproxy => [a few app servers]
# more specifically:
# haproxy => [nginx => unicorn (502 when busy)]
# Will this try a second app server when the first returns 502?
upstream haproxy {
server 127.0.0.1:85;
server 127.0.0.1:85 backup;
}
server {
proxy_pass http://haproxy;
proxy_next_upstream http_502;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment