Live data from Hacker News

Elixir saves Pinterest $2M a year in server costs

paraxial.io

401–410 of 481 posts

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

#401
post #392

I use Go and it gives me a good sweet spot between cost and perf. I’m nowhere close to performance requirements of Pinterest. But my auth service runs on a single 1vcpu, 512mb ram, and 10gb ssd. I use leveldb and swap on the 10gb. I’ve benchmarked it to handle 8-9k rps while delivering 150ms max response time. Not bad for a few bucks a month.

Good thing about Go is that it is easy to learn and hire for.

Go is pretty easy. The hard thing about go is maintaining proper structure. Sounds like not a big deal but trust me I’ve learned the hard way lol.

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

#402
post #157

Earlier quoted context omitted.

I like Elixir as much as any other guy but I am not going to chose it for my team because it was "easy for programmers to understand" If you wanted something that was easy you'd go got Golang or Java, not a language without types. Lots of reasons to love Elixir but this doesn't sound like one

I think dynamic langs are easier to pick up than statically typed ones. But thats just me, I guess.

Easier to pick up, harder to use. A spade is easier to pick up than a digger, but try digging foundations with a spade.

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

#403

Earlier quoted context omitted.

> The big one however is going from 200 Python servers to 4 Erlang ones If your rewrite or refactor gives you a 10X in performance, that's not an optimization, but a bugfix. Unless you are a researcher who have just found a revolutionary algorithm.

Why? Most software is at least 10x slower than necessary for reasons that don't require inventing new algorithms.

It is a matter of mindset. I work on software with soft real time, storage capacity and power consumption constrains, there is a constant flux of "small" feature requests and I cannot even "throw hardware at the problem" at will like as they apparently did, until it became unquestionable that the problem had to be fixed properly.

I'd recommend to adopt this mindset even if one doesn't have those constrains - without erring on the side of "faster than necessary" though - because it's usually difficult to assess how much time and money are leaking because of the inefficiencies one accepts in the name of questionable reasons. They were sort of lucky to have a bill to show it to them.

A proactive stance in this regard goes a long way.

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

#404
post #349
post #238

Earlier quoted context omitted.

The go runtime has similar capabilities as the BEAM runtime when it comes to concurrent workloads. Go has the benefit of being a typesafe compiled language which gives it speed benefits. But using either one of them instead of Java is probably going to be a huge win for most teams on concurrent workloads.

> The go runtime has similar capabilities as the BEAM runtime when it comes to concurrent workloads. Only if you think that the BEAM is similar to being able to easily spawn a function on a separate thread and having channels. Last I checked, goroutines had no mailboxes, supervisors, process monitoring, registry, and its scheduler has a much smaller scope and featureset than the BEAM's. I swear it's obvious when peop…

I've written non-trivial code in both Erlang and Go. Beam doesn't have anything to do with supervisors that's an OTP thing. mailboxes can be simulated with channels and there are conceptual similarities. process monitoring and the registry are unique to BEAM it's true and they have useful properties to leverage. But they aren't core to how the BEAM handles concurrent processing. The schedulers work on a similar conceptual mechanism for the programmer when writing concurrent code with differing optimizations in each.

In my experience I think my statement still stands.

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

#405

Earlier quoted context omitted.

> If you are not willing to try it, that's fair. Say that. Claiming you know stuff about the ecosystem while a guy who is there every day comes across as... strange. Biased. And not arguing in good faith. :( I am not willing to drag others, such as those that wrote the repos, into a technical discussion with people out to act as you are.

The guy you are responding to was completely calm and reasonable. Didn't say anything attacking or otherwise. I'm not sure why you are seemingly trying to cast him (and the Beam) in such a bad light, with seemingly no reason to back it up.

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

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

#406
post #141

Earlier quoted context omitted.

Flagged for being silly flamebait. The Python projects you have personal experience with might have been poorly run but that’s not representative of the language, and it’s not going to lead to a conversation where anyone learns something.

The syntax and semantics of the language change in non-reverse-compatible ways between every minor release. This is independent of project management. As an example, between 2.3 and 2.5, the syntax for package variables was changed (and then the semantics were changed between 2.5 and 2.7). There is nothing you can do as a python user to ameliorate the impact of such changes other than to not use those language featur…

That’s three years, not months, and consider that it’s possible that how we develop software as a field might have matured over multiple decades. The edge case you’re referring two didn’t even affect most packages in the 2000s so it’s quite a stretch to say that something which happened in 2006 embodies how Python is developed now.

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

#407
post #90

Earlier quoted context omitted.

In what planet? This has absolutely no bearing to the Python experience. And I'm using the stuff for 20 years.

That's great that your 5 line scripts don't use features that change between revs, but people who have to maintain large python apps have to book time to pore over the latest language version's definition, update our linting tools to find where in the codebase we use a deprecated feature, change the code, update the tests, retest and redeploy. Not to mention getting a version clean dependency closure. Though we have…

> You should come to terms with the fact that some people just don't like python.

Nobody cares about that - it’s a given that any language will have fans and detractors and most of us are mature enough to focus on what works for the projects and teams we’re part of.

What we’re objecting to is portraying your experience as a global truth. If you don’t like it, sure, but unverifiable hyperbole isn’t contributing anything but noise. This could be your opportunity to learn what tools or practices people use or consider whether the way you want to use the language is at odds with the core developers’ view.

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

#409

Earlier quoted context omitted.

Elixir is a functional language for the Erlang VM. Most C++/Java/Rust/... programmers wpuld have hard time understanding it. But if you are in a bubble where everyone uses Haskell and talks about Monads, then OPs statement may be valid

Monads and Haskell is not a requirement to understand a functional programming language. Also, I find it hard to believe that anyone who knows N+1 programming languages would have a hard time understanding Elixir quickly, it looks like most mainstream programming languages used today, with slightly different syntax for some things. Take a look at https://elixir-lang.org/crash-course.html and you'll see what I mean, i…

> it's basically Ruby with some slight modifications.

It /looks/ like Ruby in a lot of ways, but treating it like Ruby w/ modifications is a mistake that I've seen lead to a lot of really bad usage that (at best) fails to take advantage of the underlying Beam VM, and at worst [and more commonly] actively works against it.

Post reply on HN