4 ms·
> Elixir is not a fast language. Depends what we mean by fast. I have seen Erlang VM handle 100k requests per second on a distributed cluster. That's plenty fa
by rdtsc 10y ago
> Elixir is not a fast language.
Depends what we mean by fast. I have seen Erlang VM handle 100k requests per second on a distributed cluster. That's plenty fast. Moreover, because of fault tolerance, it means ability to have a better uptime, with less people on-call. "Fast" can also be measured to include that, if system goes 200k requests per second, but crashes at midnight and stays down for a few hours, the average "speed" can be quite low. In a laptop demo that's not visible, but in practice that's money and customers lost.
But if fast means, "let's multiple some matrices", then yeah can probably use Rust or C for that. It all depends on the problem domain.
- Scarbutt 10y agoI have seen Erlang VM handle 100k requests per second on a distributed cluster A single JVM server can do that load, scaling and providing fault tolerance for a server that just accepts requests is trivial these days, also, if your requests do computationally intensive stuff you are going to have a very bad time with Erlang. It all depends on the problem domain. Exactly, and the domain for Elixir/Erlang is way more niche and specialized than applicable domains of other languages. I don't have anything against Elixir but part of its crowd just advertises it as the best thing for everything.
- ken47 10y agoThe Erlang VM (modified) has supported over 2M concurrent connections: https://blog.whatsapp.com/196/1-million-is-so-2011 https://blog.whatsapp.com/196/1-million-is-so-2011? Furthermore, assuming each request is mapped to an Erlang process, each of them get their own VM -- no stop-the-world.
- ken47 10y agoCorrection: I meant to say each of them get their own GC, not VM.
- eggy 10y agoLFE (Lisp Flavored Erlang) is a great alternative to Elixir if you prefer Lisp over Ruby syntax. Pony lang is looking to enter the BEAM/OTP arena with its own implementation of supervisors and such. It is actor-based, OOP and is supposedly very fast in the distributed niche.
- Scarbutt 10y agoSince I haven't had use cases for the BEAM/OTP, LFE is definitely what's motivating me to finally dive into the whole erlang ecoystem.
- RX14 10y agoJust to add another data point, I've seen crystal do over 100k requests per second on a single desktop core.
- qaq 10y agoPhoenix is slightly faster than Gin (Go web framework) so depending on your use case it can be fast :). Obviously one of the primary selling points is OTP/BEAM VM with all the concurrency, HA, soft realtime etc. but with simpler syntax than Erlang.
- jsmith0295 10y agoIts only faster at IO. Once you start adding CPU bound work to the equation, Phoenix's performance will begin to drop. It's similar to Node in that regard.
- qaq 10y agoTrue any generalisation has flaws :) Even faster is relative do you care about avg or worst case performance do you care more about throughput or latency and on and on :)
- rdtsc 10y ago> It's similar to Node in that regard. No it's not, it is very different from Node. Elixir/Erlang know how to take advantage of multiple CPU cores easily. Node by default doesn't.
- jsmith0295 10y agoWell it does, but it still doesn't do it efficiently. That was the only point I was making. But in general, yes, Elixir/Erlang will handle CPU bound tasks better than node whenever they can be effectively parallelized.
- rdtsc 10y ago> Well it does, but it still doesn't do it efficiently. Oh interesting. Does it run callbacks on multiple threads? That's new, I haven't followed it for a couple of years.
- 10y ago