Re:Handling 350k Requests for $3 using Lambda
by blantonl on Friday February 28, 2020 @05:22PM
(#22446962)
I run 8 different production API endpoints, all on Lambda, directly through Application Load Balancer instead of API Gateway, and they served 510 million requests last month for about $200.
Those API endpoints took me about a day to deploy using serverless deployment tools. They economically scale between extremely varied workload requirements. There are no complaints on my end.
Re:Handling 350k Requests for $3 using Lambda
by rumanator on Friday February 28, 2020 @06:56PM
(#22447550)
> and they served 510 million requests last month for about $200.
In EC2, which is not cheap at all, that's between the monthly cost of one m2.2xlarge and m3.2xlarge instance, or two m2.xlarge instances, or 3 t3.large, or 7 t3.medium.
In other words, you can operae a small cluster on AWS for that price tag.
Re:Handling 350k Requests for $3 using Lambda
by guitarbill on Saturday February 29, 2020 @01:24PM
(#22452034)
I don't know how I'm only hearing about this now, since it's been available since late 2018, but that sounds awesome - unlike API Gateway, which is a horrible, buggy mess that doesn't work well for anyone I've spoken to.
It is convenient in several use cases, but for an endpoint or even an entire API that is going to receive a lot of load, managing servers is the more economical approach.
If you need to get a one-off endpoint built that won't receive any significant amount of load, I think a serverless solution is great. But I wouldn't use it as my primary API architecture. Like most things in tech, there's no silver bullet. Context matters, and the best approach depends on many factors.
I still recall this article by the creator of ipify on how he's able to receive upwards of 30 billion requests per month on Heroku for a fraction of the cost of API gateway: https://blog.heroku.com/scaling-ipify-to-30-billion-and-beyo...