Reputation: 33
When I deploy a serverless framework codebase to AWS, I am curious about what method will be better. For now, there are 2 options.
Regarding scalability, which option is a good approach?
Upvotes: 3
Views: 98
Reputation: 15754
One of the main benefits of Lambda Functions is independently scalable pieces of functionality within your application.
You not only realize isolated scalability this way but you also realize cost savings potentially.
Upvotes: 1
Reputation: 9291
Second option is always better. Creating multiple lambda function for each functionality.
Lambda latency depend on how many calls get from API gateway. If you are using multiple endpoint and single lambda calls then it is going to bottleneck or high latency issue. Plus lambda charge based on per lambda calls. Each lambda 1 million request is free if you use one lambda for all use going to hit this limit early.
Recommendation is use different lambda function for each functionality and this is beauty of Micro Service. Keep simple and light weight.
Upvotes: 2