Discord rewrote their stack multiple times.
Not because they got it wrong.
Because they got too big for what they built.
2013 β The starting stack
Elixir for real-time messaging. Python for APIs. Go for microservices. MongoDB for storage. Electron for desktop.
Standard startup choices. Ship fast, figure out the rest later.
2017 β MongoDB had to go
5 million users. MongoDB couldn't keep up.
Switched to Cassandra . 12 nodes. Worked fine.
Until 2022, when those 12 nodes became 177. Maintenance got painful. Costs climbed. They moved to ScyllaDB .
One problem. Nine years. Three databases.
2019 β Elixir wasn't fast enough for everything
Sorting large data sets in Elixir was taking 170ms per operation.
At Discord's scale, that's not acceptable.
They rewrote it in Rust . Dropped to 1ms .
That's it. That's the whole reason.
2020 β Go's garbage collector became the enemy
Discord's Read States service tracks every message you've read.β¦