Chris Munns long article diving straight to the point of AWS Lambda concurrency. In AWS Lambda, which is the core of the serverless platform at AWS, the unit of scale is a concurrent execution. This refers to the number of executions of your function code that are happening at any given time.
Each AWS Account has an overall AccountLimit value that is fixed at any point in time, but can be easily increased as needed. As of December 2017, the default limit is 1000 “slices” of concurrency per AWS Region.
Author then dives into testing concurrency for various scenarios. For generating load they use an open source tool called “hey”. He demonstrates how to protect a backend resource from being overloaded by activating concurrency reservation.
You can now set a concurrency limit on individual Lambda functions in an account. And the emergency kill switch can be activated by setting the concurrency reservation and limit of a Lambda function to zero.
Placing limits on how many concurrency “slices” that your function can consume can prevent a single function from consuming all of the available concurrency in an account. Interesting read!
[Read More]