Earlier quoted context omitted.
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…
Is this a cpu-heavy workload? If it's mostly io-heavy, I could see a gevent + pypy approach getting 50x better.
Elixir saves Pinterest $2M a year in server costs
51–60 of 481 posts
Re: Elixir saves Pinterest $2M a year in server costs
#52Earlier 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…
Elixir is slower than plain PHP according to the techempower benchmarks. I'm not even sure how that's possible but it is. By like a factor of 2 iirc. I'm not sure how elixir is that slow since it's compiled.
Re: Elixir saves Pinterest $2M a year in server costs
#53And then they take that $2M and bribe someone at Google to ensure 59% of the image search results are from Pinterest.
I'm really surprised Google Images doesn't block Pinterest.
Re: Elixir saves Pinterest $2M a year in server costs
#54Earlier quoted context omitted.
Yeah, one thing it really shines at is recommending eating disorder content to teenage girls.
To be honest the world at large doesn't have an anorexia problem but an obesity epidemy. 50 millions children under the age of 5 are already obese (and I think 93% of obese children shall stay obese their entire life ). So... Anorexia may be a hill to die on and it's not fun for parents of anorexic kids but priorities, priorities and priorities. The real eating disorder worldwide leads to obesity, not anorexia and I…
Re: Elixir saves Pinterest $2M a year in server costs
#55I wonder how much of their traffic is angry people who ended up there by mistake. They could save a lot more than $2M if they just set robots.txt to disallow everything.
Re: Elixir saves Pinterest $2M a year in server costs
#56Earlier quoted context omitted.
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's very likely that a Java-to-Java rewrite would have helped go down too. 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.
Still I'd prefer Elixir. The BEAM VM just runs lighter.
Re: Elixir saves Pinterest $2M a year in server costs
#57For context, $2MM ~= 0.3% of FY22 cost of revenue[1]. [1] https://www.sec.gov/Archives/edgar/data/1506293/000150629323...
Re: Elixir saves Pinterest $2M a year in server costs
#58It’s interesting because while this is an extreme case of performance improvement, the ROI doesn’t seem amazing. "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 tha…
Having to maintain 95% less servers is worth it even if they didn't save any money IMO.
This also could lead to them reducing their engineering team that maintains these services which would reduce costs even more.
Re: Elixir saves Pinterest $2M a year in server costs
#59Earlier 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
#60Earlier quoted context omitted.
I'm really surprised Google Images doesn't block Pinterest.
Google are returning results for image search without the overhead cost. This is the only logical reason I can think of why Pinterest still exists.