How to scale effectively in azure windows?

I am having difficulty identifying the right configurations to scale my cloud service efficiently. I assume that we just need to use the scale section of the management portal portal and nothing programmatically? My current configuration for the web role is

Medium VM (4 GB RAM) Autoscale - CPU Instance Range - 1 to 10 Target CPU - 50 to 80 Scale up and down 1 instance at a time. Waiting time up and down - 5 minutes

I used the http://loader.io/ site to test the load by sending concurrent requests to the API. And it can only support 50-100 users. After that, I got timeout errors (10 seconds). My application will target millions of users on a massive scale, so I'm not quite sure how I can scale effectively to meet such a heavy server load.

I think that the problem may be to increase the scaling time, which is 5 minutes (I think it is very high), and in the control portal the lowest option is 5 minutes, so dunno, how can I reduce it?

Any suggestions?

+4
source share
2 answers

Azure's auto-scaling engine analyzes 60-minute processor usage every 5 minutes. This means that every 5 minutes he has a chance to decide whether your processor utilization and scaling are too high.

If you need something more reliable, I would recommend thinking about the following:

  • CPU usage is rarely a good indicator of website scaling. Look in requests / sec or requests / current instead of using the CPU.
  • Consider scaling up on a larger scale (every 1 min.) The laser portal cannot do this. You will need WASABi or AzureWatch to do this.
  • Depending on your usage patterns, consider the more average means to make a decision (i.e. on average more than 20 minutes not 60 minutes). Once again, your choice here is WASABi or AzureWatch
  • Consider viewing / bid / increase in metrics, not just the latest averages. IE: the number of requests / sec has increased by 20% in the last 20 minutes. Once again, Azure's auto-scaling engine cannot do this, consider either WASABi (which can do this) or AzureWatch, which definitely can do this.

WASABi is a block of applications from Microsoft (that is: a DLL) that you need to configure, host and control somewhere yourself. It is quite flexible and you can override any functionality since it is open source.

AzureWatch is a third-party managed service that monitors / autoscales / heals your roles in Azure / virtual machines / websites / SQL Azure / etc. It costs money, but you allow someone to do all the dirty work.

I recently wrote a blog comparing three products.

Disclosure: I am associated with AzureWatch

NTN

+6
source

Another reason that the minimum time is 5 minutes is because Azure takes some time to assign additional computers to your cloud service and copy your software to them. (WebApps does not have this "problem") In my work as a saas administrator, I found that for Cloud Services this increase in time after scaling can be about 3-5 minutes for our software package.

If you want to adjust scaling on the Azure portal, my suggestion would be to significantly reduce processor ranges. As Igorak noted, Azure scaling is viewed on average over the past 60 minutes. If the cloud service runs mainly on 5% of the CPU for most of the time, then suddenly it reaches a maximum and runs at 99%. The average time will take the average value and start the scale settings. If you leave it at 80%, this will cause the scaling to happen too late. RL Example: I run a portal that does some computationally intensive computing. Under normal use, our cloud services tend to work with a processor of 2-5%, but in rare cases we have seen that it rises to 99% and stays there for some time.

My first scaling attempt consisted of 2 copies and increased from 2 to 80% of the average processor, but it took about 40 minutes to trigger the event because the average processor did not rise so fast. Now I have everything I need to scale, when the average processor takes up more than 25%, and I see that our services will expand in 10-12 minutes. I’m not saying that 25% is a magic number; I say, remember that you work with an “average of more than 60 minutes”.

Secondly, the Azure Portal shows only a limited set of scaling options, and scaling can be set in more detail when using Powershell / REST. For example, the 60 minute interval over which the average value is calculated can be reduced.

0
source

Source: https://habr.com/ru/post/1496189/


All Articles