Subdomain 1.2: Implement container-orchestrated solutions
1.You have a background worker application deployed to Azure Container Apps. The application processes messages from an Azure Service Bus queue. You want the application to automatically scale out when the queue length increases and scale down to zero when the queue is empty. Which KEDA scaler type should you configure?
- A.azure-eventhub
- B.azure-servicebus
- C.azure-storage-queue
- D.rabbitmq
Show answer & explanation
Correct answer: B — azure-servicebus
- A. Incorrect. The azure-eventhub scaler is designed for scaling based on Azure Event Hubs metrics (such as checkpointed offsets). It cannot monitor or scale based on Azure Service Bus queue length.
- B. Correct. The azure-servicebus scaler is specifically designed for scaling based on Azure Service Bus queue or topic metrics. It can monitor message counts and trigger scaling actions, including scaling out as the queue length increases and scaling down to zero when the queue is empty.
- C. Incorrect. The azure-storage-queue scaler is used for scaling based on Azure Storage Queue metrics. Although both are messaging services, Azure Storage Queues and Azure Service Bus Queues require different scalers.
- D. Incorrect. The rabbitmq scaler is used for scaling based on RabbitMQ queue lengths. It is not compatible with Azure Service Bus.