Live data from Hacker News

Elixir saves Pinterest $2M a year in server costs

paraxial.io

431–440 of 481 posts

Re: Elixir saves Pinterest $2M a year in server costs

#432

Earlier quoted context omitted.

He is adopting the missionary tactic of feigning a desire for discussion when it is just veiled evangelism.

He seemed to be asking you to back up your claims and you seem to be just saying claiming that you don't need to and he is the problem...

Both of you are afflicted by that logical fallacy of failing to understand that you not encountering a phenomenon does not mean it does not happen or is rare, it just means you didn't encounter it.

If you try telling people that did encounter that phenomenon that in practice they wouldn't/didn't then you shouldn't be surprised if they question why they started talking to you in the first place.

Re: Elixir saves Pinterest $2M a year in server costs

#433
post #39

It’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…

It more than just server costs. They reduced the complexity of their services by a lot. 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.

This isn't a huge difference most of the time. Once you have cluster management at scale, 3 vs 3000 are pretty similar.

Re: Elixir saves Pinterest $2M a year in server costs

#434
post #151
post #64

Earlier quoted context omitted.

The advantages of Elixir are not performance-related. There is a lot of focus on raw performance on web-related services, when in reality most of their running time is spent waiting for IO. If there are two things the BEAM excels at, is IO and turning almost any problem into half a dozen processes that are scheduled and run in parallel, if not geographically-distributed, with 1/50th the effort of any other language.…

> ... with 1/50th the effort of any other language. To junior developers reading this, such statements are never true.

To all junior developers--this developer doesn't know what he is talking about.

Erlang and BEAM, the things underlying Elixir, were specifically engineered to be used in a reliable, distributed fashion including a gigantic amount of idioms and support that no other language comes close to.

Erlang's bit syntax is hands down the best byte stream serialization that still exists--both from a perspective of performance as well as expressiveness. OTP is a documented set of idioms and behaviors for building systems that are meant to be highly distributed and deal with failure gracefully. These include things behaviors like in-place upgrades, supervisors which shut down and restart failing processes, error delegation, etc.

Erlang was meant for genuine "five nines" reliability. No other language comes close (maybe Ada does--I'll let their proponents chime in about that).

Re: Elixir saves Pinterest $2M a year in server costs

#435

Earlier quoted context omitted.

Second system syndrome. They did savings by re-implementing their services and attribute those savings to the new tool / programming language. I wonder what the saving would look like if they chose another tool for the second / optimized system. I doubt it would differ much if they went with Go, Java or stayed with Python.

This is a pretty realistic balanced real-world benchmark of web frameworks (and languages): https://www.techempower.com/benchmarks/ It shows that Python with Django is literally 40 times slower than the fastest framework. Python with uvicorn is 10 times slower. The use of languages like Python and Ruby literally results in >10x the servers being used; which not only results in higher cost, but also greater electricit…

> This is a pretty realistic balanced real-world benchmark of web frameworks (and languages): https://www.techempower.com/benchmarks/

I can't take seriously a benchmark that doesn't even show memory usage.

Hahaha, yep: https://github.com/TechEmpower/FrameworkBenchmarks/issues/39.... Nothing to see here.

Re: Elixir saves Pinterest $2M a year in server costs

#436
post #435

Earlier quoted context omitted.

This is a pretty realistic balanced real-world benchmark of web frameworks (and languages): https://www.techempower.com/benchmarks/ It shows that Python with Django is literally 40 times slower than the fastest framework. Python with uvicorn is 10 times slower. The use of languages like Python and Ruby literally results in >10x the servers being used; which not only results in higher cost, but also greater electricit…

> This is a pretty realistic balanced real-world benchmark of web frameworks (and languages): https://www.techempower.com/benchmarks/ I can't take seriously a benchmark that doesn't even show memory usage. Hahaha, yep: https://github.com/TechEmpower/FrameworkBenchmarks/issues/39... . Nothing to see here.

Ah, that's a good catch. Hmm, I wish Techempower listened to the issues brought up, and made the changes asked.

There's unfortunately no other comparable as-comprehensive web framework benchmarks that I'm aware of.

Re: Elixir saves Pinterest $2M a year in server costs

#437

Earlier quoted context omitted.

> running at a profit and getting to market quickly which dynamic languages do extremely well This (or similar variants of this) is an assertion that's commonly made about dynamically-typed languages, but I don't think they hold any water. Less readable code (due to the lack of types) makes it a lot harder to add new features, and harder to debug code as well. Several years ago, I briefly worked on a fairly large cod…

The main argument here was about the energy costs. But it sounds as though you don't like dynamically typed languages. That's fine. Facebook, twitter and plenty of of billion dollar businesses were built with dynamic languages and many would argue they may not have even existed if they were written in staticly typed languages due to the slower up front time expenditure. I like staticly types languages for large proje…

> they may not have even existed if they were written in staticly typed languages

This is pure speculation. There's no way you can back this up with any sort of real data.

The inverse isn't true either. StackOverflow was written in C#, and it's been doing perfectly well.

I've addressed another commentor making a similar presumption as you, here: https://news.ycombinator.com/item?id=37312297

The only thing I'll concede is that using a statically-typed language without a good type inference system, might slow people down a tiny bit.

The serious downsides of dynamic typing means you might still win out (in terms of developer productivity, code readability, code reliability, and ease of debugging) even if you use a language like Java instead of PHP.

Re: Elixir saves Pinterest $2M a year in server costs

#438
post #3

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…

So really "Python cost Pinterest $2M/year"...

More like "Python got Pinterest to the point of being able to afford to spend extra $2M/year".

Re: Elixir saves Pinterest $2M a year in server costs

#439
post #438

Earlier quoted context omitted.

So really "Python cost Pinterest $2M/year"...

More like "Python got Pinterest to the point of being able to afford to spend extra $2M/year".

I don't know why people think Python is the only productive language.
Post reply on HN