How Discord Scaled Elixir to 5,000,000 Concurrent Users
And some discussion on Hacker News about it (including some OTP 20.0 optimizations).
Their published libraries described in the blog post:
manifold: Fast batch message passing between nodes for Erlang/Elixir
ex_hash_ring: A fast consistent hash ring implementation in Elixir
fastglobal: Fast no copy globals for Elixir & Erlang
semaphore: Fast semaphore using ETS
At last the praised free book from Fred Hebert: Stuff Goes Bad: Erlang in Anger
I’ve made some changes to our Showcase section and moved this there
Oh now that is very cool, they made a lot of little micro-libraries (micro as in one-file) that are very useful and simple.
Recompiling code on the fly so that the datastructure is “constant” is impossibly cool xD best cache ever
Using Rust to Scale Elixir for 11 Million Concurrent Users
Nowadays it seems like they use a faster implementation with NIFs, here’s the library: SortedSet
Thanks for the link, that is really handy. I implemented a custom MapSet with Erlang 21+ features which is 25% faster than the native MapSet, I expect this can be an even bigger improvement.
You should submit a PR to Elixir then!
Absolutely, I planned on submitting a PR after support for Erlang 20 was dropped. That will probably be quite a while though, so I’ll probably investigate conditional compilation instead.