MeasureUp Questions Flashcards

1
Q

Which ports must be open for a direct connection?

A

TCP 0-65535

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

What connection mode is the default for .NET SDK v3?

A

Direct Mode with TCP

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

Can you use EF Core to generate unique id’s for Cosmos documents?

A

Yes.

Generate the value by concatenating the discriminator and the primary key values. You have to use ‘|’ as a delimiter.

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

Which two properties cannot be encrypted with a Customer Managed Key (CMK)?

A

Id and Partition Key

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

What actions can the role with id 00000000-0000-0000-0000-000000000001 perform?

A

The ID is Azure Cosmos DB Built-in Data Reader role.

Microsoft.DocumentDB/databaseAccounts/readMetadata
Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/items/read
Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/executeQuery
Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/readChangeFeed

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

What status code will you get if you try to read a change feed with no new changes?

A

HttpStatusCode.NotModified

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

You have created a pre-trigger in Azure Cosmos DB Core (SQL) API using the .NET SDK version3 for one of your applications that uses Azure Cosmos DB as a data source.

Your organizational security policy requires you to provide the ability for specific clients to read resources in your Cosmos DB account without requiring the explicit usage of a primary key.

You need to provide fine-grained access to specific users for this pre-trigger in a time-bound manner with a customized validity period.

What should you use to achieve the requirement?

A

You should use resource tokens.

Resource tokens allow you to provide fine-grained access to specific application resources within an Azure Cosmos DB database. They include providing access to specific containers, partition keys, items (or documents), stored procedures, pre-triggers, post-triggers, and user-defined functions (UDFs). Additionally, resource tokens allow you to provide access to the above-mentioned resources in a time-bound manner with a customized validity period without the explicit requirement of a primary or read-only key.

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

How much will the RUs increase for point reads when using Always Encrypted?

A

5 %

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

How much will the RUs increase when reading an Azure Cosmos DB Change Feed increase when using Always Encrypted?

A

15 %

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

How much will queries increase RUs when using Always Encrypted?

A

15 %

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

How much will write operations increase RUs when using Always Encrypted?

A

6 %

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

What is a common reason for an HTTP 423 status response when trying to change thruput?

A

Another scaling operation is in progress

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

Does resolved conflicts show up in the Cosmos DB conflict feed?

A

No

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

At what level do you need to assign the Cosmos DB Operator role for a user to configure Backup & Restore?

A

Subscription level

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

What is the default redundancy level for periodic backups?

A

Geo-redundant, if the regions supports it.

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

Can you get help from Azure Support to restore a database if you have the Basic Support Plan?

A

No

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

What Azure Support plan do you need to call and restore databases from backup?

A

Standard or Developer Plan or higher

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

What connectivity mode is best when the environment has a high connection limit?

A

Direct connections

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

Is it possible to change consistency level to strong for a multi-region multi-write deployment?

A

No

20
Q

How can you optimize provisioned thruput (RUs) in the read regions using an effective strategy?

A

Use Cosmos DB CHange Feed to move over-utilized resd requests to a regions where read requests are under-utlized

21
Q

Can Public DNS resolve Private Link endpoints?

A

No

22
Q

What can you use to change between autoscale and manual provisioned account?

A

CLI / PowerShell

23
Q

Can ARM templates or Bicep templates change autoscale / provisioning for an account?

A

No, need to use CLI / PowerShell

24
Q

What is the recommended replication factor when the existing data-bearing replica set is unknown

A

3

25
Q

What is the recommended formula for estinating RU/s for Cosmos SQL api?

A

C (600 RU/s/vCore) * T (total vCores/vCPU) / R (replication factor for existing replica set)

26
Q

When should you avoid using Dedicated Gateway to approve performance for queries and point reads?

A

When using private IP addesses using a Private Link

27
Q

What syntax should you use to index only the nutritionValue property of this array:

“nutrients”: [
{
“id”: “203”,
“description”: “Protein”,
“nutritionValue”: 1.82,
“units”: “g”
},

]
]

A

“/nutrients/[]/nutritionValue/*

You should choose the “/nutrients/[]/nutritionValue/*” option. This is the correct syntax for specifically indexing the nutritionValue path within the nutrition array, which is the desired outcome.

28
Q

How many containers can a serverless database deployment host with shared throughput?

A

25

29
Q

The default consistency level for the account is Session. Can the request option set a more strict level, like Strong?

A

No

30
Q

The default consistency level for the account is Session. Can the request option set a more lax level, like Eventual?

A

Yes

31
Q

Can you change a conflict resolution policy for an existing container?

A

No

32
Q

What must you use to have a custom resolution policy?

A

Stored Procedure

33
Q

How do you define a custom resolution policy?

A

Use ConflictResolutionPolicy with a Mode = Custom and a ResolutionProcedure = and when creating the container.

34
Q

What should you do to capture query index performance?

A

Enable PopulateIndexMetrics in QueryRequestOptions. Then get IndexMetrics from the response object.

QueryRequestOptions options = new()
{
    PopulateIndexMetrics = true
};
35
Q

What must you do in order to use a dedicated gateway?

A
  • Enable it
  • Use the dedicated gateway connection string instead of the typical connection string
  • Use Gateway mode instead of the default Direct connectivity mode
  • The client’s consistency level must be set to session or eventual
36
Q

When is a dedicated gateway most useful?

A
  • Workloads with far more read operations and queries than write operations
  • Workloads that read large individual items multiple times
  • Workloads that execute queries multiple times with a large amount of RU/s
  • Workloads that have hot partition key[s] for read operations and queries
37
Q

What does the sqlx in the .sqlx.cosmos.azure.com connection domain indicate?

A

It’s a connection string to a dedicated gateway.

38
Q

What is a normal rate of errors with status code 429?

A

About 5 %

39
Q

What could be the reason for a high number of 429 errors?

A

Hot partitions

40
Q

How do you identify hot partitions in Cosmos DB Portal?

A

Insights->Throughput, review the Normalized RU Consumption (%) By PartitionKeyRangeID charts.

41
Q

What is the cause of an http status 409 error when creating a new document?

A

The id already exists.

42
Q

What is the cause of an http status 413 error?

A

Document size is too large

43
Q

What diagnostics category is “partitionkeyrangeid” part of?

A

QueryRuntimeStatistics

44
Q

What diagnostics category is “requestCharge” part of?

A

PartitionKeyRUConsumption

45
Q

What six properties will DataPlaneRequests diagnostics category capture?

A

Requestcharge,
statusCode,
clientIPaddress,
partitionID,
resourceTokenPermissionId, resourceTokenPermissionMode

46
Q

What diagnostics category will capture logical partition storage skew?

A

PartitionKeyStatistics