Welcome! Log In Create A New Profile

Advanced

Re: Error handling of "Connection refused" conditions

Reinis Rozitis
June 20, 2012 05:00PM
> Is it considered good practice to reduce proxy_connect_timeout to some
> small value if responsiveness during an outage is desired?

It depends on the nature of the (backend) software and the network
infrastucture/latency - the closer the servers (network-wise) and the
higher throughput of the application the lower you can/should set it.

There is also a general observation/standard or apdex (Application
Performance Index) that average web-user starts to become "unsatisfied" if
the request takes more than 1-2 seconds so using the default 60 seconds (in
case of some backend failure) to deliver the content makes no sense - the
user will sooner hit refresh / just close the browsers (go to another site)
or fall in panic than wait for anything to load.


On the other hand making nginx immideatly close and switch to another
backend isnt always the (best) solution - especially if the backends do some
long running computations and/or accept only limited number of connections.
This way quickly cycling through all backends won't serve a good response at
all what matters if you have an extra caching layer above (to fetch a valid
object (html/image etc)) or some sort of transactions (like payment systems)
which just take time and each request is important.


I usually set it to 2-3 seconds.
That way I can also indicate if the backends perform well enough and react
if a new bottleneck arises - the application code, underlaying
DBs/filesystems start to get too slow.


rr

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Error handling of "Connection refused" conditions

Dustin Wenz June 20, 2012 01:28PM

Re: Error handling of "Connection refused" conditions

Reinis Rozitis June 20, 2012 03:06PM

Re: Error handling of "Connection refused" conditions

Dustin Wenz June 20, 2012 03:42PM

Re: Error handling of "Connection refused" conditions

Reinis Rozitis June 20, 2012 05:00PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 191
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready