skip to Main Content

I have configured my App Service Plan to have 4 instances.

Within the App Service Plan, I host 1 web application and 1 api (node.js).

After waiting an hour or so after setting the instance count to 4 manually, I perform a load test, but I see only 1 instance being hit.

enter image description here

What is preventing me to use all the servers?

I’ve set:

  • session affinity to OFF
  • Using 4 instances in the load test 100 users each, public traffic enabled.
  • Set App Service Plan instance count to 4

To me it seems this is all I would need to balance the traffic evenly over the 4 instances, yet it doesn’t seem to do so. What am I missing here?


Update:

I’ve got these settings under scale out:

enter image description here


Update:

Did run another load test: same results – only 1 instance is hit.

enter image description here

2

Answers


  1. You may need to confirm the instances configured on the App Service. This is configured under scaling.

    It’s possible to scale out the number of instances on the ASP to a particular value, but have a different number of instances for each App Service hosted on the plan. This is useful if some applications aren’t designed work with multiple instances.

    Login or Signup to reply.
  2. What did you set for the PerSiteScaling configuration?

    By default, this voice is set to false, but if you can change it to true, the platform automatically spreads the instances of the Web App across all available instances of the App Service plan.

    This is what the docs says:

    Apps are allocated to available App Service plan using a best effort
    approach for an even distribution across instances. While an even
    distribution is not guaranteed, the platform will make sure that two
    instances of the same app will not be hosted on the same App Service
    plan instance.

    The platform does not rely on metrics to decide on worker allocation.
    Applications are rebalanced only when instances are added or removed
    from the App Service plan.

    e.g. Enable PerSiteScaling using PowerShell

    Set-AzAppServicePlan -ResourceGroupName $ResourceGroup `
       -Name $AppServicePlan -PerSiteScaling $true
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search