Every Two Minutes
Discord's Read States service tracks, for every user and channel, how far that user has read. It is hit on every connect, every message send and every message read. The Go version kept an in-memory LRU holding tens of millions of read states and absorbed hundreds of thousands of updates per second.
Its p99 showed a spike roughly every two minutes even on a flat traffic graph. The team then cut the LRU from tens of millions of entries down to a small fraction of that. The periodic spikes got smaller, and overall p99 got worse.
Which single explanation accounts for both results?
Sign in to answer questions and track your progress
Sign In