SYSTEM Cited by 2 sources
EVCache¶
EVCache is Netflix's distributed in-memory caching solution, a wrapper around Memcached with Netflix-specific enhancements for high availability, global replication, client-side sharding, and multi-region operation. Open-source at github.com/Netflix/EVCache.
Within this wiki, EVCache is a stub — named as a canonical Netflix caching layer paired with persistent stores in KV DAL namespaces, but not yet deep-dived. Expansion is expected when a dedicated EVCache architecture post is ingested.
Role in the KV DAL story¶
Namespace configs in KV DAL can layer
EVCache as a CACHE tier on top of a durable primary. Example from
the post:
The combination — e.g. Cassandra as PRIMARY_STORAGE + EVCache as
CACHE — gives "highly durable persistent storage AND lower-
latency point reads" inside one logical namespace, without the
calling microservice having to wire cache + DB coherency by hand.
Role in the Counter Abstraction¶
The Distributed Counter Abstraction uses EVCache in two distinct roles:
- Best-Effort counter backing — a thin wrapper over EVCache
incr/decrdelivers a regional approximate counter with high throughput + low latency, at the cost of no cross-region replication on increments + no idempotency + no consistency guarantees. Code skeleton from the post:
return delta > 0
? cache.incr(counterCacheKey, delta, TTL)
: cache.decr(counterCacheKey, Math.abs(delta), TTL);
ClearCount maps to cache.delete(key, ReplicaPolicy.ALL).
(Source:
sources/2024-11-13-netflix-netflixs-distributed-counter-abstraction)
- Rollup Cache for Eventually-Consistent counters — caches the
combined
(lastRollupCount, lastRollupTs)as a single cached value per counter (combined to prevent count / timestamp mismatch).GetCountserves a point-read from this cache, accepting a few seconds of staleness. See patterns/sliding-window-rollup-aggregation.
Seen in¶
- sources/2024-09-19-netflix-netflixs-key-value-data-abstraction-layer
— named as one of the backing stores KV DAL routes to, exemplified
in the
ngsegmentnamespace as a 180-second-TTL cache tier on top of a Cassandra primary. - sources/2024-11-13-netflix-netflixs-distributed-counter-abstraction
— dual role: Best-Effort counter backing + Rollup Cache for
Eventually-Consistent counters. Canonical example of EVCache's
native
incr/decras the substrate for a high-throughput regional approximate counter.
Related¶
- systems/netflix-kv-dal
- systems/netflix-distributed-counter — Best-Effort counter backing + Eventually-Consistent rollup cache.
- systems/apache-cassandra — commonly paired durable primary underneath an EVCache cache tier.
- concepts/best-effort-vs-eventually-consistent-counter
- companies/netflix