When to use a MySQL socket and when to use a host:port?

Well, it’s simple. Socket is a file based communication, and you can’t access the socket from another machine. On the other hand, ports are open to the world (depends on configuration) and you can access the mysql from other machine using host+port combination. Also, as much I understand sockets, they are just combination of host+port, … Read more

Need to increase nginx throughput to an upstream unix socket — linux kernel tuning?

It sounds like the bottleneck is the app powering the socket rather than it being Nginx itself. We see this a lot with PHP when used with sockets versus a TCP/IP connection. In our case, PHP bottlenecks much earlier than Nginx ever would though. Have you checked over the sysctl.conf connection tracking limit, socket backlog … Read more

How to automatically restart a service on failure in Linux

monit is a great way to monitor and restart services when they fail–and you’ll probably end up using this for other essential services (such as Apache). There’s a nice article on nixCraft detailing how to use this for services specifically, although monit itself has many more functions beyond this. As for the socket aspect, @galraen … Read more