Server won't start AND Nginx as reverse proxy
Reinis Rozitis
r at roze.lv
Thu Jan 24 17:28:03 UTC 2013
> 2- Nginx does not reverse proxy new incoming requests to one of the other
> Swazoo web servers and the site appears to be 'hanging'. Any help on this?
The default proxy module timeouts are pretty high (like 60s)
http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_connect_timeout
http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_read_timeout
.. so naturally if the backend doesnt respond in timely matter it can take
up to a minute for nginx to decide what to do next.
I would also rather than using (with dns resolve):
location / {
proxy_pass https://some.site.com;
}
choose the upstream module (
http://nginx.org/en/docs/http/ngx_http_upstream_module.html ) and define all
the backends in the upstream {} block:
upstream someservers {
server your.backend1.ip:80;
server your.backend2.ip:80;
server your.backend2.ip:80;
}
location / {
proxy_pass http://someservers;
}
rr
More information about the nginx
mailing list