Skip to content
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

Many single-purposed functions example #3

Open
kauandotnet opened this issue Apr 11, 2020 · 1 comment
Open

Many single-purposed functions example #3

kauandotnet opened this issue Apr 11, 2020 · 1 comment
Labels
question Further information is requested

Comments

@kauandotnet
Copy link

My question about NestJS deployed as serverless it become a single "monolithic function" (main). Do you know how to turn on many single purposed functions?

https://hackernoon.com/aws-lambda-should-you-have-few-monolithic-functions-or-many-single-purposed-functions-8c3872d4338f

@sinedied
Copy link
Member

Having one or more functions really depends of what you're trying to achieve. Having your whole api as one functions has drawbacks yes, like increased cold start time and and slightly slower response time due to the framework additional routing. It can be acceptable or not, depending of your use case.

If you're looking for the best performance and fastest response times then you will better with separate functions and relying on the provider's routing. For that there's a Nestjs WIP compiler that provides additional annotations to deploy your app as separate functions, but there's no public doc for it yet: github.com/nestjs/serverless-core
Once it's officially release I will most likely update this demo app to use it 😉

@sinedied sinedied added the question Further information is requested label Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants