Considerations
Although it is often possible to improve the responsiveness of your servers and services you should make sure you regularly test your server under load to ensure it continues to function as you expect.
In most of the recipes we have posted we've listed suggested values for settings
such as max_connections
. These are just guidelines that work well on reasonably powered servers.
You might find that because a single connection requires, for example, 10Mb of RAM, you can only sustain 500 of these at the same time before your system is out of resources.
You need to find this limit for yourself, and adjust accordingly.
Mitigating Service Failures
Even if things are working well it is helpful to install some kind of process monitoring upon your servers.
These will catch the case when your servers exit unexpectedly and quickly restart them.
There are many tools you can consider using such as monit
, or runit
,
each suited to a different kind of control:
- Restarting services when they fail.
- Restarting services which have exited.