by vrodic · 8y ago · 0 comments
I've seen just API Gateway costing more than entire infrastructure costs of similarly sized websites.
If you can properly saturate EC2 it will be significantly less expensive than Lambda but with lambda you have to pay API GW and the vendor lock-in price.
I've started flagging these submissions.
Salary is a hidden cost people often forget. Or time spent by your programmer’s debugging infra; time not spent creating value. Frustration from having to deal with TF or ansible in the first place.
These are all benefits of a serverless solution which cost aware criticisms should at least try to quantify and take into account.
Signed, not-a-shill.
* I’ll rephrase: a significant amount of companies don’t have the luxury of being so swamped by requests they can saturate EC2 boxes and make the devops overhead (which, I’m arguing, is big but relatively constant/“sub linear”) worth the price difference (which scales linearly). Significant enough for these articles to have a raison d’être.
I’m also working on certifications mostly as a method to force me to learn in a structure manner, my company will pay for them, and they still have some market value.
Lambda and api gateway is nothing but expensive vendor lock-in.
- When you start having to spend a lot of time working around its limitations. (As is the case with all managed services.)
- When the sum of its parts create a distributed system whose complexity costs you more in productivity than it gives back.
Performance limits will get better with time. The complexity cost is more difficult to predict. Hopefully it will improve as best-practices emerge and tooling gets better.
Organizing is also simple - if you know CloudFormation. You should learn that anyway to provision resources in a repeatable fashion.
Probably not a good argument though. If you're successful enough to be saturating servers you're probably successful enough to be hiring experienced competent help for the transition.
At my old job, we were terrible at wanting to use new shiny things (me included). We had terrible vendor lock-in with AWS, although it did make my resume look nice as I could fill it with fancy AWS products.
My supervisor was discussing AWS Lambda with me at lunchtime, and I said that it's not worth it, because any cost savings from using Lambda over a server are outweighed by the cost if we ever wanted or needed to switch vendors.
AWS lambda would make sense for large companies, where server time is more expensive than developer time. But for most companies, developer time is more expensive than server time, using shiny new AWS specific tools is just going to hurt later on.
I mean, sure, if you're doing something as a hobby and consider your own time free but have to pay $5 for a VM somewhere, then maybe.
But especially at large companies, my experience has always been that for any work done the cost of infrastructure is basically a rounding error compared to the cost of developer time. And that doesn't even begin to include the cost of support team time for the eternity that everything seems to need to be maintained for in larger companies.
As a recent example, I know that the amount each developer on a team I've worked on costs (not how much they are paid, all contractors from various companies), per person, more than it would cost to buy a mid range server, colocate it in a data center etc - per day. So after a year, if we just bought infrastructure instead of developer time, we could have had a handy ~15,000 mid range servers racked and ready to go.
BTW, you can use other self-hosted API gateways like Kong with Lambda if you want to cost optimize.
In essence his point was to use Lambda as a tool only to work with tasks related to AWS infrastructure automation. And not as a tool for everything.
The old adage, of not treating everything as a nail while holding a hammer seems to apply here.
You can avoid that with the Serverless framework.
If your workload is a 'traditional' web application, saturating a full VM and not too bursty - don't run it on Lambda.
Regarding vendor lock-in, I don't think Lambda is important for the vendor lock-in question. If you just need 'compute' capacity, it would be easy to move from Lambda to anything else. But if you also use bunch of other AWS services - then moving the Lambda functions is likely to be your least concern, frankly. On the other hand, if you do leverage various AWS services (other than just IaaS) - switching to Lambda (or other managed platform) could be useful to make your entire architecture (more) serverless.
Do you mean Api Gateway + the lambdas?
API Gateway is $3.50 per 1 million API calls received plus data transfer ($0.09 per GB or $90 per Terrabyte). What kind of API were they serving that was racking up those large bills?
Typically you would serve static content off s3 + cloudfront, and just the API off the API gateway/lambdas.
Also if you have servers you are probably auto-scaling redundant instances in multiple availability zones and then getting that high CPU utilization is unlikely.