Why Discord Transformed Performance and Slashed Latency by Switching from Go to Rust
In 2020, Discord made a pivotal decision that drastically improved the performance of its “Read States” service, a key component that ensures users experience snappy responses in the app. This decision involved switching the service’s implementation from Go to Rust. While Go is well-known for its concurrency and simplicity, Discord engineers encountered performance bottlenecks that necessitated a transition. This case study dives deep into why Discord chose Rust, how it improved the service, and what lessons Go and Rust enthusiasts can take from this transformation.
6 min readSep 13, 2024
The “Read States” Service: A Critical Component
The “Read States” service is at the heart of Discord’s infrastructure. Its sole job is to keep track of which channels and messages each user has read. Every time a message is read or sent, this service is accessed, which makes it a crucial component for…