BlogsDiscordMessage Indexing and Search

Message Indexing and Search

Message Indexing and Search

1
posts
2025

Discord's message search infrastructure has evolved significantly since its initial design in 2017. Initially, messages were indexed lazily into Elasticsearch, sharded by guild or direct message across two clusters. As Discord grew, this system began to show cracks, necessitating further development and optimization of message indexing and search capabilities to handle trillions of messages.

2025

How Discord Indexes Trillions of Messages

4/24/2025

This post details the evolution of Discord's message search system, moving from an initial design that indexed billions of messages using Elasticsearch sharded by guild/DM to address the challenges of indexing trillions of messages. It highlights the limitations encountered with the previous architecture and sets the stage for discussing the new solutions implemented.