Is there any downtime involved in enabling autoscaling on the APIM.

Mall Ashi 0 Reputation points
2024-11-15T17:00:55.08+00:00

Hello,

I wanted to implement autoscaling in the existing APIM, please let me know is there any downtime involved in enabling autoscaling (based on the capacity metrics)

Also, how much time would be taken to enable the autoscale on the APIM.

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,206 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Sina Salam 13,371 Reputation points
    2024-11-15T21:06:36.1466667+00:00

    Hello Mall Ashi,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that you would like to know if there is any downtime involved in enabling autoscaling on the APIM.

    Enabling autoscaling in Azure API Management (APIM) is designed to be a seamless process with minimal to no downtime. When you configure autoscaling based on capacity metrics, the system dynamically adjusts the number of units in response to traffic demands, ensuring that your service remains responsive and available.

    Downtime Considerations

    Generally, there is no significant downtime involved in enabling autoscaling. The scaling operations are handled in the background, and the service continues to operate while the scaling adjustments are made. Secondly, there might be very brief, transient interruptions as new instances are brought online, or existing ones are scaled down, but these are typically negligible and should not impact the overall availability of your service.

    Time to Enable Autoscaling

    Enabling autoscaling itself is a quick process. Configuring the autoscale settings in the Azure portal or via Azure CLI typically takes just a few minutes. Secondly, the actual time for scaling operations (adding or removing instances) depends on the current load and the scaling rules you have set. Azure handles these operations efficiently to ensure minimal impact on your service.

    If you would like to enable Autoscaling, you can do that by:

    • Go to your APIM instance in the Azure portal.
    • Under the “Scale” section, configure the autoscale settings based on your desired capacity metrics.
    • Define the rules for scaling up and down based on metrics such as CPU usage, memory usage, or request count.

    But if you would like to configure autoscaling using Azure CLI:

    az monitor autoscale create --resource-group <resource-group-name> --resource <apim-name> --resource-type Microsoft.ApiManagement/service --name <autoscale-name> --min-count 1 --max-count 10 --count 2
    az monitor autoscale rule create --resource-group <resource-group-name> --autoscale-name <autoscale-name> --condition "Percentage CPU > 70 avg 5m" --scale out 1
    az monitor autoscale rule create --resource-group <resource-group-name> --autoscale-name <autoscale-name> --condition "Percentage CPU < 30 avg 5m" --scale in 1
    

    I hope this is helpful! Do not hesitate to let me know if you have any other questions.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.

    1 person found this answer helpful.
    0 comments No comments

  2. JananiRamesh-MSFT 28,871 Reputation points
    2024-11-17T10:39:25.6833333+00:00

    @Mall Ashi Thanks for reaching out. Enabling autoscaling in APIM based on capacity metrics is a great way to ensure your service can handle varying loads efficiently.

    • Generally, there is no downtime involved in enabling autoscaling for APIM instances in the Basic, Standard, and Premium tiers.
    • The scaling process takes at least 20 minutes. If the service is locked by another operation, the scaling request will fail and retry automatically.

    please refer for more information: https://learn.microsoft.com/en-us/azure/api-management/api-management-howto-autoscale#azure-api-management-autoscale-limitations

    If you need further assistance or have more questions, feel free to ask!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.