Catalogue / mattermost-2024-redis-cache

Mattermost added Redis as a shared cache beside its per-node in-memory LRU after reaching 100K users, to scale further

Mattermost, 2024. Mattermost server cluster cache.

Organisation
Mattermost
Evidence
Reported from production
Source
Lessons learned from running Redis at scale

Mattermost blog, published 2024-12-04

Records

Decision#d1

Introduce Redis as an external cache shared by all app nodes, and use its pub-sub for cluster broadcasts

Decision#d2

Use the rueidis client for automatic pipelining and client-side caching, not go-redis

Decision#d3

Keep some of the caches that need full scans in the in-memory cache, not in Redis

Decision#d4

Replace per-item Redis GET loops with a single MGET

Sign in to read what was chosen, what was rejected and what it cost, each with its place in the source. An account is free. The job-queue cards are open without one.