AlgoViz

Sharded counters in detail

hard 28 min

What a sharded counter needs in production: a cached total, write buffering with a known loss, a clear consistency promise, changing the number of shards live, replicas and failover, retries that do not count twice, and monitoring.