Menu

Post image 1
Post image 2
1 / 2
0

Why Discord Keeps Rewriting Its Stack

DEV Community·Pavan Sai·28 days ago
#cFfYiOpx
Reading 0:00
15s threshold

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. It gets hit every time you open the app, send a message, read one.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More