A startup is developing a new social media application. User profiles will contain basic information (username, email, registration date) along with a dynamic list of interests and connections. The application anticipates rapid user growth and requires a database that can handle high read/write throughput, scale globally, and adapt to evolving data structures without complex schema migrations. Consistency can be eventual for some data. Cost-effectiveness for a startup is also a consideration. Which Azure data storage solution should be selected?
- AAzure Table Storage
- BAzure Cosmos DB (MongoDB API)
- CAzure Database for MySQL
- DAzure SQL Database
Show answer & explanationAnswer & explanation
Correct answer: B. Azure Cosmos DB (MongoDB API)
Azure Cosmos DB, especially with its MongoDB API, offers the flexibility of a document database, allowing for dynamic and evolving data structures like user profiles with varying interests and connections. It provides high throughput, global distribution, and elastic scalability, which are crucial for a rapidly growing social media app, while offering cost-effectiveness through consumption-based pricing.
Why the other options are wrong
- A. Azure Table Storage is a key-value store, suitable for simpler scenarios but lacks the rich querying capabilities and document model flexibility needed for complex user profiles.
- C. Azure Database for MySQL is a relational database and shares the same limitations as Azure SQL Database regarding schema flexibility and global scaling for this type of application.
- D. Azure SQL Database is relational and would require complex schema management for evolving user profiles, and scaling globally for high throughput can be more complex and costly.
Azure Cosmos DB (MongoDB API)
A globally distributed, multi-model database service that allows applications to interact with data using the MongoDB API. It combines the benefits of Cosmos DB (global distribution, high throughput, low latency) with the familiarity of MongoDB's document model.
- Leverages MongoDB's document data model for flexible schemas
- Globally distributed with multi-region write capabilities
- Guaranteed single-digit millisecond latency at any scale
- Elastic scalability allows for rapid growth
Memory trick: Cosmos DB is the universal key for your flexible, global data.