Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Recall & Review
beginner
What is Azure Cosmos DB?
Azure Cosmos DB is a globally distributed, multi-model database service designed to provide low latency and high availability for applications worldwide.
Click to reveal answer
beginner
Name two key features of Cosmos DB.
1. Global distribution with multi-region writes. 2. Multiple data models like document, key-value, graph, and column-family.
Click to reveal answer
intermediate
Why is Cosmos DB suitable for real-time applications?
Because it offers low latency reads and writes with guaranteed single-digit millisecond response times, making it ideal for real-time user experiences.
Click to reveal answer
beginner
What does 'multi-model' mean in Cosmos DB?
It means Cosmos DB supports different types of data models such as document, key-value, graph, and column-family within the same service.
Click to reveal answer
intermediate
List three common use cases for Cosmos DB.
1. IoT data ingestion and processing. 2. Personalized recommendations in e-commerce. 3. Real-time analytics and telemetry.
Click to reveal answer
What kind of data models does Cosmos DB support?
ABlock storage only
BRelational only
CFile storage only
DDocument, key-value, graph, column-family
✗ Incorrect
Cosmos DB supports multiple data models including document, key-value, graph, and column-family.
Which feature of Cosmos DB helps it serve users globally with low latency?
AGlobal distribution with multi-region writes
BSingle region deployment
CManual data replication
DBatch processing only
✗ Incorrect
Global distribution with multi-region writes allows Cosmos DB to serve users worldwide with low latency.
What is a common use case for Cosmos DB?
AReal-time telemetry data processing
BStatic website hosting
CVideo streaming service only
DEmail server
✗ Incorrect
Cosmos DB is often used for real-time telemetry data processing due to its low latency and scalability.
Which of these is NOT a feature of Cosmos DB?
AMulti-model database support
BGuaranteed single-digit millisecond latency
CSupports SQL Server stored procedures
DAutomatic and global distribution
✗ Incorrect
Cosmos DB does not support SQL Server stored procedures; it uses its own APIs and stored procedures.
How does Cosmos DB ensure high availability?
ABy manual backups only
BBy replicating data across multiple regions
CBy storing data on a single server
DBy limiting user access
✗ Incorrect
Cosmos DB replicates data across multiple regions to ensure high availability and durability.
Explain what Azure Cosmos DB is and why it is useful for global applications.
Think about how apps need fast and reliable data access everywhere.
You got /4 concepts.
Describe three common scenarios where Cosmos DB would be a good choice.
Consider applications that need fast, scalable, and flexible data storage.
You got /3 concepts.
Practice
(1/5)
1. What is the main benefit of using Azure Cosmos DB for global applications?
easy
A. It provides low latency and high availability worldwide.
B. It only supports SQL queries.
C. It requires manual scaling of resources.
D. It is designed for local, single-region apps only.
Solution
Step 1: Understand Cosmos DB's global distribution
Cosmos DB is designed to replicate data across multiple regions to provide fast access and high availability.
Step 2: Identify the benefit for global apps
This replication ensures low latency and continuous availability for users worldwide.
Final Answer:
It provides low latency and high availability worldwide. -> Option A
Quick Check:
Global apps need low latency and high availability = A [OK]
Hint: Global apps need fast, reliable data access worldwide [OK]
Common Mistakes:
Thinking Cosmos DB only supports SQL
Assuming manual scaling is required
Believing it's for single-region use only
2. Which of the following is a supported API model in Azure Cosmos DB?
easy
A. Oracle SQL API
B. MySQL API
C. MongoDB API
D. PostgreSQL API
Solution
Step 1: Recall Cosmos DB supported APIs
Azure Cosmos DB supports multiple APIs including SQL, MongoDB, Cassandra, Gremlin, and Table APIs.
Step 2: Identify the correct API from options
MongoDB API is officially supported, while Oracle, MySQL, and PostgreSQL APIs are not.
Final Answer:
MongoDB API -> Option C
Quick Check:
MongoDB API is supported by Cosmos DB = B [OK]
Hint: Remember Cosmos DB supports MongoDB API, not Oracle or MySQL [OK]
Common Mistakes:
Confusing Cosmos DB with relational databases
Assuming all SQL-based APIs are supported
Selecting unsupported database APIs
3. Given this Cosmos DB use case: A global e-commerce app needs to store product catalog data with fast reads and writes worldwide. Which Cosmos DB feature best supports this?
medium
A. Local SSD caching only
B. Multi-region replication with automatic failover
C. Single-region write with manual backups
D. Manual sharding without replication
Solution
Step 1: Analyze the requirement for global fast reads and writes
The app needs data available quickly everywhere and must handle writes globally.
Step 2: Match Cosmos DB features to requirements
Multi-region replication with automatic failover allows writes and reads in multiple regions with high availability and low latency.
Final Answer:
Multi-region replication with automatic failover -> Option B
Quick Check:
Global fast reads/writes need multi-region replication = C [OK]
Hint: Global writes need multi-region replication with failover [OK]
Common Mistakes:
Choosing single-region write limits scalability
Confusing caching with replication
Ignoring automatic failover importance
4. You created a Cosmos DB container but notice your app experiences high latency when accessing data globally. What is the most likely cause?
medium
A. The container is configured with single-region write and no multi-region replication.
B. The container uses multi-region replication with automatic failover.
C. The container has indexing enabled for all properties.
D. The container is using the MongoDB API.
Solution
Step 1: Understand latency causes in global apps
High latency often happens if data is only written and read from one region far from users.
Step 2: Identify configuration causing latency
Single-region write without multi-region replication means users far from that region experience delays.
Final Answer:
The container is configured with single-region write and no multi-region replication. -> Option A
Quick Check:
Single-region write without replication causes high latency = A [OK]
Hint: Check if multi-region replication is enabled to reduce latency [OK]
5. A company wants to build a globally distributed IoT app that collects sensor data continuously and requires automatic scaling and low latency. Which Cosmos DB feature combination best fits this use case?
hard
A. Gremlin API with no replication and fixed throughput
B. Single API support with manual scaling and single-region writes
C. Table API with single-region replication and manual failover
D. Multi-model support with multi-region writes and automatic scaling
Solution
Step 1: Identify IoT app requirements
The app needs to handle continuous data ingestion globally with automatic scaling and low latency.
Step 2: Match Cosmos DB features to these needs
Multi-model support allows flexible data types; multi-region writes enable global data ingestion; automatic scaling handles variable loads.
Final Answer:
Multi-model support with multi-region writes and automatic scaling -> Option D
Quick Check:
IoT needs global writes and scaling = D [OK]
Hint: IoT needs multi-region writes plus auto scaling [OK]
Common Mistakes:
Choosing single-region writes limits global data ingestion