---
title: "Discussion on \"Architecture Case Study: Migrating a Developer SaaS from Serverless to a $10 VPS with Docker\" | Hashnode"
description: "Discussion on \"Architecture Case Study: Migrating a Developer SaaS from Serverless to a $10 VPS with Docker\". How we eliminated cold starts, solved database connection pool exhaustion, reduced P99 latency by 92%, and stabilized infrastructure costs using Docker, Caddy, and a $10 VPS."
url: "https://hashnode.com/posts/architecture-case-study-migrating-a-developer-saas-from-serverless-to-a-10-vps-with-docker/6abf646f1308726bbb4b9cd5"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Architecture Case Study: Migrating a Developer SaaS from Serverless to a $10 VPS with Docker](https://blog.zyvop.com/architecture-case-study-migrating-a-developer-saas-from-serverless-to-a-10-vps-with-docker?utm_source=hashnode&utm_medium=feed)

How we eliminated cold starts, solved database connection pool exhaustion, reduced P99 latency by 92%, and stabilized infrastructure costs using Docker, Caddy, and a $10 VPS.

Oct 2 · 11 min read · blog.zyvop.com  
Read the article

-   [#architecture](https://hashnode.com/tag/architecture)
-   [#devops](https://hashnode.com/tag/devops)
-   [#docker](https://hashnode.com/tag/docker)
-   [#nextjs](https://hashnode.com/tag/nextjs)
-   [#performance](https://hashnode.com/tag/performance)

## Written by

[ZyVOP](https://hashnode.com/@zyvop)

@zyvop · Delhi, India

  
[View profile](https://hashnode.com/@zyvop)

The Developer Publishing Hub

One platform to write, cross-post to Dev.to, Medium, WordPress, Hashnode, and Bluesky, and protect your SEO with canonical links. Zero paywalls and full content ownership.

## Responses 2

Markdown supported · ⌘↵ to post

[Mihai\_LeanZero](https://hashnode.com/@mihaileanzero)

[Oct 2](https://hashnode.com/posts/architecture-case-study-migrating-a-developer-saas-from-serverless-to-a-10-vps-with-docker/6abf646f1308726bbb4b9cd5/comment/6abf89b3d62e6e07297c10c6)

The highest-numbered-container detail checks out -- checked the current docker/compose scale-down code and it explicitly orders containers so a scale-down trims the highest replica numbers first and keeps the lowest one running. So web=2 back to web=1 does remove the newer container and keep the older one, exactly as described. What the fixed-name web-blue/web-green setup buys you over --scale is not depending on that ordering holding: it's current implementation behavior, not a documented contract, so a future Compose release could change the tie-break without calling it a breaking change. Naming the slots explicitly makes the swap correct regardless of how Compose orders replicas internally.

[ZyVOP](https://hashnode.com/@zyvop)

[Oct 2](https://hashnode.com/posts/architecture-case-study-migrating-a-developer-saas-from-serverless-to-a-10-vps-with-docker/6abf646f1308726bbb4b9cd5/comment/6abf89b3d62e6e07297c10c6#reply-6abf8f3e535d6c1802c1766f)

Yep, exactly. `--scale` works today, but the blue/green naming avoids depending on an internal ordering detail that Compose could change later. That’s the main reason I prefer the explicit slots here. Good point.
