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.
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.
To reduce read latency in Azure Cosmos DB, creating a new composite index tailored to the specific queries (A) can significantly improve query performance and reduce Request Unit (RU) consumption. This helps in optimizing the queries and thus reduces the amount of time required to retrieve the data. Additionally, provisioning an Azure Cosmos DB dedicated gateway (B) offers lower and more predictable latency compared to the standard gateway due to its integrated cache, which can further enhance read performance by offloading some of the query processing workloads from the client. Both of these methods directly contribute to reducing the read latency effectively.
Got this question on 30-Sep-2022 exam. Correct answer is A and B. Passed with 870 score.
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.
Correct answer is A and B. This was on the exam (08/20/2023). Scored 925
C makes no sense... so A and B
"Cache session tokens in a new Azure Redis cache instance after every write" in C. Does not sound right to me either.
why not A composite index
A = https://learn.microsoft.com/en-us/azure/cosmos-db/index-policy is correct
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
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?
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.
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).
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.
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.
composite index improves the sql performace
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
"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
"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.
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)
Of course parametrization gives performance when it uses cached query plans.
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
AB is correct
Got this vanarsdelltd case study on 26-Mar-2023 exam. Go with A and C. Score 890.
A and C. ChatGPT
A and C
As per the description B and C look correct