Engineering
Zero-Downtime Deployments: How We Keep CoDuck Always Online
CoDuck Team·January 20, 2026·6 min read
The Requirement
CoDuck users are building applications in real-time through conversation. An AI generation can take 30-60 seconds. If we restart the server during a generation, the user loses their work.
The Solution: PM2 Cluster Mode
We run our API server in PM2 cluster mode with 2 instances. When we deploy a new version, PM2 performs a rolling restart.
The Result
We deploy multiple times per day with zero user-facing downtime.