Hacker News new | ask | show | jobs
by gtaylor 3934 days ago
It sounded like they were gunning to shave the maximum in response time from their HTTP APIs. From my understanding, Elixir/Erlang probably wouldn't be able to match an optimized Go process in raw efficiency. I get the sense that scaling horizontally is the big draw of the Erlang VM, not so much raw responsiveness.

If simplicity were the primary concern, they could have stuck with Python. You do get a much more distributed element with Elixir/Erlang (which certainly helps with volume), but I'm not sure they'd reach that 10ms response time average with it.

2 comments

If latency were the primary concern nothing would beat the BEAM platform. It was built for that purpose, low latency is absolutely critical when you make a phone call.

Of course that's a bit like a benchmark (meaning, it means absolutely nothing to you/your code). If there were any more latency in the Erlang solution it would be the same algorithmic issues that could pop up in any software.

Go is more efficient for CPU throughput, but BEAM has been fine tuned for decades to keep latency down and wouldn't be able to top for responsiveness.

My personal opinion is that they made a mistake. Reporting about swapping out a stack like this is weird because it looks like they don't know what they're doing. What's next month's blog? We're Moving to Rust? I'm glad they're satisfied, but you gain improvements anytime you do a rewrite- even in the same language. I wouldn't have migrated my existing stack anywhere. I'd use PyPy which would've done wonders for responsiveness on the existing product and adopt containers for deployment.

> I'd use PyPy which would've done wonders for responsiveness on the existing product and adopt containers for deployment.

That's an easy claim to make, but you don't know whether their stack would actually get much improvement out of PyPy. We've had trouble in the past using PyPy with C extensions. Trying to migrate to pure Python equivalents was a headache. Once we managed to get a PoC of a service running under PyPy, we saw very little improvement.

It is an easy claim to make but just as easy for them to test as well, so it works out.
10ms HTTP response times in Phoenix (on elixir) is pretty normal.