3 ms·
Couple points here in this specific case 1) Lambda costs were shown as actually 50 cents for all this. 2) API Gateway was the balance of the cost, and actual
by blantonl 7y ago
Couple points here in this specific case
1) Lambda costs were shown as actually 50 cents for all this.
2) API Gateway was the balance of the cost, and actually isn't needed in this customer's use case. Lambdas can be placed behind application load balancers which are significantly less expensive.
Author also mentions other downsides such as "vendor lock-in," however his lambdas were written in NodeJs and it would be trivial to move his code to some other NodeJs delivery mechanism such as Fargate or ECS cluster.
The benefit here is his deployment with the ServerLess framework got him his MVP very quickly on a very scalable environment with minimal management.
- shaneprrlt 7y agoAPI Gateway is the definite gotcha with serverless architectures. Whenever someone tells me how cheaper serverless is, I figure they haven't actually dived in to see how many AWS resources besides Lambda are required for a production deployment. 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-beyond https://blog.heroku.com/scaling-ipify-to-30-billion-and-beyo...
- blantonl 7y agoI 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.
- rumanator 7y ago> 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.
- guitarbill 7y agoI 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.
- koolba 7y ago> Author also mentions other downsides such as "vendor lock-in," however his lambdas were written in NodeJs and it would be trivial to move his code to some other NodeJs delivery mechanism such as Fargate or ECS cluster. I find it amusing that your examples to which one could move the project and avoid “vendor lock-in” are both from the same vendor as Lambda. I get the point that it’s not Lambda specific outside the entry point, it’s just funny that the presented alternatives are still cutting a check to the same vendor.
- blantonl 7y agoWell, the variability in this case is how much system administration you want to do. Right?
- ldoughty 7y agoApplication load balancing is VERY expensive compared to other solutions on the low end. Minimum ALB price is $16/month. The trade off with API Gateway is around 5 million requests (I wrote an article on it: https://ldoughty.com/2019/12/comparing-aws-api-gateway-to-load-balancer-proxy-costs/ https://ldoughty.com/2019/12/comparing-aws-api-gateway-to-lo... ) ALB is probably the best solution > 5-6 million and up.. or perhaps HTTP API Gateway between 5-6 and 15 million... But it needs to be near 20 million requests/month before ALB is the "best" solution (though there are still some other considerations that might factor in if your involving a lot of AWS Data transfer which is waived when you are not binding to a VPC, which ALB requires)