← All work

DynamoDB → MongoDB, live product

Zero-Downtime Database Migration

Migrated a live, in-use product from DynamoDB to MongoDB with zero downtime and no data loss — plus moved infra to serverless Container Apps codified in Terraform.

Problem

The platform had outgrown its early DynamoDB data model, but it was actively serving users. A migration couldn't mean downtime or data loss.

Approach

Led a zero-downtime production migration from DynamoDB to MongoDB while the product kept serving traffic. Also migrated platform infrastructure from Azure App Services to serverless Container Apps and codified the full stack in Terraform — modernizing deployment while preserving feature parity.

Impact
  • Zero downtime and no data loss on a live, in-use product
  • Infrastructure codified in Terraform for repeatable, reviewable deploys
  • Improved scalability with no loss of feature coverage

The constraint that shaped everything

The product was live. People were using it while I migrated the database underneath them. That single constraint ruled out the easy path — you can’t take a maintenance window and copy everything over. The migration had to happen while reads and writes kept flowing.

The approach

Dual-write during the transition so new data landed in both stores, backfill the history in the background, then cut reads over once the new store was verified consistent — with the old store still there as a fallback until I was confident. No flag day, no held breath.

The result: zero downtime, no data loss, on a product that never stopped serving users.

Infra in the same motion

Alongside the data migration I moved the platform off Azure App Services onto serverless Container Apps and codified the whole stack in Terraform. Deployments went from click-ops to reviewable, repeatable infrastructure-as-code — with feature parity preserved throughout.

← Back to all work