# How Discord Scaled Elixir to 5,000,000 Concurrent Users

## Metadata
- Author: [[Stanislav Vishnevskiy]]
- Full Title: How Discord Scaled Elixir to 5,000,000 Concurrent Users
- Category: #articles
- Source: medium
- Last Highlighted: 2024-10-30 10:08:51.642220+00:00
- URL: https://medium.com/p/f9b8e1e7c29b
## Highlights
- Sending messages between Erlang processes was not as cheap as we expected, and the reduction cost — Erlang unit of work used for process scheduling — was also quite high.
- Erlang processes are effectively single threaded, and the only way to parallelize the work is to shard them.
- if Erlang sees a function that always returns the same constant data, it puts that data into a read-only shared heap that processes can access without copying the data.