Azure Cosmos DB is Microsoft’s globally distributed, multi-model database service designed for high availability and scalability. This set of Azure Cosmos DB MCQ questions and answers delves into key topics like creating and configuring a Cosmos DB account, consistency levels, provisioning throughput, global distribution, security, and monitoring. Designed for both professionals and learners, these questions help you master the nuances of managing Azure Cosmos DB effectively. Whether preparing for certifications or enhancing your database management skills, these questions provide a comprehensive understanding of core Azure Cosmos DB operations and features.
MCQs: Creating and Configuring a Cosmos DB Account
What is the first step to create a Cosmos DB account in Azure? a) Install Azure CLI b) Choose a database API c) Select a subscription plan d) Enable Azure Key Vault
Which of the following APIs is NOT supported by Azure Cosmos DB? a) MongoDB b) Cassandra c) Redis d) Gremlin
What is the default database API when creating a Cosmos DB account? a) SQL API b) Cassandra API c) Table API d) MongoDB API
How can you define a Cosmos DB account’s region during creation? a) Use the Azure CLI or Azure Portal b) Select it after creation c) It is automatically assigned d) Use a third-party tool
Which feature ensures data availability during regional outages in Cosmos DB? a) Multi-region write capability b) Backup and restore c) Azure Site Recovery d) Local redundancy
How is the pricing for Cosmos DB calculated? a) Number of API calls b) Reserved storage c) Provisioned throughput and storage used d) Based on the number of users
MCQs: Understanding Consistency Levels
Which consistency level provides the highest performance in Cosmos DB? a) Eventual b) Strong c) Session d) Bounded Staleness
What does “bounded staleness” consistency level ensure? a) Data is always consistent across replicas b) Data is eventually consistent with defined lag c) Data updates are region-specific d) Data is never stale
Which consistency level is ideal for applications requiring the most up-to-date data? a) Eventual b) Consistent Prefix c) Strong d) Session
How many consistency levels does Cosmos DB support? a) Three b) Five c) Four d) Two
Which consistency level is typically used in globally distributed applications? a) Strong b) Session c) Eventual d) Bounded Staleness
In Cosmos DB, consistency levels can be configured: a) Per region b) Per account c) Per database d) Per container
MCQs: Provisioning Throughput
What is the smallest unit of throughput in Cosmos DB? a) Partition b) Resource Unit (RU) c) Shard d) API Call
Which throughput mode automatically adjusts based on workload? a) Reserved Throughput b) Autoscale Throughput c) Manual Throughput d) On-demand Throughput
What is the minimum throughput that can be provisioned for a container in Cosmos DB? a) 400 RU/s b) 100 RU/s c) 500 RU/s d) 200 RU/s
What happens when throughput limits are exceeded in manual mode? a) Requests are queued b) Errors are returned with status code 429 c) Requests are automatically scaled d) Data loss occurs
Which Cosmos DB feature helps in partitioning data for better performance? a) Partition Keys b) Shard Keys c) Region Tags d) Data Buckets
Autoscale throughput mode is best suited for: a) Predictable workloads b) Variable or bursty workloads c) Fixed transaction rates d) Small datasets
MCQs: Regions and Global Distribution
What feature enables global distribution in Cosmos DB? a) Multi-master replication b) Geo-Redundancy c) Manual Data Replication d) Cross-Region Queries
How many regions can a Cosmos DB account span? a) Only one region b) Up to five regions c) Unlimited regions d) Fixed by the subscription tier
What is the role of a region in Cosmos DB? a) Store metadata only b) Host a read/write replica of the database c) Act as a backup location d) Provide logging information
Which feature ensures low-latency access in globally distributed Cosmos DB? a) Region Priority b) Multi-master Writes c) Geospatial Indexing d) Partitioning
How can you add a region to an existing Cosmos DB account? a) Modify the connection string b) Through the Azure Portal c) Delete and recreate the account d) Using third-party tools
What happens when a write region becomes unavailable? a) All writes are blocked b) Failover to another region occurs c) Data is lost d) Only read operations continue
MCQs: Security and Monitoring
Which Azure service secures Cosmos DB access keys? a) Azure Key Vault b) Azure Active Directory c) Azure Security Center d) Azure Firewall
Which authentication method is NOT supported in Cosmos DB? a) Master Keys b) Token-based authentication c) Azure AD RBAC d) OAuth
What tool is used to monitor Cosmos DB metrics? a) Azure Monitor b) Azure Diagnostic Logs c) Application Insights d) All of the above
How often are backups taken in Cosmos DB? a) Every 5 minutes b) Every 2 hours c) Every 4 hours d) Weekly
Which metric indicates high resource usage in Cosmos DB? a) RU Consumption b) Response Time c) Partition Key Usage d) Query Execution Time
How can you set up alerts for specific metrics in Cosmos DB? a) Use Azure Monitor Alerts b) Configure Log Analytics Workspaces c) Write custom scripts d) Enable Autoscale