revactor: fix graceful shutdown timeouts
[rainbows.git] / TUNING
blob9f5f58ddf573fcee384e5e67bd0ac1c385325f56
1 = Tuning \Rainbows!
3 Most of the {tuning notes}[http://unicorn.bogomips.org/TUNING.html]
4 apply to \Rainbows! as well.  \Rainbows! is not particularly optimized
5 at the moment and is designed for applications that spend large amounts
6 of the time waiting on network activity.  Thus memory usage and memory
7 bandwidth for keeping connections open are often limiting factors as
8 well.
10 == \Rainbows! configuration
12 * Don't set +worker_connections+ too high.  It is often better to start
13   denying requests and only serve the clients you can than to be
14   completely bogged down and be unusable for everybody.
16 * Increase +worker_processes+ if you have resources (RAM/DB connections)
17   available.  Additional worker processes can better utilize SMP, are more
18   robust against crashes and are more likely to be fairly scheduled by
19   the kernel.
21 == nginx configuration
23 If you intend to use nginx as a reverse-proxy in front of \Rainbows!  to
24 handle Comet applications, make sure you disable proxy response
25 buffering in nginx:
27   proxy_buffering off;
29 This can be disabled on a per-backend basis in nginx, so under no
30 circumstances should you disable response buffering to Unicorn
31 backends, only to \Rainbows! backends.