Explore Azure Cosmos DB Flashcards

1
Q

When you create a container, you configure throughput in one of the following modes:

A

Dedicated throughput: The throughput on a container is exclusively reserved for that container. There are two types of dedicated throughput: standard and autoscale.

Shared throughput: Throughput is specified at the database level and then shared with up to 25 containers within the database. Sharing of throughput excludes containers that are configured with their own dedicated throughput.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

physical partition

A

The underlying storage mechanism for data in Azure Cosmos DB is called a physical partition. Physical partitions can have a throughput amount up to 10,000 Request Units per second, and they can store up to 50 GB of data. Azure Cosmos DB abstracts this partitioning concept with a logical partition, which can store up to 20 GB of data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Azure Cosmos DB approaches data consistency as a spectrum of choices instead of two extremes

A

Strong consistency and eventual consistency are at the ends of the spectrum, but there are many consistency choices along the spectrum. Developers can use these options to make precise choices and granular tradeoffs with respect to high availability and performance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Azure Cosmos DB offers five well-defined levels.

A

From strongest to weakest, the levels are:

Strong
Bounded staleness
Session
Consistent prefix
Eventual

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The consistency levels are region-agnostic and are guaranteed for all operations, regardless of:

A

The region where the reads and writes are served
The number of regions associated with your Azure Cosmos DB account
Whether your account is configured with a single or multiple write regions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Strong consistency

A

Strong consistency offers a linearizability guarantee. Linearizability refers to serving requests concurrently. The reads are guaranteed to return the most recent committed version of an item. A client never sees an uncommitted or partial write. Users are always guaranteed to read the latest committed write.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

request units

A

The cost of all database operations is normalized in Azure Cosmos DB and expressed by request units (or RUs.
The cost to do a point read, which is fetching a single item by its ID and partition key value, for a 1-KB item is 1RU.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

There are three modes in which you can create an account:

A

Provisioned throughput mode: In this mode, you provision the number of RUs for your application on a per-second basis in increments of 100 RUs per second. To scale the provisioned throughput for your application, you can increase or decrease the number of RUs at any time in increments or decrements of 100 RUs. You can make your changes either programmatically or by using the Azure portal. You can provision throughput at container and database granularity level.

Serverless mode: In this mode, you don’t have to provision any throughput when creating resources in your Azure Cosmos DB account. At the end of your billing period, you get billed for the number of request units that have been consumed by your database operations.

Autoscale mode: In this mode, you can automatically and instantly scale the throughput (RU/s) of your database or container based on its usage. This scaling operation doesn’t affect the availability, latency, throughput, or performance of the workload. This mode is well suited for mission-critical workloads that have variable or unpredictable traffic patterns, and require SLAs on high performance and scale.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

change feed in Azure Cosmos DB, The extra low-level control of pull model includes:

A

Reading changes from a particular partition key
Controlling the pace at which your client receives changes for processing
Doing a one-time read of the existing data in the change feed (for example, to do a data migration)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the purpose of the context object in a stored procedure in Azure Cosmos DB?

A

It provides access to all operations that can be performed in Azure Cosmos DB, and access to the request and response objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the purpose of the lease container in the Azure Cosmos DB change feed processor?

A

The lease container acts as a state storage and coordinates processing the change feed across multiple workers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly