4 ms·
> if you're under 1K users AWS probably isn't the best solution - conventional VPS hosting is usually more cost effective. You should amend that to say AWS EC2
by curun1r 11y ago
> if you're under 1K users AWS probably isn't the best solution - conventional VPS hosting is usually more cost effective.
You should amend that to say AWS EC2 isn't the best solution. Unless you've got some pretty high utilization (either CPU or bandwidth out) of that conventional VPS host, you can buy a lot of API Gateway/Lambda for the $10/mo you pay for your VPS host and get higher availability and scalability basically free.
- teraflop 11y agoI think you're dramatically underestimating the cost difference between AWS and other providers. Yes, you gain some reliability, but it's nowhere close to "basically free". As a hypothetical example, let's say I have an API backend that needs 250ms of CPU to generate a 16KB response, and uses 512MB of memory. I can run this on a $9/month VPS [1] and, at full utilization, handle about 21 million requests per month. Handling the same volume of requests on AWS Lambda is not just more expensive, but hugely more expensive. You end up paying about $4 in request charges, $73 for the "request gateway", $15 for the computation itself, and $30 for bandwidth. That's more than 13 times the cost, and I haven't even factored in data storage. You could buy two VPSes for fault-tolerance, hugely over-provision both of them, and you'd still end up spending less money than Lambda. If your application is lightweight enough that even a single VPS is dramatically more than you need, then yeah, Lambda's pricing model could save you some of those last few dollars. But if you expect to grow, then you probably don't want to lock yourself into an API that will become much more expensive later on. [1]: https://www.hetzner.de/en/hosting/produkte_vserver/cx20 https://www.hetzner.de/en/hosting/produkte_vserver/cx20
- zorked 11y agoNit: You have to provision the VPS by peak usage, not dividing monthly usage evenly across the month. So if your peak is 13x the average (very easy, specially if you don't have a worldwide audience) the VPS starts to look bad, and we're not even talking about the risk of unexpected peaks.
- teraflop 11y agoYeah, that's a fair point. Even so, I think there's only a short window in the life of a growing webapp where its baseline traffic is small enough for Lambda to make financial sense. On the other hand, it looks like Lambda could be pretty great for small personal projects. It would be even better if they added a modest free tier to the request gateway, to match the other services.
- chatmasta 11y agoAbsorbing peak traffic was the original selling point of the "elastic" cloud. Sure, the cloud was more expensive, but you only had to pay for it for a few hours while traffic peaked. If traffic peaked multiple days in a row, then maybe it was time to rent a new dedicated server. This is still the most economically sensible infrastructure strategy. Maintain a core group of dedicated servers responsible for a threshold workload. When they can no longer handle all incoming work, they offload the excess to temporarily provisioned cloud workers. The benefits: - Guarantee you are only getting price gouged by Amazon for a subset of your traffic - Force yourself to build software that runs on multiple platforms - Address scaling requirements up front Perhaps most importantly, this strategy creates a profit incentive for increasing compute efficiency, regardless of Amazon's pricing structure. Every increase in software efficiency means that the same group of core servers can serve more requests, so you can pay less to Amazon.
- manigandham 11y agoBuy 2 machines then. Or 4 with 2 Nginx proxy pairs. That's still less money and about 1000x the performance without the hassle of dealing with the API/Lambda development experience. Just deploy your webapp to 2 both instances without downtime and you'll be serving hundreds of thousands of users. Amazon doesn't provide any extraordinary high-availability or reliability beyond what you can just do yourself. Their managed services are just running on their own private resources using the same AWS infrastructure, just with more money and people.