nerdexam
Microsoft

DP-420 · Question #5

Case Study 1 - Litware, inc Overview Litware, Inc. is a United States-based grocery retailer. Litware has a main office and a primary datacenter in Seattle. The company has 50 retail stores across…

The correct answer is A. Configure the trigger for each function to use a different leaseCollectionPrefix B. Configure the trigger for each function to use the same leaseCollectionNair.e. The correct answers are A and B: configure each function with a different leaseCollectionPrefix, and configure each function to use the same leaseCollectionName. When multiple Azure Functions independently consume the same Cosmos DB change feed, they must each maintain their…

Integrate an Azure Cosmos DB solution

Question

Case Study 1 - Litware, inc Overview Litware, Inc. is a United States-based grocery retailer. Litware has a main office and a primary datacenter in Seattle. The company has 50 retail stores across the United States and an emerging online presence. Each store connects directly to the internet. Existing environment. Cloud and Data Service Environments. Litware has an Azure subscription that contains the resources shown in the following table. Each container in productdb is configured for manual throughput. The con-product container stores the company's product catalog data. Each document in con-product includes a con- productvendor value. Most queries targeting the data in con-product are in the following format. SELECT * FROM con-product p WHERE p.con-productVendor - 'name' Most queries targeting the data in the con-productVendor container are in the following format SELECT * FROM con-productVendor pv ORDER BY pv.creditRating, pv.yearFounded Existing environment. Current Problems. Litware identifies the following issues:

  • Updates to product categories in the con-productVendor container do not propagate

automatically to documents in the con-product container.

  • Application updates in con-product frequently cause HTTP status code 429 "Too many

requests".

  • You discover that the 429 status code relates to excessive request unit (RU) consumption

during the updates. Requirements. Planned Changes Litware plans to implement a new Azure Cosmos DB for NoSQL account named account2 that will contain a database named iotdb. The iotdb database will contain two containers named con- iot1 and con-iot2. Litware plans to make the following changes:

  • Store the telemetry data in account2.
  • Configure account1 to support multiple read-write regions.
  • Implement referential integrity for the con-product container.
  • Use Azure Functions to send notifications about product updates to different recipients.
  • Develop an app named App1 that will run from all locations and query the data in account1.
  • Develop an app named App2 that will run from the retail stores and query the data in account2.
  • App2 must be limited to a single DNS endpoint when accessing account2.

Requirements. Business Requirements Litware identifies the following business requirements:

  • Whenever there are multiple solutions for a requirement, select the solution that provides the

best performance, as long as there are no additional costs associated.

  • Ensure that Azure Cosmos DB costs for IoT-related processing are predictable.
  • Minimize the number of firewall changes in the retail stores.

Requirements. Product Catalog Requirements Litware identifies the following requirements for the product catalog:

  • Implement a custom conflict resolution policy for the product catalog data.
  • Minimize the frequency of errors during updates of the con-product container.
  • Once multi-region writes are configured, maximize the performance of App1 queries against the

data in account1.

  • Trigger the execution of two Azure functions following every update to any document in the con-

product container. You need to provide a solution for the Azure Functions notifications following updates to con- product. The solution must meet the business requirements and the product catalog requirements. Which two actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

Options

  • AConfigure the trigger for each function to use a different leaseCollectionPrefix
  • BConfigure the trigger for each function to use the same leaseCollectionNair.e
  • CConfigure the trigger for each function to use a different leaseCollectionName
  • DConfigure the trigger for each function to use the same leaseCollectionPrefix

How the community answered

(43 responses)
  • A
    81% (35)
  • C
    12% (5)
  • D
    7% (3)

Explanation

The correct answers are A and B: configure each function with a different leaseCollectionPrefix, and configure each function to use the same leaseCollectionName. When multiple Azure Functions independently consume the same Cosmos DB change feed, they must each maintain their own checkpoint (offset) so they independently track their progress. Using a different leaseCollectionPrefix per function achieves this isolation within the same lease container. Using the same leaseCollectionName means they share one lease container, which is efficient and acceptable. Using the same prefix (D) would cause functions to compete for the same leases, and using different lease collection names (C) unnecessarily creates multiple containers.

Topics

#Azure Functions#Cosmos DB Change Feed#Lease container#Event-driven architecture

Community Discussion

No community discussion yet for this question.

Full DP-420 Practice