By the title alone, this means nothing. How much would it cost otherwise? What is the percentage savings? In TFA, it gets better though: "Steve: That’s pretty easy. When I started on the spam team, we had close to 1,400 servers running. When we converted several parts to Elixir, we reduced that by around 95%. One of the systems that ran on 200 Python servers now runs on four Elixir servers (it can actually run on two…
> When our notifications system was running on Java, it was on 30 c32.xl instances. When we switched over to Elixir, we could run on 15. Would be curious to know how they tried to optimise the Java stack. Because on every benchmark I've seen the JVM is faster in every which way than Elixir. Except for memory where often people will over-provision the JVM rather than look at where their code might be over-allocating o…
Elixir saves Pinterest $2M a year in server costs
31–40 of 481 posts
Re: Elixir saves Pinterest $2M a year in server costs
#32Pinterest - ah that app that has hijacked all images in google search result. Created an account once but has not really used it.
While the google images thing is kinda shitty. Pinterest is really really good at image search and image recommendations.
Re: Elixir saves Pinterest $2M a year in server costs
#33If you are starting from AWS, it is likely there are many ways to save tons of money by just moving away from AWS.
Re: Elixir saves Pinterest $2M a year in server costs
#34I argue every project has to go through three phases - no idea what's wrong - No idea what's right - We know what was right, but the world has changed now.
Re: Elixir saves Pinterest $2M a year in server costs
#35I wonder how much of the savings comes from the refactoring and how much from the difference between the speed of python and elixir.
Yes, those numbers are for code, network speeds are not directly impacted the same way. But again, does not sound unreasonable.
Re: Elixir saves Pinterest $2M a year in server costs
#36And then they take that $2M and bribe someone at Google to ensure 59% of the image search results are from Pinterest.
Re: Elixir saves Pinterest $2M a year in server costs
#37Earlier quoted context omitted.
> When our notifications system was running on Java, it was on 30 c32.xl instances. When we switched over to Elixir, we could run on 15. Would be curious to know how they tried to optimise the Java stack. Because on every benchmark I've seen the JVM is faster in every which way than Elixir. Except for memory where often people will over-provision the JVM rather than look at where their code might be over-allocating o…
They rewrote, which is known to help too. Going from 30 to 15 instances is not bad but it's very likely that a Java-to-Java rewrite would have helped go down too. The big one however is going from 200 Python servers to 4 Erlang ones: a 50x reduction is quite something and a Python-to-Python rewrite would not have allowed to achieved a 50x gain: > All this is possible because Elixir, and the Erlang platform underneath…
it depends.
The elixir programming paradigm might be one where you are able to more easily write efficient, but still highly concurrent code, where as it would take more work to do the same in java.
Re: Elixir saves Pinterest $2M a year in server costs
#38Earlier quoted context omitted.
> When our notifications system was running on Java, it was on 30 c32.xl instances. When we switched over to Elixir, we could run on 15. Would be curious to know how they tried to optimise the Java stack. Because on every benchmark I've seen the JVM is faster in every which way than Elixir. Except for memory where often people will over-provision the JVM rather than look at where their code might be over-allocating o…
Faster doesn’t mean more responsive, in fact very often an increase in throughput leads to an increase in latency.
Re: Elixir saves Pinterest $2M a year in server costs
#39"rewriting in another language reduced the number of servers by 95%" is hard to beat, but at the same time, this saves "only" 2m a year, or about 0.3% of FY22 cost of revenue (per another post)
Pinterest per employee revenue seems to be around 1m, which basically suggest that this could even be a worse than average allocation of resources.
My takeaway would be "don’t bother with this kind of optimisation before you reach a scale where you can afford to do marginal improvements"
Re: Elixir saves Pinterest $2M a year in server costs
#40> The combined effect of better architecture and Elixir saved Pinterest over $2 million per year in server costs So it may not even be Elixir that is saving most of that money. Who knows.