[Glass] nginx least_conn

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Glass] nginx least_conn

otto
Hi,

If you are using nginx and have some load on your machine, setting
least_conn in your upstream section may improve your site's
responsiveness.

The particular case where it improves things for us is where we have
some requests that have been taking longer, for example reports. Yes,
we should optimise requests that take long and perhaps spawn bigger
reports in the background.

What happens with the default round robin load balancing is that the
unlucky request gets routed to the session that's busy with a request
that takes longer. Given that Seaside works with a callback and
rendering phase (2 requests), we found that with multiple users the
responsiveness of the site degrades quickly to the time it takes to
serve the longer requests.

This least_conn setting routes more requests to sessions that are not busy.

Hope this helps.
Otto
_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass