Skip to content
Back to blog
Infrastructure··13 min read

How a 12-container B2B SaaS cut a $14k/mo public-cloud bill to $2,400/mo over one Saturday

Repatriation is supposed to be slow and painful. It doesn't have to be. Here's the Saturday-night cutover, the dry-runs that made it boring, and every dollar of the TCO breakdown — published with permission.

By Ultiblob Engineering ·
Server racks in a private datacenter cold aisle, cable management visible

The customer is a Series B B2B SaaS — anonymized while their reference release is in legal review. Their architecture is unspectacular and common: twelve containers across three services, a sharded Postgres pair, a self-managed Elasticsearch cluster, ~12 TB object storage, a global CDN, and the usual perimeter of NAT-gateway, DNS, threat detection, and CloudWatch-style logging. Their public-cloud bill, after twelve months of optimization work, was $14,000 per month. Their target was $2,400 per month on Ultiblob — a 83% reduction without compromising performance.

The bill breakdown was the cleanest TCO conversation we've had with a customer. Compute (with reserved-instance discounts) was $4,200. Managed databases were $2,800. NAT gateway plus inter-AZ data transfer was $1,900. Object storage and lifecycle was $1,600. Logging and threat-detection was $1,400. The managed inference service was $1,100. The remainder — $1,000 — was the long tail of small services. The interesting line is what wasn't a real product cost: roughly $5,000 of the bill was overhead, the price of sharing infrastructure with everyone else and paying for the abstractions that share-ability requires.

Our proposal: Ultiblob Pro tier compute × 3, sharded by service. Managed Postgres on the same tier. Self-managed Elasticsearch (already self-managed in public cloud — no change). Object storage on our managed Pure tier. Managed AI integration with prompt caching. All-in: $2,400/mo, with egress included to tier cap. The savings were structural, not magical. Removing shared-tenancy overhead removed about 35% of the bill. Eliminating egress and NAT-gateway charges removed another 20%. Replacing managed-service surcharges with operated-but-not-marked-up services removed the rest.

The work happened in three windows. Two dry-runs and one production cutover. The first dry-run was on a Tuesday: we provisioned the entire Ultiblob target environment, restored last night's Postgres snapshot, restored the object-storage bucket, deployed all containers, and ran the customer's automated end-to-end test suite. Three failures, all caused by hardcoded public-cloud-region hostnames that nobody had grep'd for. We fixed them and re-ran. Green. Tore the environment back down.

Second dry-run on a Friday: same playbook, but this time we kept the environment running for 48 hours under a shadow-traffic mirror — 10% of read-only production queries replayed against the new environment, with response comparison. Two latency cliffs surfaced. Both turned out to be RAM sizing on the database pair; we sized up and re-ran. P99 latency on the new environment was actually lower than on public cloud — about 18% lower on the hot read path, which we credit to dedicated tenancy on NVMe.

The production cutover ran on a Saturday night between 11pm and 4am. Database cutover was the critical path: PostgreSQL logical replication had been streaming to Ultiblob for 6 days; at 11:40pm we paused writes, drained the queue, and flipped the DNS. Traffic was on Ultiblob at 11:53pm. Public-cloud resources kept running in read-only mode for 72 hours as the rollback path, then were torn down. Total downtime: 14 minutes — exactly the failover window we'd predicted.

What didn't go wrong is worth saying out loud: no data loss, no certificate issues, no surprise egress bill on the way out, no customer-visible incident. The reason wasn't luck. The reason was that the two dry-runs had cost the customer more engineering time than the cutover itself, and that was the trade we proposed up front. Repatriation isn't risky when the dry-runs find the real risks early.

Six months in, the customer is at $2,420/mo (the marginal change is just storage growth). The two engineers they'd dedicated to public-cloud cost-management are doing product work. Their on-call quarter-over-quarter is quieter because dedicated tenancy means fewer noisy-neighbor incidents. Their first-year cumulative savings (versus their previous trajectory of bill growth) is $186,000.

If you want us to run this same analysis on your bill, the offer stands: send the last three months under NDA, we return a line-by-line proposal within one business day. The math is more honest than most pitches because we don't have a reason to inflate it — every repatriation we win is a referenceable customer for the next one.

#repatriation#tco#migration#private-cloud
From idea to live

Want this for your team?

Get an estimate in 30 seconds, or book a 15-minute scoping call. We typically respond same-day.