← ClaudeAtlas

cache-sharding-and-replicationlisted

Topology for a cache that no longer fits one node: client-side sharded, proxy-fronted, clustered, and fully replicated, compared on failure behaviour, cost and client complexity; and why a read after a write on a replicated cache is not read-your-writes. Estimates origin load when a cache node fails from its measured request share and the surviving copies, routing and capacity — mitigated by replication, warming, coalescing and admission control. Use when choosing between client sharding, a proxy and cluster mode, when a cache node loss or rolling restart took the database with it, when replicas of a cache disagree, or when deciding between sharding the cache and replicating all of it. Does not cover whether to cache, TTL, stampede or invalidation (caching-strategies), the key-to-node mapping (consistent-hashing), a single hot cache key (hot-partitions-and-rebalancing), entry serialisation cost (serialization-performance), or what a replicated read observes (consistency-models).
robsonkades/agent-skills · ★ 2 · AI & Automation · score 75
Install: claude install-skill robsonkades/agent-skills
# Cache Sharding And Replication ## Purpose Decide how a cache is laid out across nodes, and what happens when one of those nodes goes away. This is a topology skill only: whether to cache, how long to keep an entry, and how to invalidate it are `caching-strategies`, and everything here assumes those decisions are already made. The failure this prevents is the one that never looks like a cache incident. A cache node is restarted for a routine upgrade; with N balanced nodes, consistent hashing and no replicas, about 1/N of the keyspace loses its cached copy. After fail-fast remapping, requests for those keys can reach the origin until refill, while survivors continue serving. The cache tier reports a modest dip in hit rate. The database saturates. Nobody investigating the database is looking at the cache, because the cache is up. ## Workflow Before recommending changes, inspect cache product/version, Java client and resolved dependencies, runtime/toolchain, routing and retry configuration, replica placement, working-set bytes, per-node request share and origin capacity at the required SLO. This skill is language-independent and declares no Java baseline or executable Java examples; do not infer support for a client feature or authorize an upgrade. With missing measurements, provide conditional estimates and the exact measurement needed, not a production sizing or confirmed incident diagnosis. 1. **Classify the cache first: performance or availability.** If the origin can