jargon

Comparison

Distributed cachevsIn-process cache

Distributed cache

you move the cache into a shared service so every instance sees the same entries and one invalidation covers the whole fleet.

A cache held in a separate service such as Redis or Memcached, shared by every application instance. It gives you one copy to invalidate and a hit rate that does not degrade as you scale out. In exchange you add a network round trip to every lookup, a new dependency that can fail, and a serialisation format that is now part of your compatibility surface.

Full entry →

In-process cache

you keep the values in the application's own memory, so lookups are free and every instance ends up with a slightly different copy.

A cache living inside the service process. It is the fastest option available, with no network hop, and it is the only one that keeps working when the shared cache is unreachable. The cost is that it multiplies by instance count: N replicas mean N copies to warm, N copies to invalidate, and N chances to serve a different answer to two users at the same moment.

Full entry →

Related comparisons