Skip to content

How to use an IMDB well

Clear eviction policy, persistence plan, and TTL on ephemeral data.

IMDB that scales

  1. Set eviction policy

    maxmemory-policy on Redis: allkeys-lru for caches, noeviction for critical.

  2. Persist what matters

    RDB/AOF for snapshots; replication for failover. Never treat IMDB as sole source of truth for critical data.

  3. Cluster for scale

    Single node = ~100 GB RAM. Shard above that.

  4. TTL on everything ephemeral

    Sessions, rate limits, temp tokens. Without TTL, RAM fills.