Cache made consistent
Meta raised TAO's cache consistency from six nines to ten nines (99.99999999% of cache writes consistent within five minutes) by treating consistency as a measurement and debugging problem rather than only a protocol problem. Polaris acts as a client that consumes invalidation events and checks cache replicas against client-observable invariants. It uses multi-timescale retry queues and defers expensive cache-bypass database reads, which avoids false positives without overloading the database. A stateful consistency-tracing library logs cache mutations only in the short window after a write, where fills and invalidations race. That gave engineers complete timelines for bugs such as a versioned entry that stayed stale indefinitely.
Related posts
- RAMP-TAO: Layering atomic transactions on Facebook’s online graph store
Meta Engineering hardMasterRAMP-TAO is a protocol that layers read-atomic transactional guarantees on top of TAO, Facebook's eventually consistent social graph store, so developers get an intuitive read transaction API without handling fractured-read anomalies. Adapted from Read Atomic Multi-Partition (RAMP) protocols in a "bolt-on" style, it guards only recent, transactionally updated data and relies on eventual consistency for everything else, so non-transactional workloads pay no cost. Production feasibility results show 0.42% memory overhead, over 99.9% of reads completing in one round-trip to the local cache, and tail latency on par with existing TAO reads. The layered design is cache-friendly, hotspot tolerant and proposed as applicable to other read-optimized stores.
- A Deep Dive into PolyScale’s Architecture
Neon mediumAdept
PolyScale is a wire-protocol proxy cache that sits between an application and its database (here, Neon serverless Postgres), routing connections to the nearest edge PoP and caching query results with TTLs it learns automatically from arrival rate, result change rate and related "query templates". Typically a cache hit happens by the 2nd or 3rd query. Invalidation works in three layers: row-level SQL parsing of writes with global invalidation messages to all PoPs, a table-level fallback for complex queries, and detection of unexplained result changes that disables caching for affected queries, giving eventual consistency without reading the WAL. A built-in performance test shows cached responses around 1ms versus 90–515ms direct to the origin.
- Protocol-Aware Deterministic Simulation Testing
TigerBeetle hardMasterTigerBeetle's deterministic simulator (the VOPR) has full visibility into each replica's consensus and storage state, so it can check invariants that black-box tools like Jepsen or Antithesis cannot see through user-facing APIs. For safety, it asserts that every committed WAL entry has matching checksums across replicas, that LSM manifest structure is consistent everywhere, and that replicas are byte-for-byte identical, which goes deeper than the cheaper production checks that crash a diverging backup. For liveness, it enforces per-replica invariants: a replica with an uncorrupted WAL must never need cluster coordination to recover, and missing blocks must be repaired from intact copies on other replicas whenever any copy still exists.
- Turso v0.5.0
Turso hardMasterTurso v0.5.0 promotes MVCC-based concurrent writes (BEGIN CONCURRENT, adapted from Hekaton) to beta. The MVCC work adds commit dependency tracking, a rewritten crash-safe logical log, low-watermark garbage collection, savepoints, hardened conflict detection and lock-free rowid allocation, verified with Antithesis, Hermitage and Elle. The release also adds experimental Tantivy-based full-text search stored inside the SQLite B-tree, and optimizer upgrades: hash joins with bloom filters, outer joins and disk spilling, semi/anti-join decorrelation, multi-index OR scans and a reworked cost model. Rounding it out are STRICT tables with user-defined types via CREATE TYPE, and stable change data capture with a v2 transaction-grouped record format.
- Slack’s Incident on 2-22-22
Slack Engineering mediumAdeptA Consul agent rolling restart caused Mcrib, Slack's memcached control plane, to replace and flush cache nodes, dropping hit rates during peak traffic. A cache-fronted Group DM membership query hit a Vitess keyspace sharded by user, so every miss became a scatter query across all shards. Database load grew superlinearly, queries timed out, caches couldn't refill, and client retries kept the system stuck in a metastable cascading failure. Recovery required throttling client boots, fetching only missing keys, reading from replicas and later moving the query to a channel-sharded table; Mcrib's very efficiency at replacing nodes increased cache churn and worsened the outage.