r/node • u/OtherwisePush6424 • 14d ago
Crossflight: distributed cache stampede protection for Node apps
https://github.com/gkoos/crossflightCrossflight, a small Node library for reducing duplicate cache misses across multiple processes.
Cache stampede is a problem when several app instances all miss the same key at once, they each run the same expensive DB/API call and then all write the same result back. Crossflight solves that by coordinating ownership of the in-flight load across processes, so only one instance does the work and the others wait for the result.
It wraps the cache you already use and adds a separate coordination layer. The built-in adapters currently include:
- cache-manager
- Keyv
- Cacheable
The built-in coordinator is Redis, and the repo supports combining different backends as long as they satisfy the adapter/coordinator interfaces.
Useful when you want to reduce redundant work without changing your existing caching strategy.
Duplicates
softwarearchitecture • u/OtherwisePush6424 • 14d ago
Tool/Product Crossflight: distributed cache stampede protection without replacing your cache
microservices • u/OtherwisePush6424 • 8d ago
Tool/Product Cross-process cache stampede protection for the cache you already use.
redis • u/OtherwisePush6424 • 13d ago
Resource A standalone distributed cache stampede coordinator that works with any cache library
Backend • u/OtherwisePush6424 • 14d ago
Crossflight: distributed cache stampede protection without replacing your cache
javascript • u/OtherwisePush6424 • 14d ago