Elixir's BEAM Processes Outperform Go's Goroutines for Concurrency

Discord's Elixir backend leverages BEAM processes, which are incredibly lightweight (starting around 0.5 KB memory) and isolated, each with its own heap and per-process garbage collection. This contrasts with Go's goroutines (starting around 2 KB) that share a global heap, requiring more complex manual crash recovery and disciplined mutex usage to prevent system-wide failures at scale, enabling Discord to manage millions of concurrent users with a small engineering team.

Sources

Open the full topic