You run a Node.js app that uses the official MongoDB driver against MongoDB Atlas. You plan to move to Azure while keeping code changes minimal and minimizing downtime during migration. What should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: Create an Azure Cosmos DB for MongoDB account and update the application’s connection string to point to the Cosmos DB for MongoDB endpoint; continue using the MongoDB driver., Use Azure Database Migration Service (DMS) to perform an online migration from MongoDB Atlas to Azure Cosmos DB for MongoDB..
Why this is the answer
The two correct options provide the most efficient and least disruptive migration path. Azure Cosmos DB for MongoDB is API-compatible with MongoDB, allowing you to use your existing Node.js application and official MongoDB driver with minimal code changes—primarily updating the connection string. This directly addresses the requirement for minimal code changes. Azure Database Migration Service (DMS) is designed for online migrations of databases, including MongoDB, to Azure Cosmos DB. This tool helps minimize downtime during the data transfer process, fulfilling the requirement for minimal downtime. Rewriting the application to use the Azure Cosmos DB SQL API SDK would involve significant code changes, violating the "minimal code changes" requirement. Using mongodump/mongorestore to migrate data into an Azure Cosmos DB SQL API account would also require rewriting the application, as the SQL API is not compatible with the MongoDB driver.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed