Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do AWS Lambda instances scale?

I understand that AWS Lambda is supposed to abstract the developer from the infrastructure. However I don't quite understand how scaling would work.

Does it automatically start new containers during high traffic?

like image 713
user3791980 Avatar asked Nov 13 '16 18:11

user3791980


People also ask

How do AWS Lambda scale?

Lambda uses the 3,000 available burst concurrency to create new environments to handle the additional load. 1,000 requests are throttled as there is not enough burst concurrency to handle all 5,000 requests. Transactions per second are 16,000. 09:01: Lambda scales by another 500 concurrent invocations per minute.

Does AWS Lambda automatically scale?

Service-linked role created for LambdaThe following service-linked role is automatically created in your AWS account when registering Lambda resources as scalable targets with Application Auto Scaling. This role allows Application Auto Scaling to perform supported operations within your account.

Does Lambda scale up or out?

When all provisioned concurrency is in use, the function scales up normally to handle any additional requests. Application Auto Scaling takes this a step further by providing autoscaling for provisioned concurrency.

How well do lambdas scale?

Concurrency Limits and ScalabilityAfter an initial burst of traffic, Lambda can scale up every minute by an additional 500 microVMs 1 (or instances of a function). This scaling process continues until the concurrency limit is met. Developers can request a concurrency increase in the AWS Support Center 2.


1 Answers

AWS Lambda functions can be triggered by many different event sources.

AWS Lambda runs each Lambda function runs as a standalone process in its own environment. There is a default limit of 100 concurrent Lambda functions.

There is no need to think of Lambda "scaling". Rather, whenever an event source (or your own application) runs a Lambda function, the environment is created, the function is run, and the environment is torn down. When there is nothing that is invoking a Lambda function, it is not running. When 100 invocations happen, then 100 Lambda functions run.

It "scales" automatically by running in parallel on AWS infrastructure. You only pay while a function is running, per 100ms. It is the job of AWS to ensure that their back-end infrastructure scales to support the number of Lambda functions being run by all customers in aggregate.

like image 189
John Rotenstein Avatar answered Oct 30 '22 08:10

John Rotenstein