Developing Solutions for Microsoft Azure — Question 16
You are developing a solution that will use a multi-partitioned Azure Cosmos DB database. You plan to use the latest Azure Cosmos DB SDK for development.
The solution must meet the following requirements:
✑ Send insert and update operations to an Azure Blob storage account.
✑ Process changes to all partitions immediately.
✑ Allow parallelization of change processing.
You need to process the Azure Cosmos DB operations.
What are two possible ways to achieve this goal? Each correct answer presents a complete solution.
NOTE: Each correct selection is worth one point.
Answer options
- A. Create an Azure App Service API and implement the change feed estimator of the SDK. Scale the API by using multiple Azure App Service instances.
- B. Create a background job in an Azure Kubernetes Service and implement the change feed feature of the SDK.
- C. Create an Azure Function to use a trigger for Azure Cosmos DB. Configure the trigger to connect to the container.
- D. Create an Azure Function that uses a FeedIterator object that processes the change feed by using the pull model on the container. Use a FeedRange object to parallelize the processing of the change feed across multiple functions.
Correct answer: C, D
Explanation
Option C is correct because Azure Functions can be triggered directly by changes in Azure Cosmos DB, allowing for immediate processing of operations. Option D is also correct as it utilizes a FeedIterator and a FeedRange object to enable parallel processing of the change feed, which is necessary for handling multiple partitions efficiently. Options A and B do not meet the requirements for immediate change processing and parallelization as effectively as C and D.