Experimental-serverless-trace target increases Lambda@Edge SSR page cold boot times
See original GitHub issueIssue Summary
The use of experimental-serverless-trace
target with SSR page doubles lambda cold boot times. This causes application performance downgrade on lambda cold starts serving that page.
Actual behaviour
Boot times are roughly doubled with experimental-serverless-trace
compared to serverless
target.
Expected behaviour
Boot times are roughly same with experimental-serverless-trace
compared to serverless
target.
Steps to reproduce
Set useServerlessTraceTarget: true
in serveless.yml for application with SSR.
Versions
- OS/Environment: AWS Lambda@Edge
- @sls-next/serverless-component version: 3.5.2
- Next.js version: 11.1.2
Additional context
N/A
Checklist
- [x ] You have reviewed the README and FAQs, which answers several common questions.
- [ x] You have reviewed our DEBUGGING wiki and have tried your best to include complete information and reproduction steps (including your configuration) as is possible.
- [ x] You have first tried using the most recent
latest
oralpha
@sls-next/serverless-component
release version, which may have already fixed your issue or implemented the feature you are trying to use. Note that the oldserverless-next.js
component and theserverless-next.js
plugin are deprecated and no longer maintained.
Screenshots/Code/Configuration/Logs
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (6 by maintainers)
Top Results From Across the Web
Testing and debugging Lambda@Edge functions
This topic includes sections that describe strategies for testing and debugging Lambda@Edge functions. It's important to test your Lambda@Edge function code ...
Read more >Serverless Next.js Component - Serverless Framework: Plugins
Pages that need server side compute to render are hosted on Lambda@Edge. ... false, Use the experimental-serverless-trace target to build your next app....
Read more >Untitled
With SSR the TTFB can be increased due to the time spent on the server evaluating HTML and populating the page with data...
Read more >For the Love of Serverless - New Relic
js and Python for building serverless applications on Lambda, with Java as the third most-used runtime. However, with the AWS launch of ...
Read more >How can I improve serverless function (lambda) cold start ...
When a lambda function starts for the first time, it's a cold start. Subsequent requests to that function are then considered warm. Cold...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any updates here?
We have used CloudFront monitoring and from there Lambda@Edge metrics. Additionally for debugging we some times fork this repo and deploy custom version with added custom debug logging. We have also set “logLambdaExecutionTimes: true” in serverless.yml, but I haven not noticed any impact with that. In the lambda logs, I think there is also this “initial time” or similar showing the cold boot times.