Discord's Internal Infrastructure
Taken off discord-infra.
Disclaimer
This has some degree of speculation as Discord's backend is closed.
Storage:
- Scylla for storage
- It is still unknown what role MongoDB has on the stack, but it is still a primary part of the service: source and source.
Programming languages:
- Elixir for the Gateway/WebSockets API, source.
- Python for HTTP/REST API, The best guesses to which framework are Flask.
- Go:
- The embed servers, confirmed by Discord developers informally.
- Note that the embedding servers and mediaproxy, while able to be its own logical unit, as experimented in litecord's [mediaproxy], can be treated separately.
- Punt, replacing Logstash in ELK (Elasticsearch, Logstash, Kibana) setups.
- Lilliput, which is a main part of their media proxy. Lillput is also written in C++. source
- Rust for parts of the Discord Store, most commonly:
- C++ for the Discord RPC library. (deprecated in favor of GameSDK)
Distribution:
- gRPC for node communication.
- They used their own, Loqui, but that changed.
Logging:
- Punt in favour of Logstash for logging.
- Elasticsearch that powers the search feature for users and powers logging.
- Sources about logging: Punt and this issue
- Source about message search
External services
- Google's Cloud Platform for their infrastructure, source
- Cloudflare as a proxy to almost all services, voice servers need to be direct connections, so they don't pass through CF. More on voice servers in the WebRTC source.
- "[...]we use Algolia to power some search features at Discord." source, by jhgg
General technologies
- WebRTC for voice and video. Source, which also goes on more detail on how the voice server architecture works.