Case Study
Discord Real-time with Rust and Go
Illustrative reference design for the Rust, Go, Redis stack: component roles, highlights and trade-offs. No production metrics claimed.
Illustrative walkthrough. This page is a reference design built around the stack listed above. It is not an audit of the named project’s production system, and it makes no measured performance claims. The referenced repository (https://github.com/discord/discord-api-docs) is the source of truth for the real implementation.
Component roles
- Rust — Systems-level components where memory and latency budgets are explicit.
- Go — Primary service implementation; keep request paths explicit and avoid hidden goroutine lifetimes.
- Redis — Low-latency cache and coordination; TTL and eviction policy are explicit.
- protobuf — Schema-first wire format; generated code is checked in and versioned.
Design highlights
- Low-latency event fan-out as an explicit design goal
- Horizontal scaling with sharding
- Binary protocol with Protobuf
Trade-offs to check before adopting
- Caching buys latency and adds an invalidation contract that must be maintained.
- Every added component buys a capability and costs an operational boundary.
Where to look next
- Repository: https://github.com/discord/discord-api-docs
- The related runnable examples below show the individual pieces this walkthrough composes.
Repository
View on GitHub ↗Report a problem with this caseOpens a pre-filled issue on GitHub.