# Backup servers/ proxy\_next\_upstream questions

**URL:** <https://www.ruby-forum.com/t/backup-servers-proxy-next-upstream-questions/222707>\
**Category:** NGINX\
**Created:** [September 6, 2012, 8:22pm UTC](https://www.ruby-forum.com/t/backup-servers-proxy-next-upstream-questions/222707 "2012-09-06T20:22:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [September 6, 2012, 8:22pm UTC](https://www.ruby-forum.com/t/backup-servers-proxy-next-upstream-questions/222707/1 "2012-09-06T20:22:36Z")

</div>

Hello All,  
I have a few questions on backup servers and proxy\_next\_upstream in  
general:

For the backup server the doc says: “only uses this server if the  
non-backup servers are all down or busy”

1. So what exactly constitutes down or busy? Is it just response codes

- 502,503 and 504 or anything else?

1. Will the same request which received such an error be sent to a  
backup server or is it only subsequent requests?

2. Can I say 504s happen when proxy\_connect\_timeout/proxy\_read\_timeout  
is reached? Is there a way to find out which among these is happening?

3. Also, In proxy\_next\_upstream :

error an error has occurred while connecting to the server, sending  
a request to it, or reading its response;  
timeout occurred timeout during the connection with the server,  
transfer the request or while reading response from the server;

I’m not able to clearly distinguish between both of these. What kind  
of scenarios explain these?

1. In a case when proxy\_next\_upstream is off and when a backup server  
is provided, will nginx still try all non-backup servers before  
sending it to backup servers?

Thanks  
Harish
