diff --git a/docs/11_lab_scale/1102.md b/docs/11_lab_scale/1102.md index 4b97f53..26630ac 100644 --- a/docs/11_lab_scale/1102.md +++ b/docs/11_lab_scale/1102.md @@ -7,7 +7,7 @@ parent: 'Lab 11: Set up autoscaling for microservices on ACA' # Set up a custom scaling rule -In addition to the HTTP scaling rule, you can also configure a custom scaling rule based on any [ScaledJob](https://keda.sh/docs/2.15/concepts/scaling-jobs/)-based [KEDA scalers](https://keda.sh/docs/2.15/scalers/). The example below demonstrates how to set up an [Azure Service Bus scaler](https://keda.sh/docs/2.15/scalers/azure-service-bus/) for the `visits-service` container app. Once configured, you can send batch messages to the message queue and observe the auto-scaling behavior of the `visits-service` replicas. After a period of inactivity (no incoming message), you can see the replicas scaling down to zero. +In addition to the HTTP scaling rule, you can also configure a custom scaling rule based on any [ScaledJob](https://keda.sh/docs/2.15/concepts/scaling-jobs/)-based [KEDA scalers](https://keda.sh/docs/2.15/scalers/). The example below demonstrates how to set up an [Azure Service Bus scaler](https://keda.sh/docs/2.15/scalers/azure-service-bus/) for the `visits-service` container app. Once configured, you can send batch messages to the message queue and observe the auto-scaling behavior of the `visits-service` replicas. After a period of inactivity (no incoming message), you can see the replicas scaling down to minimum number. ## Step by step guidance @@ -22,7 +22,7 @@ In addition to the HTTP scaling rule, you can also configure a custom scaling ru az containerapp update \ --name $APP_NAME \ --resource-group $RESOURCE_GROUP \ - --min-replicas 0 \ + --min-replicas 1 \ --max-replicas 10 \ --scale-rule-name servicebus-queue-scale-rule \ --scale-rule-type azure-servicebus \ @@ -79,5 +79,5 @@ In addition to the HTTP scaling rule, you can also configure a custom scaling ru 1. Navigate to the portal of the container app `visits-service`, expand **Application** and select **Revisions and replicas**, then select **Replicas** tab. You can see the container app now has more than one replica running. ![service bus rule scale out](../../images/lab11_service_bus_rule_scale_out.png) -1. After low incoming requests for 300 seconds (scale down stabilization window), the replicas will gradually scale down to low count. If there are no further incoming requests for 300 seconds (cool down period), the replicas will eventually scale down to zero. You can also observe the revision status as **Scaled to zero** in the Azure portal. +1. After low incoming requests for 300 seconds (scale down stabilization window), the replicas will gradually scale down to low count. If there are no further incoming requests for 300 seconds (cool down period), the replicas will eventually scale down to minimum number. You can also observe the replica details in the Azure portal. ![service bus rule scale in](../../images/lab11_service_bus_rule_scale_in.png) \ No newline at end of file diff --git a/images/lab11_service_bus_rule_scale_in.png b/images/lab11_service_bus_rule_scale_in.png index 2621d73..9a7fc1f 100644 Binary files a/images/lab11_service_bus_rule_scale_in.png and b/images/lab11_service_bus_rule_scale_in.png differ diff --git a/images/lab11_service_bus_scale_rule.png b/images/lab11_service_bus_scale_rule.png index 2a8c4a5..20e879d 100644 Binary files a/images/lab11_service_bus_scale_rule.png and b/images/lab11_service_bus_scale_rule.png differ