Forum Discussion

KarenSaund888's avatar
KarenSaund888
Copper Contributor
Jan 26, 2021

How does the scale out actually increase instances on my App Services , need some help ?

I have a server which hosts my .net app service.

This app service runs a scheduled service every 2 minutes and each thread can have thousands of transactions and you can image hiw slow things will get after 1hr.

I have scaled out and increased instances to step  by 2 with a max of 10. 

But I have a few questions which I would appreciate if someone can clear them up .. 

 


How can i see the insatcnes increase as the service is running and then see it scale back down ?
Does each instances that is created consume its own set of memoruyor does it share the memory of the server ?


Does each new instance created get its own ip address in a specific range ?


and one big one is that if 1 instance is running and I have a metric that measure CPU and if it reaches lets say 50% then spin up a new instance,
How does that second instance help with the distribution of the transactions that were fired up on the first instance ?

 

Is the creation of a new instance just like increasing specs of the machine ?

 

 

  • KarenSaund888, please see my answers below:

     

    How can i see the insatcnes increase as the service is running and then see it scale back down ?

    You can see all those stats in the Scale-out blade of the App Service. The first indicator is "Instance count" which shows how many instances are spinning now, and the other one is the "Run history" tab in the same place, so you can see some historical changes (if you perform scale operations automatically).


    Does each instances that is created consume its own set of memoruyor does it share the memory of the server ?

    The short answer is yes. Whenever you use any tier (aside from Isolated) that means you're using a shared environment. At the same time, the amount of resources allocated to a scaled instance is the same (as it uses the same App Service Plan). That being said, if your instance scaled to one more and keeps working in such an arrangement, you'll be paying twice as much, etc.


    Does each new instance created get its own ip address in a specific range ?

    No. Each scaled instance is rather a "shadow copy" of the primary one. It means you won't see it anywhere but the reports and the "Insurance count" in the "Scale-out" blade I mentioned. They're load-balanced automatically and the IP is rather pointing to an internal load balancer.


    and one big one is that if 1 instance is running and I have a metric that measure CPU and if it reaches lets say 50% then spin up a new instance,
    How does that second instance help with the distribution of the transactions that were fired up on the first instance ?

    The traffic is distributed automatically by the scheme I mentioned above. What you're asking has everything to do with the "session affinity" at the load balancer. That being said, it "knows" what instance any particular session should go and directs it to the very same instance. Whenever the load hits the scalability metric you defined (if to autoscale automatically), it scales and the load balancer directs new sessions to the newly created instance.

     

    Is the creation of a new instance just like increasing specs of the machine ?

    Yes, the amount of resources allocated to a scaled instance is the same, as I mentioned above (as it uses the same App Service Plan).

    Hope that helps to understand the specifics better. One caveat though - if you scale-out automatically (i.e., you created "custom autoscale rule"), the instance does not scale down automatically. You have to create scale-down rules for the purpose as well. 

    Please mark it as an "answer"/like it,  if it helps.

  • Command0r's avatar
    Command0r
    Iron Contributor

    KarenSaund888, please see my answers below:

     

    How can i see the insatcnes increase as the service is running and then see it scale back down ?

    You can see all those stats in the Scale-out blade of the App Service. The first indicator is "Instance count" which shows how many instances are spinning now, and the other one is the "Run history" tab in the same place, so you can see some historical changes (if you perform scale operations automatically).


    Does each instances that is created consume its own set of memoruyor does it share the memory of the server ?

    The short answer is yes. Whenever you use any tier (aside from Isolated) that means you're using a shared environment. At the same time, the amount of resources allocated to a scaled instance is the same (as it uses the same App Service Plan). That being said, if your instance scaled to one more and keeps working in such an arrangement, you'll be paying twice as much, etc.


    Does each new instance created get its own ip address in a specific range ?

    No. Each scaled instance is rather a "shadow copy" of the primary one. It means you won't see it anywhere but the reports and the "Insurance count" in the "Scale-out" blade I mentioned. They're load-balanced automatically and the IP is rather pointing to an internal load balancer.


    and one big one is that if 1 instance is running and I have a metric that measure CPU and if it reaches lets say 50% then spin up a new instance,
    How does that second instance help with the distribution of the transactions that were fired up on the first instance ?

    The traffic is distributed automatically by the scheme I mentioned above. What you're asking has everything to do with the "session affinity" at the load balancer. That being said, it "knows" what instance any particular session should go and directs it to the very same instance. Whenever the load hits the scalability metric you defined (if to autoscale automatically), it scales and the load balancer directs new sessions to the newly created instance.

     

    Is the creation of a new instance just like increasing specs of the machine ?

    Yes, the amount of resources allocated to a scaled instance is the same, as I mentioned above (as it uses the same App Service Plan).

    Hope that helps to understand the specifics better. One caveat though - if you scale-out automatically (i.e., you created "custom autoscale rule"), the instance does not scale down automatically. You have to create scale-down rules for the purpose as well. 

    Please mark it as an "answer"/like it,  if it helps.

    • KarenSaund888's avatar
      KarenSaund888
      Copper Contributor

      Command0r 

       

      Absolutely brilliant , thanks so much  learn alot from this and am now confident to start fully implementing in Azure.

Resources