-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce Lambda function cold start from 11 seconds to less than 2 seconds #26
Conversation
- Use CRT http client - Cold start reduced to below 2 seconds
Nice work, this was on the backlog for a long time :-) We need to adapt the instructions https://catalog.us-east-1.prod.workshops.aws/workshops/f2c0706c-7192-495f-853c-fd3341db265a/en-US/microservices and can merge it afterwards. |
Can I suggest we add the tiered compilation stop at level 1 config as well. |
The workshop uses manual creation of a Lambda function via AWS Console. Most likely this has to be a step in the workshop guide. |
Tested adding tiered compilation stop at level 1 config. Init duration (cold start) reduced from 1769ms to 1560ms @msailes |
@@ -367,7 +367,7 @@ | |||
"configure" : { | |||
"commands" : { | |||
"0-clone-repo" : { "command" : | |||
"git clone https://github.com/aws-samples/unishop-monolith-to-microservices.git /home/ec2-user/MonoToMicro" | |||
"git clone https://github.com/dmahapatro/unishop-monolith-to-microservices.git /home/ec2-user/MonoToMicro" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@deki Assume this is just for testing purposes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, will fix it before merging
Description of changes:
Existing implementation of Lambda functions had below problems:
With this PR below items are taken care of:
DynamoDbBean
andDynamoDbEnhancedAsyncClient
Result:
Lambda function cold start reduced from 11 seconds to below 2 seconds (~1.7s for GetUnicornBasket API with multiple unicorns)
Configuration
How to create Lambda artifact?
Use below command to create the artifact
MonoToMicroLambda-0.0.1.jar
:By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.