Replies: 1 comment
-
This would be good to look into. My main question is how does it affect the performance? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@lukeshay thank-you for your work on this project it has been very insightful and I found it helpful for my project.
In researching solution paths for hosting node apps + Astro SSR with lambda I came across the aws-lambda-web-adapter and was curious re your thoughts if this would be a good option/direction to support for this project as well?
https://github.com/awslabs/aws-lambda-web-adapter
https://aws.amazon.com/blogs/compute/using-response-streaming-with-aws-lambda-web-adapter-to-optimize-performance/
It is a general purpose lambda to http api adapter written in Rust. It can be added to Docker images or used with AWS managed runtimes with a few extra steps:
https://github.com/awslabs/aws-lambda-web-adapter#lambda-functions-packaged-as-zip-package-for-aws-managed-runtimes
(also see the example nodejs app: https://github.com/awslabs/aws-lambda-web-adapter/tree/main/examples/expressjs-zip)
The blog article also links to the example project https://github.com/aws-samples/lwa-nextjs-response-streaming-example
which demonstrates Next13 streaming with suspense w/ lambda response streaming; i.e. use-case relevant to modern SSR.
I guess the cool part of the idea is that Astro could stay pretty idiomatic regarding SSR with only the official nodejs adapter meanwhile the concern of mapping "AWS to http" is handled by an optimized and specialized layer in performant rust.
It would be awesome if the cdk constructs also supported this approach!
Beta Was this translation helpful? Give feedback.
All reactions