keda icon indicating copy to clipboard operation
keda copied to clipboard

azure-servicebus should not scale when topic is Disabled/ReceiveDisabled

Open EtherZa opened this issue 2 months ago • 0 comments

Report

Scaling does not take into account as to whether a subscription is available to consume messages or not. As such, if a subscription's status has been set to Disabled or ReceiveDisabled, scaling will occur as per normal thresholds with replicas sitting idle.

Expected Behavior

When scaling a subscription that is Disabled/ReceiveDisabled, no scaling should occur regardless of the queue length.

Actual Behavior

Scaling occurs even though no replica would be able to consume a message.

Steps to Reproduce the Problem

  1. Add azure service bus topic and subscription
  2. Apply any azure-servicebus rule that will cause scale out
  3. Disable subscription (Disabled/ReceiveDisabled)
  4. Add messages to trigger rule created in 2
  5. Instances will scale but not be able to consume a message

Logs from KEDA operator

example

KEDA Version

None

Kubernetes Version

None

Platform

Microsoft Azure

Scaler Details

Azure Service Bus

Anything else?

As a side effect of this when using Azure Container Apps; scaling out may result in the maximum replicas to be created and sit idle.

In the scenario where a subscription has been disabled to limit impact of a bug in the deployed instance while a fix is prepared; the updated container will not be deployed due to a lack of available replica slots.

Edit: Mixed up topic and subscription. Corrected.

EtherZa avatar Apr 19 '24 03:04 EtherZa