> Markdown version of [/videos/100673-migrating-47-tb-in-under-48-hours-lessons-from-the-front-lines](https://www.wearedevelopers.com/videos/100673-migrating-47-tb-in-under-48-hours-lessons-from-the-front-lines). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # Migrating 47 TB in Under 48 Hours: Lessons from the Front Lines How do you migrate 47 terabytes of production data from MongoDB to Azure DocumentDB in under 48 hours? Defer indexing, consolidate your shards, and cut operational costs by 40 percent. - **Speakers:** [Sandeep S. Nair](https://www.wearedevelopers.com/@sandeep-s-nair) - **Event:** Conference India 2026 - **Published:** November 26, 2026 - **Duration:** 30:34 - **URL:** https://www.wearedevelopers.com/videos/100673-migrating-47-tb-in-under-48-hours-lessons-from-the-front-lines - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/90060d564b0b7adc0f424f840ad341e2/thumbnails/thumbnail.jpg?time=30000ms ## Summary Migrating massive production workloads—like 47 TB of data in under 48 hours—requires shifting focus from the data transfer itself to rigorous upfront planning. Sandeep S. Nair outlines how organizations transition from self-managed MongoDB or MongoDB Atlas to Azure DocumentDB, an open-source, PostgreSQL-backed PaaS offering with a MongoDB wire protocol gateway that reduces operational costs by up to 40%. Successful execution begins with stakeholder alignment and automated discovery using a VS Code assessment extension. This tool evaluates command compatibility, oplog sizing for online replication, and collection dependencies. Because Azure DocumentDB supports 32 TB disks compared to MongoDB's 4 TB limit, teams should avoid copying source topologies directly; instead, they can consolidate shards while keeping lookup-dependent collections co-located. To maximize throughput during the migration phase, Nair advises filtering out obsolete data and deferring resource-heavy tasks like indexing, high availability (HA), and replication until after the bulk transfer. Splitting the workload into multiple parallel jobs allows teams to throttle or pause transfers if CPU, RAM, or network telemetry indicates bottlenecks. Finally, before executing the irreversible cutover during off-peak hours, teams must halt source writes to drain the replication lag and validate data consistency using document counts and automated random hash sampling. **Keywords:** azure documentdb, large-scale database migration, mongodb to azure migration, online database migration, database cutover strategy, mongodb wire protocol, postgresql engine, database sharding topology, oplog sizing, vs code migration assessment, data consistency validation, random hash sampling, parallel migration jobs, collection lookup dependencies, database PaaS ROI, cloud database modernization ## Chapters 1. **Overview of Azure DocumentDB and open-source hosting options** (00:03) — Managing self-hosted databases creates operational overhead, which Azure DocumentDB solves by offering a fully managed, MongoDB-compatible PaaS and an open-source Kubernetes option. 1. **Aligning cross-functional teams for database migration planning** (04:00) — Unaligned teams can delay migrations at the final stage, so involving application, data, infrastructure, and security stakeholders upfront ensures clear accountability. 1. **Assessing source clusters with VS Code and Postgres architecture** (06:22) — Because Azure DocumentDB uses a MongoWire protocol gateway over a Postgres engine, running a VS Code assessment is necessary to identify unsupported commands and compression differences. 1. **Evaluating oplog windows and redesigning target sharding topologies** (09:42) — Small oplog windows and cross-node lookups can break or slow down online migrations, requiring teams to size oplogs properly and co-locate dependent collections on 32 TB disks. 1. **Running iterative trial migrations to optimize target configurations** (12:15) — Directly copying source topology to the target fails to account for network and hardware differences, making iterative trial migrations essential for extrapolating transfer speeds. 1. **Configuring online sync, high availability, and parallel migration jobs** (14:02) — Maximizing write speeds without choking network resources requires deferring indexing and high availability setups until post-migration while dividing transfers into controllable parallel jobs. 1. **Validating data consistency with document counts and hash sampling** (19:33) — Document counts miss in-place updates during validation, so teams must combine automated random hash sampling with index verification before executing the final stakeholder cutover. 1. **Evaluating cloud migration ROI and resolving collection lookup dependencies** (23:37) — To maximize cloud ROI and prevent slow cross-shard queries, profile logs are analyzed to build relationship graphs that group dependent collections onto the same target shard. 1. **Managing replication lag and write downtime during online cutover** (26:42) — Continuous writes prevent absolute synchronization during online migrations, requiring a brief write downtime during off-peak hours to drain the replication lag and finalize hash comparisons. ## Related Moments - [Audience questions on database performance, deployments, and data migrations](https://www.wearedevelopers.com/videos/254-tomorrow-s-cloud-data-platforms-fully-managed-database-as-a-service-dbaas) (from "Tomorrow's cloud data platforms - fully managed database-as-a-service (DBaaS)") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/8163eda5b211542ba480c2761eab74ee/thumbnails/thumbnail.jpg?time=45685ms - [Migrating existing applications from MongoDB to Postgres](https://www.wearedevelopers.com/videos/1042-postgres-in-the-age-of-ai-and-devin) (from "Postgres in the Age of AI (and Devin)") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/2d605fbb7484979764fa3d653bc08a5c/thumbnails/thumbnail.jpg?time=150875ms - [Assessing databases with the Cosmos DB migration tool](https://www.wearedevelopers.com/videos/450-developer-tools-for-microsoft-azure) (from "Developer Tools for Microsoft Azure") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/642b193c16406f6b75418b27bd5faca6/thumbnails/thumbnail.jpg?time=14600ms - [Executing massive cloud network migrations while maintaining live systems](https://www.wearedevelopers.com/videos/100128-the-golden-age-of-email-owning-the-inbox-in-the-age-of-ai) (from "The Golden Age of Email: Owning the Inbox in the Age of AI") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/70935784deb62adbe0d0144696958b7d/thumbnails/thumbnail.jpg?time=43830ms - [Container migration and operational complexity challenges](https://www.wearedevelopers.com/videos/812-building-reliable-serverless-applications-with-aws-cdk-and-testing) (from "Building Reliable Serverless Applications with AWS CDK and Testing") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/14b966842417295364174b443c117c9b/thumbnails/thumbnail.jpg?time=32905ms - [Migrating millions of user accounts at scale without downtime](https://www.wearedevelopers.com/videos/746-swapping-low-latency-data-storage-under-high-load) (from "Swapping Low Latency Data Storage Under High Load") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/14898b9f3d06f85b0fc31597d639ce5c/thumbnails/thumbnail.jpg?time=143620ms ## Related Articles - [What Are The Top Skills Required For Azure Developers?](https://www.wearedevelopers.com/magazine/77-what-are-the-top-skills-required-for-azure-developers) - [Making Data Warehouses Fast: A Developer’s Story](https://www.wearedevelopers.com/magazine/107-making-data-warehouses-fast-a-developer-s-story) - [A Tour of the PostgreSQL Analytics Ecosystem](https://www.wearedevelopers.com/magazine/792-a-tour-of-the-postgresql-analytics-ecosystem) - [MLops – Deploying, Maintaining And Evolving Machine Learning Models in Production](https://www.wearedevelopers.com/magazine/115-mlops-deploying-maintaining-and-evolving-machine-learning-models-in-production) ## Related Jobs - [Software Development Engineer 4 - Database Engineer](https://www.wearedevelopers.com/jobs/48591-software-development-engineer-4-database-engineer) at **WEX** - [Staff Systems Engineer, Database Infrastructure](https://www.wearedevelopers.com/jobs/ext/4580910-staff-systems-engineer-database-infrastructure) at **GitHub** - [SAP Tech Arch S/4HANA Migration-Manager](https://www.wearedevelopers.com/jobs/ext/4547103-sap-tech-arch-s-4hana-migration-manager) at **PwC** - [Senior Data & AI Architect](https://www.wearedevelopers.com/jobs/48602-senior-data-ai-architect) at **reeeliance IM GmbH** - [Senior Software Engineer - Semantic Data Lake (Open)SDE3](https://www.wearedevelopers.com/jobs/48597-senior-software-engineer-semantic-data-lake-open-sde3) at **WEX** - [Bank Platform Transformation - Data Migration-Conversion Lead - Manager](https://www.wearedevelopers.com/jobs/ext/4549643-bank-platform-transformation-data-migration-conversion-lead-manager) at **PwC**