exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 15 question 1 discussion

Actual exam question from Microsoft's AZ-204
Question #: 1
Topic #: 15
[All AZ-204 Questions]

You need to reduce read latency for the retail store solution.
What are two possible ways to achieve the goal? Each correct answer presents a complete solution.
NOTE: Each correct selection is worth one point.

  • A. Create a new composite index for the store location data queries in Azure Cosmos DB. Modify the queries to support parameterized SQL and update the Azure Function app to call the new queries.
  • B. Provision an Azure Cosmos DB dedicated gateway. Update the Azure Function app connection string to use the new dedicated gateway endpoint.
  • C. Configure Azure Cosmos DB consistency to session consistency. Cache session tokens in a new Azure Redis cache instance after every write. Update reads to use the session token stored in Azure Redis.
  • D. Provision an Azure Cosmos DB dedicated gateway. Update blob storage to use the new dedicated gateway endpoint.
  • E. Configure Azure Cosmos DB consistency to strong consistency. Increase the RUs for the container supporting store location data.
Show Suggested Answer Hide Answer
Suggested Answer: AB 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
AbdulMannan
Highly Voted 2 years, 7 months ago
Got this question on 30-Sep-2022 exam. Correct answer is A and B. Passed with 870 score.
upvoted 20 times
ReyPirata
1 year, 8 months ago
Correct answer is A and B. This was on the exam (08/20/2023). Scored 925
upvoted 4 times
...
surprise0011
2 years ago
I think is correct. If your wondering about B: https://learn.microsoft.com/en-us/azure/cosmos-db/dedicated-gateway And some info from ChatGpt: A dedicated gateway provides a dedicated endpoint for client applications to communicate with Azure Cosmos DB. By using a dedicated gateway, client applications such as the Azure Function app can reduce network latency and improve overall performance when communicating with Azure Cosmos DB. When a dedicated gateway is provisioned, it creates a Virtual Network (VNet) peering between the gateway and the Azure Cosmos DB account. This ensures that all traffic between the client application and Azure Cosmos DB remains within the same network, reducing the network latency.
upvoted 2 times
...
...
finnishr
Highly Voted 2 years, 8 months ago
C makes no sense... so A and B
upvoted 9 times
cecho123
2 years, 7 months ago
"Cache session tokens in a new Azure Redis cache instance after every write" in C. Does not sound right to me either.
upvoted 2 times
...
...
Jobalos009
Most Recent 10 months, 1 week ago
Selected Answer: AB
Correct answer is A and B. "When you provision a dedicated gateway, an integrated cache is automatically configured within the dedicated gateway." So no need to use redis. Ref: https://learn.microsoft.com/en-us/azure/cosmos-db/dedicated-gateway#overview
upvoted 3 times
...
FeriAZ
1 year, 2 months ago
A) Creating a composite index tailored to the queries used by the application can significantly improve query performance and reduce RU consumption. Modifying the queries to support parameterized SQL can also help optimize query execution. B) A dedicated gateway in Azure Cosmos DB provides a consistent low-latency connection and can offload some of the query processing workloads from the client. This can help reduce read latency, especially for complex queries and under scaling conditions.
upvoted 2 times
...
EliteAllen
1 year, 9 months ago
Selected Answer: AB
A & B A. Create a new composite index for the store location data queries in Azure Cosmos DB. Modify the queries to support parameterized SQL and update the Azure Function app to call the new queries: By creating a composite index tailored to the specific queries used, you can potentially reduce the query cost and improve performance. Parameterized queries can further improve efficiency. B. Provision an Azure Cosmos DB dedicated gateway. Update the Azure Function app connection string to use the new dedicated gateway endpoint: A dedicated gateway in Azure Cosmos DB provides improved performance for query execution and can reduce latency. Connecting the Azure Function app to this dedicated gateway can leverage these performance improvements.
upvoted 2 times
...
phucngueyn
1 year, 11 months ago
AB is correct
upvoted 1 times
...
winterthor4
2 years, 1 month ago
Got this vanarsdelltd case study on 26-Mar-2023 exam. Go with A and C. Score 890.
upvoted 1 times
...
adilkhan
2 years, 2 months ago
A and C. ChatGPT
upvoted 1 times
...
comoon
2 years, 3 months ago
Selected Answer: AC
A and C
upvoted 1 times
...
rotimislaw
2 years, 4 months ago
Selected Answer: AC
A and C B & D are off due to Azure Cosmos DB dedicated gateway not supporting SQL queries. See limitations on: https://learn.microsoft.com/en-us/azure/cosmos-db/dedicated-gateway#dedicated-gateway-in-multi-region-accounts E. Makes no sense as increasing consistency to Strong only makes the reads slower Thus A & C which makes sense: Composite Index in Cosmos DB and Redis Cache for reads
upvoted 3 times
NK203
2 years, 2 months ago
https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/getting-started In Azure Cosmos DB for NoSQL accounts, there are two ways to read data:Point reads& SQL queries https://learn.microsoft.com/en-us/azure/cosmos-db/dedicated-gateway#dedicated-gateway-in-multi-region-accounts Dedicated gateways are only supported on API for NoSQL accounts So dedicated gateway is support NoSQL account.How do you found that Azure Cosmos DB dedicated gateway not supporting SQL queries?
upvoted 3 times
...
...
toysky731
2 years, 4 months ago
Selected Answer: AB
composite index improves the sql performace
upvoted 2 times
...
OPT_001122
2 years, 5 months ago
Selected Answer: BC
As per the description B and C look correct
upvoted 1 times
...
gmishra88
2 years, 7 months ago
Redis is clearly a correct option if using Session consistency. From the following document it is clear that the session-id can be used in a cookie for multiple client-instances to share the same session. That is a clear case for redis-cache. So, if Session consistency is correct then redis cache is also correct. https://docs.microsoft.com/en-us/azure/architecture/solution-ideas/articles/data-cache-with-redis-cache
upvoted 2 times
gmishra88
2 years, 7 months ago
"Parameterized SQL provides robust handling and escaping of user input, and prevents accidental exposure of data through SQL injection" So, it does not give performance improvements. Maybe a trick to confuse the traditional sql guys (at least the Java ones, who use that for performance). A trick to punish the Java guys (non-microsoft, I guess. Don't be evil, Microsoft). Dedicated gateway is a fine option with integrated cache. But otherwise increases latency with an extra hop if using a gateway (either standard or dedicated). So, another Microsoft gem to create total confusion. An ill conceived question that is half baked
upvoted 1 times
warchoon
2 years, 1 month ago
Of course parametrization gives performance when it uses cached query plans.
upvoted 1 times
...
gmishra88
2 years, 7 months ago
"Connecting to Azure Cosmos DB with the dedicated gateway provides lower and more predictable latency than connecting to Azure Cosmos DB with the standard gateway." But worse than a direct connection unless the cache is used. Probably that is the guessing game we have to do with a lot of assumption thinking that the location data can be cached.
upvoted 1 times
gmishra88
2 years, 7 months ago
I will bet on B (dedicated gateway) and E (Strong consistency with increased RUs). Strong consistency because that will make the writes do synchronous and so reads can be with lesser consistency level. This is very innovative answer, but then I can only hope. It cannot be session consistency. It cannot be parameterized sql (unless the Microsoft guys does not understand that it does not increase performance)
upvoted 2 times
...
...
...
...
gmishra88
2 years, 7 months ago
B and C are correct. Not using Strong consistency (or bounded staleness is good for read latency), I Redis cache can be used to store session information. But that is about web sessions. But I guess this also can be stored in Redis.
upvoted 3 times
gmishra88
2 years, 7 months ago
Strong consistency as default will make sure the writes are synchronized. But this is about the read latency. While reading any consistency less than Bounded staleness will be better for read latency (read on read quoroms).
upvoted 1 times
...
...
le129
2 years, 8 months ago
why not A composite index
upvoted 4 times
adilkhan
2 years, 3 months ago
A = https://learn.microsoft.com/en-us/azure/cosmos-db/index-policy is correct
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago