Skip to content
← All components

Caching

In-memory cache

Sub-millisecond key-value store for hot data, counters, sessions, locks and geo indexes.

When to use

  • Cache-aside in front of databases
  • Rate-limit counters, leaderboards, seat holds

Pitfalls

  • Stampedes on expiry
  • Treat it as lossy unless persistence is configured

Options by provider

The first option is what diagrams show for that provider.

Amazon Web Services

  • Amazon ElastiCacheManaged
  • Amazon MemoryDB — durableManaged

Google Cloud

  • MemorystoreManaged

Microsoft Azure

  • Azure Managed RedisManaged

Open source / self-hosted

  • RedisSelf-hosted
  • ValkeySelf-hosted
  • MemcachedSelf-hosted

Related concepts

Used in