Scaling Azure App Service API for Document Uploads: Queue-based Solution

Handle Request Spikes and Reduce Costs: Azure App Service API Modification

Question

You have an Azure App Service API that allows users to upload documents to the cloud with a mobile device. A mobile app connects to the service by using

REST API calls.

When a new document is uploaded to the service, the service extracts the document metadata. Usage statistics for the app show significant increases in app usage.

The extraction process is CPU-intensive. You plan to modify the API to use a queue.

You need to ensure that the solution scales, handles request spikes, and reduces costs between request spikes.

What should you do?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

C

Option C is the best solution for the scenario described.

Explanation: The scenario describes a situation where the App Service API is processing documents uploaded by mobile users. The extraction process is CPU-intensive, which can cause performance issues during peak usage. The goal is to modify the API to use a queue to handle spikes in traffic, scale the solution, and reduce costs during low traffic periods.

Option A suggests configuring a CPU-optimized virtual machine (VM) to install the web app service. While this may provide some performance improvement, it does not address the scaling and cost reduction requirements. Also, it does not utilize a queue, which is the primary solution requirement.

Option B suggests configuring a series of CPU-optimized virtual machine (VM) instances to process a queue. While this may improve performance, it does not address the scaling and cost reduction requirements. Also, it does not utilize a serverless architecture, which could be more cost-effective.

Option D suggests configuring Azure Container Service to retrieve items from a queue and run across a pool of virtual machine (VM) nodes using the extraction logic. While this may provide some performance improvement, it is a complex solution that requires managing the container service and VMs. It does not utilize a serverless architecture, which could be more cost-effective.

Option C suggests moving the extraction logic into an Azure Function and creating a queue triggered function to process the queue. This solution utilizes a serverless architecture, which allows for automatic scaling and cost reduction during low traffic periods. Additionally, Azure Functions have built-in support for message queues, which can handle spikes in traffic without overloading the system. This solution is the most efficient and cost-effective solution for this scenario.

In conclusion, Option C is the best solution for the scenario described, as it meets all the requirements and utilizes a serverless architecture that provides automatic scaling and cost reduction.