Building global permissions is rarely defeated by raw read throughput; it breaks when an old permission snapshot is evaluated against brand-new content. In their 2019 USENIX ATC paper, Ruoming Pang and 13 Google co-authors showed how Zanzibar unifies access control across Calendar, Cloud, Drive, Maps, Photos, and YouTube while keeping permission checks causally consistent with out-of-band edits to documents and groups.

Instead of forcing every authorization check through a global leader round trip, Zanzibar stores relation tuples in Spanner and passes an opaque timestamp token (zookie) across the boundary between content storage and access control. That architecture inspired nearly every modern relationship-based access control (ReBAC) engine, from SpiceDB and OpenFGA to Ory Keto.

  • Global planet scale: Zanzibar manages more than 1,500 namespaces holding over 2 trillion relation tuples (~100 TB), replicated across 30+ locations and served by 10,000+ servers.
  • 10M+ QPS with local reads: during a 7-day December 2018 window, Read peaked near 8.2M QPS, Check at 4.2M QPS, Expand at 760K QPS, and Write at 25K QPS.
  • Sub-10 ms tail latency: Check Safe (local replica reads) held 3.0 ms median and 9.46 ms 95th-percentile latency, while Check Recent (cross-region fresh reads) hit 60.0 ms at p95.
  • Five-nines availability: replay probers measured over 99.999% availability across three years of production operation (under 2 minutes of global downtime per quarter).
How Zanzibar evaluates checks locally without serving stale permissions
1. Zookie consistency gate
Client saves an opaque timestamp cookie alongside each content edit.
At-least-as-fresh snapshot choice
Requests carrying zookies older than 10 seconds (Check Safe, ~99% of checks) read local replicas; newer zookies (Check Recent) pay a leader round trip.
2. Serving and hot-spot layer
Thousands of aclserver instances handle boolean fan-out.
Consistent hashing + cache trees + lock tables
Delegates sub-checks by object_id, quantizes snapshots to 1 or 10 seconds for cache sharing, and coalesces duplicate in-flight checks.
3. Storage and Leopard index
Normalized source of truth paired with flattened group sets.
Spanner MVCC + Leopard skip lists
Stores object#relation@user tuples in Spanner with a shared changelog; Leopard flattens deep groups via offline shards plus real-time Watch deltas.

Architecture from Pang et al. (2019), Sections 2 and 3.

Relation tuples and the “new enemy” problem

Zanzibar represents every permission and group membership as a normalized relation tuple: object#relation@user, where object pairs a namespace with an ID (doc:readme), relation is a client-defined role (owner, editor, viewer, member), and user is a user ID or another userset (group:eng#member). Namespace configs compose relations without per-file tuple bloat using userset_rewrite rules: this reads stored tuples, computed_userset maps relations on the same object (owner implies editor), and tuple_to_userset follows edges like parent folders (viewer of folder:A becomes viewer of doc:readme), combined via union, intersection, and exclusion.

Normalization simplifies updates, yet creates a subtle bug the authors call the “new enemy” problem. Suppose Alice removes Bob from a folder’s ACL, then asks Charlie (outside Zanzibar) to move sensitive files into that folder; or Alice removes Bob from a document, then asks Charlie to paste secret text into it. Under eventual consistency, a check on the new file or edit can hit a pre-removal ACL snapshot and let Bob read material created after he lost access.

Simpler distributed architectures fail here. Asynchronous graph stores like Facebook TAO risk out-of-order ACL evaluation; always-latest global reads destroy the 10 ms latency budget (PACELC); Lamport clocks cannot track Alice and Charlie talking out-of-band; and Chubby or ZooKeeper lack Zanzibar’s write scale or cross-node bounded-staleness snapshots.

Why simpler global authorization designs fall short
Eventual consistency (TAO)

Async replication can evaluate a stale ACL snapshot against freshly created content, leaking data to a removed user.

Always-latest reads

Global synchronization forces cross-region round trips (60 ms p95 on Recent checks) and hurts availability.

Chubby / ZooKeeper

Chubby limits write throughput via cache invalidation; ZooKeeper lacks cross-node external consistency and bounded staleness.

Comparisons from Pang et al. (2019), Sections 2.2 and 5.

External consistency via Spanner and the zookie protocol

Zanzibar resolves the tension between causal correctness and local latency by separating ordering from freshness. Underneath, every namespace stores its versioned relation tuples (shard ID, object ID, relation, user, commit timestamp) plus a shared changelog inside Google Spanner. Spanner’s TrueTime assigns microsecond commit timestamps that respect real-time causality: if Alice removes Bob before Charlie saves new content, Alice’s ACL write strictly receives a lower timestamp T1 < T2. Five Paxos voting replicas sit in three eastern and central US metro areas within 25 ms of each other so writes commit cleanly (at 127 ms median and 233 ms p95), while read-only replicas spread to more than 30 regions globally.

To prevent old ACLs from being paired with new content without paying leader latency on every read, Zanzibar introduces the zookie, an opaque token encoding a global timestamp. Before saving modified content, the application sends a content-change check (evaluated at the latest snapshot). Zanzibar authorizes the edit and returns a fresh zookie Tc, which the application writes atomically alongside the new content version. Every later Check for that content version passes Tc, requiring Zanzibar to evaluate at a single consistent snapshot T >= Tc across all database reads.

That “at-least-as-fresh” contract gives Zanzibar freedom to stay fast. Because replication heartbeats run every 8 seconds, any request whose zookie is more than 10 seconds old (Check Safe) can usually be served from local replicas in the same zone, and Safe checks outnumber Recent checks (under 10 seconds old) by roughly two orders of magnitude. When clients omit a zookie, servers adaptively pick a default staleness using binomial proportion confidence intervals and two-proportion z-tests over recent out-of-zone read hints. Even namespace configuration changes stay consistent mid-fanout: a monitor tracks the config timestamp window available across every aclserver in a cluster so all subrequests share one config snapshot.

Pointer chasing, Leopard, and surviving hot spots

Consistent snapshots alone do not make an authorization graph fast. A standard Check evaluates a recursive boolean tree across Spanner; Zanzibar speeds this up by evaluating leaf nodes concurrently, cancelling sibling subtrees once a parent outcome is settled, and pooling Spanner reads (averaging 1.5 rows per RPC at median, rising near 1,000 rows at p99).

Deeply nested or wide enterprise groups still break pointer chasing, so Zanzibar routes them to Leopard, an in-memory set index. Leopard stores sorted integer skip lists for GROUP2GROUP(ancestor -> descendant_groups) and MEMBER2GROUP(user -> direct_groups), turning group checks into O(min(|A|, |B|)) intersections. Offline shards combine with an incremental layer tailing Zanzibar’s Watch API (where one tuple write can emit tens of thousands of index events), serving 1.56M QPS median (2.22M p99) in under 150 microseconds median (under 1 ms p99).

Bursty workloads such as Drive search (issuing dozens of checks per results page) also create hot spots on shared groups. Zanzibar stacks four defenses to keep Check Safe under 10 ms:

  1. Dual-side cache trees with quantized keys: servers route sub-checks via consistent hashing on object_id (plus Slicer), caching results on both caller and callee across 200M cache lookups/sec. Rounding evaluation timestamps to 1-second or 10-second buckets lets concurrent checks share cache keys without breaking consistency.
  2. Lock tables against stampedes: an in-memory lock table lets only one request compute an uncached key while peers wait. Delegate caches hit 10% on checks (24% on reads) and lock tables save another 12% (9% on reads), eliminating 500K hot internal RPCs/sec.
  3. Hot-object prefetch and delayed cancellation: for the hottest 0.1% of objects, Zanzibar reads and caches the entire object#relation tuple set upfront, and delays cancelling redundant subtrees while peers wait on that lock-table entry.
  4. Deferred hedging and isolation: Zanzibar hedges slow Spanner and Leopard reads (1%, or 200K/s, hedged), never hedges aclserver-to-aclserver checks (which would duplicate expensive graph walks), and enforces per-client cpu-seconds quotas and isolated lock keys.

Trace four production hazards on Zanzibar

Aggregating 10 million QPS into a single p95 number obscures how Zanzibar’s safeguards handle distinct failure modes. Switch across the four tabs below to inspect how causal ordering, deep groups, flash hot spots, and tail spikes are resolved in the paper.

Four production hazards in Zanzibar and how each is handled

Select a scenario (or use Left and Right arrow keys) to compare the naive bottleneck, Zanzibar's mechanism, and measured production evidence.

Revoked user reads freshly added document content

Consistency

Alice removes Bob from a doc or folder, then tells Charlie out-of-band to move or add new sensitive data.

Why naive fix breaks
Eventual consistency can pair Bob's check with a pre-revocation ACL snapshot; always reading the latest global state causes cross-region latency spikes.
Zanzibar's mechanism
Client gets a content-change zookie Tc when saving edits and attaches Tc to later checks, forcing evaluation at T >= Tc on Spanner TrueTime.
Measured evidence
Check Safe (>10 s zookies) serves ~99% of checks locally at 3.0 ms p50 and 9.46 ms p95; Check Recent (<10 s) runs at 60.0 ms p95.
Production impact
Guarantees causal ordering across out-of-band human coordination while keeping nearly all reads in-region.

Source: Pang et al. (2019), Sections 2 through 4.

If you prefer the short version without clicking through each tab, here is how those four mechanisms work together:

  • New enemy: content-change zookie tokens enforce T >= Tc on Spanner snapshots, letting ~99% of checks (Check Safe) read locally at 3.0 ms median without risking stale-ACL leaks.
  • Deep groups: Leopard trades Watch-stream denormalization (500 to 1.5K incremental writes/s) for O(min(|A|, |B|)) skip-list intersections under 150 microseconds median.
  • Hot object: coarse timestamp quantization, dual-sided caches, lock-table coalescing, and full-set prefetching shield Spanner behind 200M cache lookups/sec.
  • Tail spike: deferred hedging covers uniform Spanner and Leopard calls (1% hedged), while cpu-seconds quotas and isolated lock keys contain noisy clients.

Caveats and what changed after Zanzibar

Three engineering caveats keep Zanzibar’s architecture in proper perspective for teams building outside Google.

First, Zanzibar depends on Google-internal infrastructure that few organizations possess. Section 4.4 explicitly notes that Zanzibar runs on internal Google Spanner rather than public Cloud Spanner, relying on TrueTime hardware clocks and 5 voting replicas within 25 ms across three metro areas. Open-source ReBAC descendants such as SpiceDB and OpenFGA have had to replicate zookie semantics using CockroachDB, PostgreSQL MVCC transaction snapshots, or hybrid logical clocks, trading some cross-region write geometry for deployability.

Second, Leopard’s denormalization carries strict write-amplification limits. A single group-to-group tuple edit in Zanzibar can expand into tens of thousands of Leopard incremental index updates, and every Leopard serving instance must ingest the full Watch stream for those namespaces. That works cleanly when reads outnumber writes by two orders of magnitude (8.2M Read QPS vs. 25K Write QPS), yet breaks down on write-heavy ACL graphs where membership edges churn faster than incremental skip-list merging can absorb.

Third, Zanzibar intentionally stops at relationship graph authorization. It does not store object metadata or execute arbitrary attribute-based predicates over dynamic request context (such as IP geolocation, time-of-day windows, or billing quotas); clients must compose those checks alongside Check or Expand.

For backend engineers designing authorization today, the enduring takeaway is not “build a 10,000-server Spanner cluster.” It is the boundary contract: unify permissions as composable object#relation@user tuples, attach an opaque freshness token (zookie) to every content mutation so caches never apply yesterday’s permissions to today’s data, and separate normalized consistency from read-path acceleration only where deep hierarchies actually demand it.