We run a reverse proxy to Amazon S3 service. Sometime Amazon change their
IPs and some of them may become unresponsive and render reservse proxy
unusuable. Is there options to force nginx to re-resolve IPs of backends
lets say each 5 mins ?

Give the upstream{} block the hostnames of the instances and add an resolver ( http://nginx.org/en/docs/http/ngx_http_core_module.html#resolver ).

Optionally add valid=5m; if the TTL of the domain is not optimal.


p.s. for the nginx to be more responsive you can also tweak the connect timeouts like proxy_connect_timeout ( http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_connect_timeout ) as the default is quite high - 60 seconds.

rr


_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to