Andy
Andy

Reputation: 2603

How does Azure Function App Scale for millions of concurrent user request

I am trying to understand how Azure function scales in traffic burst when running in either consumption plan or App Service plan. It says here that one can have unlimited Web, Mobile, API App on App service plan.

Wondering how does it manage it? Specifically if I am running my function app in one of the app service plan, would it time out or unreachable at certain peak load condition?

Since there is only one IP address assigned to function app URI, how does Azure ensures the horizontal scaling in this case (extreme peak load condition)?

Is it using some sort of internal load-balancer and then creating a new temporary VM (to spread the load and) to run the instance of function app under load conditions (when certain number of concurrent users/connection trying to access the function URI)?

But even in that case wouldn't it run out the internal IPs for VM instances that get load balanced with internal load balancer? There must be a threshold point when the App service plan will run out of pool of internal IP to assign the VMs to scale out.

So again how can one run unlimited web, mobile, API app on Azure app service plan considering this scenario without running out of any internal IP address pool?

Upvotes: 2

Views: 2884

Answers (1)

R Jain
R Jain

Reputation: 608

I think the key question here is that how scaling works on an App Service Plan.

Azure Data centers consists of different scale units with each scale unit consisting of hundreds of servers (even 1000). This is the scaling power App Service brings with it. A single data center might have multiple Scale Units.

The internal architecture of an App Service consists of - Front End - A seven layer load balancer Web Worker - Web Servers File Servers - To Store Application content

To answer your below questions -

Q.Since there is only one IP address assigned to function app URI, how does Azure ensures the horizontal scaling in this case (extreme peak load condition)?

Q. Is it using some sort of internal load-balancer and then creating a new temporary VM (to spread the load and) to run the instance of function app under load conditions (when certain number of concurrent users/connection trying to access the function URI)?

A : It does not create a new temporary VM but uses Web Workers which are pre-provisioned VMs running a shared load. Front end is a sever layered load balancer responsible for allocating traffic in case of horizontal scaling.

But even in that case wouldn't it run out the internal IPs for VM instances that get load balanced with internal load balancer? There must be a threshold point when the App service plan will run out of pool of internal IP to assign the VMs to scale out.

At the end of the day, a data center is limited by the amount of computing power available within. Hypothetically speaking, if a data center runs out computing capacity, in that scenario you might start experiencing timeouts as I am not aware of any scenario where an application will be scaled automatically to another region.

Upvotes: 3

Related Questions