cache-sharding-and-replicationlisted
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