Microsoft Certified: Azure Solutions Architect ExpertDesign data storage solutionsMedium
A small startup is developing a new mobile application that aggregates user-generated content, including short text posts, images, and user profiles. The application needs a flexible database schema to accommodate evolving data models and support high-volume reads and writes with low latency. Data consistency can be eventual, but high availability is critical. Which Azure data storage solution should the startup choose?
- AAzure Managed Instance for Apache Cassandra
- BAzure Database for PostgreSQL
- CAzure Cosmos DB (MongoDB API)
- DAzure SQL Database
Show answer & explanationAnswer & explanation
Correct answer: C. Azure Cosmos DB (MongoDB API)
Azure Cosmos DB with the MongoDB API offers a flexible schema, high availability, and the ability to scale for high-volume reads and writes with low latency. Its support for eventual consistency is suitable for user-generated content where strict transactional consistency is not always paramount.
Why the other options are wrong
- A. Azure Managed Instance for Apache Cassandra is a good choice for Cassandra workloads, but the MongoDB API provides broader ecosystem support for document databases, which is often preferred for user-generated content.
- B. Azure Database for PostgreSQL is also a relational database with a fixed schema and might not provide the flexible scalability and global distribution of Cosmos DB for this use case.
- D. Azure SQL Database is a relational database with a rigid schema, which is not ideal for evolving data models often found in user-generated content applications.
Azure Cosmos DB (MongoDB API)
Azure Cosmos DB's MongoDB API allows developers to use their existing MongoDB tools, drivers, and applications to interact with Cosmos DB. It provides the benefits of Cosmos DB's global distribution, high availability, and scalability while maintaining compatibility with the MongoDB wire protocol.
- Compatibility with MongoDB tools and drivers
- Flexible schema (document database)
- Globally distributed with high availability
- Scalable throughput and low latency
- Supports various consistency models, including eventual
Memory trick: MongoDB API for Cosmos DB, flexible content storage.