Re:Elixir Saves Pinterest $2M a Year in Server Costs
by Incolotopo on Tuesday August 29, 2023 @07:33AM
(#37306193)
Its still not very easy to understand if this is now good or not.
3-5k requests per second is not that much and highly depends on what you actually do.
A lot of things can be done just with nginx. nginx is very fast.
Re:Elixir Saves Pinterest $2M a Year in Server Costs
by Coryodaniel on Tuesday August 29, 2023 @07:47AM
(#37306299)
I don’t recall the payload size, but these were all POSTs w/ decent sized bodies, it took about 60 Kinesis shards to avoid writethroughputexceeded.
That being said, I don’t think we could have processed the traffic more efficiently in another language.
We were processing 12M requests per hour. You could run the entire thing on 2 vCPU we “over provisioned the crap out of it” by running it on 4 pods w 2 vCPU as the upper request limit.
> Our service didn’t quite grow exponentially in use, but it did hockey stick. It went from free, to a few hundred bucks, to around $12,000 just for API Gateway. No Kinesis. No Lambda. Just API Gateway.
> A good part of this entire system still runs in Lambda, although it will be moving into Elixir over time to make it easier to reason about and develop on locally.
> What everyone should do is think about where your service is going, and can you afford those costs when you get there. If you don’t have a team of ops people and you aren’t familiar with serverful stuff, spending $30k/mo on HTTP requests might be cheaper than an ops team.
[0] https://medium.com/coryodaniel/from-erverless-to-elixir-4875...