Deploys and releases · 10 min read
Zero-downtime deploys on one VPS with Caddy and pm2
Run two copies of a Node app on two ports, health-check the new one, then switch Caddy to it. Commands, the pm2 symlink trap, and measured failed requests.
5 articles about deploys.
Deploys and releases · 10 min read
Run two copies of a Node app on two ports, health-check the new one, then switch Caddy to it. Commands, the pm2 symlink trap, and measured failed requests.
Deploys and releases · 8 min read
Compare systemd and pm2 for one Node app on one server: the pm2 symlink trap, restart after a crash, secrets, memory limits, logs, and which we pick.
Deploys and releases · 9 min read
We sent 20 requests per second through Caddy while restarting a Go service. About one in four failed. Measure your own restart, then pick a fix that fits.
Deploys and releases · 9 min read
Socket activation let a Go service restart without refusing a connection, but slow requests waited over five seconds. Setup, code, and when to use it.
Go in production · 10 min read
Handle SIGTERM with signal.NotifyContext, drain requests with Server.Shutdown, stop workers cleanly and set TimeoutStopSec so systemd waits long enough.