LAMBDA COLD START VS WARM START TAMIL | AWS LAMBDA SERVICES | InterviewDOT

136 views · Published 14 October 2018 · 9:21 · Indexed 24 September 2026

Channel: Interview DOT · 2018 · Science & Technology

Watch on YouTube

Click here - https://www.youtube.com/channel/UCd0U_xlQxdZynq09knDszXA?sub_confirmation=1 to get notifications. LAMBDA COLD START VS WARM START
What is Lambda Cold Start and Warm call ?

Prerequisite :
a. Serverless Computing
b. How Lambda works internally ?

AWS Lambda :
AWS Lambda is a compute service that lets you run code without provisioning or managing servers.
AWS Lambda executes your code only when needed and scales automatically.
You pay only for the compute time you consume - there is no charge when your code is not running.

Lambda Execution Steps :

Code Download :
The code and configuration to execute a Lambda are simply stored somewhere on s3. once the lambda is triggered by an event then lambda code will be downloaded.

Container Initialization :
The container will be initialized with appropriate runtime.
CONTAINER is mounted with the resources defined by the configuration and the code to be executed is loaded into memory. 

Initialization and start of the code :
For example , if the lambda is written in Java, then the JVM will be launched and code will be executed.

Cold Start :

Code Download  + Container Initialization + Initialization and start of the code

Warm Call :
Any subsequent calls after the lambda cold start is called as 'Lambda Warm Call'.

Pattern : Cold start - Warm Calls - after ~5 minutes - Cold Start - Warm Calls

AWS Lambda is a serverless data processing service that runs your code as events occur and automatically manages the underlying computing resources for you. With AWS Lambda, you can extend other AWS services with custom logic, or build your own back-end services and operate at the AWS scale and with AWS performance and security. AWS Lambda can automatically execute code in response to multiple events such as HTTP requests through Amazon API Gateway , changes to objects in Amazon S3 buckets , updates to tables in Amazon DynamoDB, or state transitions in AWS Step Functions .

Lambda automatically executes your code on high-availability computing infrastructure and manages the entire administration of computing resources, including server and OS maintenance, capacity provisioning and auto scaling, code and security patch deployment, and code monitoring and logging. You just have to provide the code.

Introduction to AWS lambda functions
The code you run on AWS lambda is called the lambda function. The Lambda function is always ready to run after triggering, much like a formula in a spreadsheet. Each function contains your code and some associated configuration information, such as the function name and resource requirements. Lambda functions are "stateless" with no affinity for the underlying infrastructure, so Lambda can quickly launch as many copies of the functions as needed to scale according to the frequency of incoming events.

Once you've uploaded your code to AWS Lambda, you can assign your feature to specific AWS resources (such as a specific Amazon S3 bucket, Amazon DynamoDB table, Amazon Kinesis stream, or Amazon SNs notification). As the resource changes, Lambda performs its function and manages the computing resources required to process the incoming requests as needed.

When Does Cold Start Happen?
The very first cold start happens when the first request comes in after deployment.

After that request is processed, the instance stays alive to be reused for subsequent requests. There is no predefined threshold after the instance gets recycled, the empiric data show some variance of the idle period.

More from this channel