-
-
Notifications
You must be signed in to change notification settings - Fork 457
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
RFC: state of Serverless Next.js and next steps #777
Comments
Sounds like fun, I'd be happy to help! |
Hi, |
@chancity sure, that would be great, feel free to ping @danielcondemarin if you'd like to be added to the Slack to discuss. We'd definitely love some help @JordanLao we do want to support Lambda next, though first as mentioned we want to:
(1) involves quite a bit of refactoring, so probably best to be done by a core contributor. If you would like to help with (2), let me know and we can add you to the Slack. Basically for (2) you could actually start on the deployment logic (setting up Lambda, uploading to S3, API Gateway, CloudFront for assets etc.) assuming that the build outputs look something similar to the existing As for Fastly, I don't believe they support JavaScript yet, unless something changed? See: https://www.fastly.com/blog/why-edge-compute-does-not-yet-support-javascript. They also don't use Node.js nor V8 isolates (like Cloudflare Workers) so it would even trickier, I imagine. I would say that it would be easier to add Cloudflare Workers support - as FAB project has already done so to some extent. |
@danielcondemarin slack please :) |
@chancity If you DM me on https://twitter.com/dcondemarin I'll send you an invite 👍 |
DM'd! |
@dphang I'm just coming back to Serverless Components since it was in beta. In the mean time been suing CDK and CFN SLS. Your mention above about using CDK for this project caught my eye. I would love to discuss more over slack or something. I'd like to get up to speed on this direction. |
Hi, are there plans to support Azure? I am potentially working on a project that would need Azure support so would definitely be willing to help in any way I can. Once the decoupling work is done is it then a matter of implementing Azure ports of the existing components? |
@garyburtonjisc yes the major hurdle is we need to first decouple Lambda/CloudFront stuff, and also I/others may not have enough expertise in Azure functions. If you would like to help start on the Azure part (e.g create a plugin to help package/deploy to Azure) please let @danielcondemarin know, we can add you to the Slack. |
@iDVB yes I think there is a PR out for adding CDK that @kirkness was working on for CDK deployment. Will be reviewing it since he mentioned it is ready. Basically, build and deploy is already decoupled, and we provide a way to deploy using serverless components via AWS SDK, but yeah you can use CDK/CDK for Terraform/your own script, you'd just need to know where to upload the build outputs of Feel free to check with @danielcondemarin for invite to the Slack |
I will close this for now since I think the future plans are quite clear: Currently work is being done to support Lambda/APIGW and help reduce complexity (trying to remove origin response handler, etc.), and after we can start looking at other platforms. |
Hi all!
I hope you are having a great weekend. I just wanted to take some time to give some updates on the current state of Serverless Next.js. This is a long post - TL;DR on bottom if you want. Ever since I've started using this early this year, and contributing just a few months back, we as a community have accomplished, as of version 1.18 or 1.19 alpha:
serverless.yml
outputs, decoupling build step from the deploy step, etc....and more. Thank you for all your support and contributions, and for helping us test and report bugs with the latest alpha versions!
That being said, we've also noticed these two biggest pain points:
.serverless
directory).This brings us to the next set of challenges:
As part of this, we may also plan to reduce the Lambda@Edge handlers into a single origin request handler to simplify the architecture and even improve performance by reducing cold start + CloudFront + S3 origin + Lambda complexity.
In essence, everything except for the platform plugins should be platform-agnostic.
Properly decoupling build and deploy steps, and making it more configurable: much of this is already done, as you can just build only
.serverless_nextjs
outputs using this component, and actually deploy using your own IaC tools - although there is no first-party implementation of CDK yet. This brings us to the last point:Proper infrastructure-as-code and state management. We've seen that our use of AWS SDK means we need to keep updating deployment code to support new features. There is also no proper state management. Fortunately, there are tools like CDK, Terraform, Pulumi etc. that have already already solved these issues, by storing state remotely (e.g in Terraform, you can store it in Terraform, S3, etc).
Serverless Components GA upgrade: with all the above in mind, we are still planning to upgrade to Serverless Components GA as part of this. The plan is for some of the above refactoring to make this much easier.
We hope to incorporate at least some of these into the next major release (v2), I am hoping sometime in Q1 2021. Please share any thoughts or feedback you may have. We could also definitely use some help on some of this (after or in parallel to modularization), especially on supporting new platforms other than Lambda@Edge, since it's mostly @danielcondemarin and me maintaining this package.
I will update this post as I get more feedback. Thank you for reading!
FYI: @danielcondemarin
TL;DR: for v2 release, we are planning to modularize and decouple the component from Lambda@Edge, make it more platform-agnostic and support more platform deployments, and improve pain points related to infrastructure management. In addition, we will plan to upgrade to Serverless Components GA. We would love feedback or comments to help us improve.
The text was updated successfully, but these errors were encountered: