A Container App worker should scale with the length of a Service Bus queue and drop to zero replicas when idle. What do you configure?
Why D is the answer
A KEDA scale rule on the queue
Container Apps uses KEDA for event-driven scaling, including scale to zero. A fixed count wastes money when idle and falls behind at peak.
In detail
- A KEDA scale rule watches the queue length.
- Replicas grow with the queue, and drop to zero when idle.
- Set a maximum replica count to protect downstream systems.
Use case
An illustrative scenario, not a real incident.
A document worker sits idle at night and floods with messages at 9am. A KEDA rule on the queue adds replicas as it grows and drops to zero when empty.
See it in different ways
flowchart LR A["Queue length grows"] --> B["KEDA scale rule"] B --> C["More replicas"] C --> D["Queue drains"] D --> E["Scale to zero"]
stateDiagram-v2 [*] --> Zero Zero --> Running: messages arrive Running --> MoreReplicas: queue grows MoreReplicas --> Running: queue shrinks Running --> Zero: queue is empty
flowchart TD
Q{"What is the queue doing?"}
Q -->|"Empty"| A0["Zero replicas"]
Q -->|"Growing"| A1["Add replicas"]
Q -->|"Shrinking"| A2["Remove replicas"]Key point: Scale workers on queue length.
Why the other options are wrong
- A. A larger container image
- Image size does not control scaling.
- B. A fixed replica count of ten
- A fixed count cannot scale to zero.
- C. An App Service plan upgrade
- App Service plans do not apply to Container Apps.

