What keeps a deploy from becoming a brief outage? Potions uses blue-green slots: while one instance serves traffic, the other is built, started, and checked on a separate port. Only after the new instance passes its health check does Caddy switch traffic. The old instance then gets 15 seconds to finish in-flight requests before it stops.
The sequence also has important trade-offs. Migrations run before health checks, so they must remain compatible with the currently running code; destructive schema changes may need two deploys. Both instances briefly share server memory, and SQLite apps need specific settings to handle overlapping writes. Potions keeps each slot’s release binary on disk, making rollback a quick switch rather than a rebuild. Builds run on a dedicated server, and only one build per server can run at a time.
continue reading onpotions.io
⚠️ This post links to an external website. ⚠️
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.