Рет қаралды 142
.Net lambda functions are often perceived to be suffering from a bad cold start. But is there some substance to this perception? In this video, I discuss an experiment I have done to calculate the cold-start time of a simple .Net Lambda function and compare it with the equivalent Node.js and Python functions.
For those new to the serverless arena, I briefly discuss what we mean by the cold and warm start of the Lambda functions, and the role of the creation of the function’s execution environment. I also talk about the Lambda functions invocation models (Synchronous, Asynchronous, and Polling) and how they make the cold start more or less noticeable. I describe some simple architectures using these invocation models and give a demo of a synchronous invocation model and how a cold start feels like when using this architecture.
Finally, I discuss some strategies to reduce the cold start of a .Net Lambda function.
Time markers:-
01:13 What is a cold and warm start?
02:31 Lambda Execution Environment Lifecycle
04:40 Lamba Functions Invocation Models
06:14 Some AWS architectures using different invocation models
07:53 Demo of a .Net Lambda function cold-start
09:39 My experiment to calculate the cold start of a .Net, Node.js, and Python Lambda function
12:35 Some strategies to reduce the cold start duration of a .Net Lambda function
Further readings:-
Lambda execution environments:
docs.aws.amazon.com/lambda/la...
docs.aws.amazon.com/lambda/la...
.Net 7 Native AOT compilation:
docs.aws.amazon.com/lambda/la...
System.Text.Json source-generated serialization:
learn.microsoft.com/en-us/dot...
Unix Epoch Time:
currentmillis.com/ Github repo link (source code for all the Lambda functions used in this video):- github.com/DevPlanet-cloud/Do...