What's New

New updates and improvements to Hatchbox.io

← Back

Socket Activation

Improvement
You can now enable socket activation for processes like Puma.

Why is this important? When HTTP requests hit a server, Caddy will forward the request along to your web server like Puma. Puma is listening on socket and that's how Caddy talks to Puma. During a restart, Puma will stop listening to the socket for a short period of time. Caddy will not receive a response from Puma and will render a 500 error.

With Socket Activation, Systemd will keep the socket open and buffer requests while Puma restarts. During a restart, no requests will be dropped and will simply pause until Puma is ready to start handling requests again.