Stuck Clusters and Quantum-Proof Keys · Morning Gist
Saturday, October 242 stories · 7 min
Stuck Clusters and Quantum-Proof Keys
Real traces show Postgres and etcd getting stuck after brief load spikes, and Cloudflare rebuilds its region-locked key manager for a post-quantum world.
Picked from 65 new articles across 34 sources · arrow keys for other days
Today in 30 seconds
30s left
Marc Brooker's traces show short load spikes leaving Postgres and etcd stuck in degraded states long after the load has passed. story 1 ↓
He finds three separate feedback loops, including a Raft cluster where one node lying about fsync can lose writes. story 1 ↓
Cloudflare's new GeoKey Manager drops attribute-based encryption in favor of per-region symmetric root keys and hybrid ML-KEM/X25519 key wrapping. story 2 ↓
Its design separates key distribution from key access, ties secrets to hardware identity and fails closed. It's in closed beta, with general availability planned for Q1 2027. story 2 ↓
Brooker uses real traces to show metastable failures in Postgres and etcd
Marc Brooker made animations from traces of real Postgres and etcd test runs. In each, a short load spike pushes the system into a slow state that keeps going after the spike ends. That kind of failure is called metastable.
Why it matters · Engineers often say metastable failures are theory, or that mature software has already shaken them out. These traces show three distinct feedback loops in widely used systems you probably run.
Know this first
Context from the editor, not the article · 36 sec
1 · What metastability means
A metastable failure happens when a short trigger, such as a load spike, pushes a system into a bad state that keeps itself going after the trigger is gone. Some feedback loop, like retries, cache loss or garbage collection, keeps the work per request high, so the system can't recover without help.
2 · Raft and fsync
Raft is a consensus protocol. A write counts as committed once a majority of servers say it is durable on disk. Servers make data durable by calling fsync(), which should return only after the data is safely stored. A storage layer that returns early is lying about durability.
3 · Brooker's earlier work
2/2Cloudflare· Chetan Agrawal· Oct 23
Cloudflare rebuilds region-locked key manager with post-quantum key wrapping
Cloudflare redesigned GeoKey Manager, which ensures customers' private keys can only be decrypted on servers in a chosen region. Keys are wrapped with quantum-resistant encryption and copied worldwide, but only servers inside the region hold the root keys that unwrap them.
Why it matters · The design shows how to split key distribution from key access, gate secrets on hardware identity, fail closed, and plan rotation, all on a fleet whose membership changes every day.
Know this first
Context from the editor, not the article · 33 sec
1 · Harvest now, decrypt later
Public-key schemes like RSA and elliptic-curve Diffie-Hellman could be broken by a large quantum computer. An attacker can record encrypted traffic today and decrypt it years later. Data that must stay secret for decades therefore needs post-quantum protection now, not once quantum machines exist.
2 · Key wrapping
Wrapping means encrypting one key with another. A wrapped private key can be copied anywhere safely, because it is useless without the unwrapping key. Control over who holds the unwrapping key becomes control over where the private key can be used.
Marc Brooker is an AWS engineer who blogs about distributed systems. He previously built Stability Sim, a simulator of metastable behavior, and wrote a post arguing that garbage collection can cause metastability. This post adds evidence from real systems.
Marc Brooker has published animations built from traces of real test runs. Each one shows a widely used system getting stuck in a 1: a short load spike pushes it into a degraded state that continues after the spike is gone. He made them because engineers still doubt these failures happen in "production-proven" software. One well-known academic called his earlier post on garbage collection and metastability "a fantasy".
Postgres: the cache shrinks
Postgres 16 runs in a 2, a lightweight virtual machine, and handles 20 queries per second easily. Its whole 3 sits in the operating system's 4, which holds recently read file data in RAM. After a spike, many queries are running at once, each using about 12 MB, and they push data out of the cache. Queries now read from disk, so they run longer. Longer queries pile up, use more memory, and shrink the cache further. No distribution is involved, just one database on one machine.
5: retries
etcd is a key-value store built on the 6 consensus protocol. A write spike overloads its peers until they look unavailable, and the application starts resending requests. The resends keep the peers overloaded. Brooker argues that years of operational experience haven't shaken this out of good software.
etcd: garbage collection
At 500 reads per second etcd is healthy. When load spikes to 1,000, etcd, which is written in Go and uses a garbage collector, spends more time in GC. Requests take longer, so their objects live longer, and the collector has more to deal with. That takes CPU away from reads, which slows requests further. The loop doesn't break without someone stepping in. Brooker suspects allocator work could cause the same loop in languages without GC, but he hasn't reproduced it.
Raft and a lying disk
He also animates a Raft cluster losing writes because one member's storage returns from fsync() before data is actually on disk. The text doesn't explain how; the standard reasoning goes like this. In a three-node cluster, the leader and the lying node both report a write as durable, so it counts as committed. If the liar crashes and comes back without the entry, and the leader then fails, the two remaining nodes still make a majority and can elect a leader that never had the write.
Caveats
Brooker generated the animations with Kiro and KiroCrew, which are AI coding tools. The behaviour comes from real traces. The text gives few numbers, no information on the test setup, and no mitigations.
Marc Brooker has published a set of animations, each one built from traces of real software running in a test environment. Every animation shows a well-known system failing in a way many engineers think only happens in theory. Three cover 1: two in 2, a key-value store built on 3, and one in Postgres. A fourth shows a Raft cluster losing writes because one member's storage lies about fsync(). The post is short and the videos carry most of the detail, so the text gives fewer numbers than you might want. What it does give is enough to identify each feedback loop.
Why bother proving this
Brooker built Stability Sim earlier to teach metastable failure in the abstract. He says it got one lesson across: retries and queues make metastability easy to trigger. But he still hears a common objection. Real systems are production-proven, so if these behaviours existed, wouldn't operators have found them by now? He also says that after his earlier post on garbage collection and metastability, a well-known systems academic told him the idea was "a fantasy". Brooker says he has seen it happen in production but couldn't share the details, and he admits the original post was mostly hand-waving. Traces from real software are his answer to that objection.
Postgres: losing the 4
The first example runs Postgres 16 inside a 5, a small, lightweight virtual machine. Before the spike, the database handles 20 queries per second easily, because its whole 6 (the data the queries touch) sits in the operating system's page cache, which keeps recently read file data in RAM.
Then a load spike arrives. Each running query uses about 12 MB of memory, so many queries running at once take memory away from the page cache. With less cache, queries read from disk and run more slowly. Slower queries stay in flight longer, so more of them pile up at the same arrival rate. That uses more memory, which shrinks the cache further. The loop keeps going after the spike ends. If 20 queries per second each held 12 MB for a few milliseconds, they would need little memory. If each now takes seconds, hundreds of megabytes stay tied up. (Those durations are illustrative. The article doesn't give them.)
Brooker likes this example because there is nothing distributed about it. One database on one machine is enough.
etcd: overload that looks like an outage
In the second example, a spike in writes overloads etcd's peers until they look unavailable to clients. The application then resends its requests. The resends add load to nodes that were already too slow, which keeps them looking unavailable. This is the classic retry storm. Brooker's point is that etcd is widely used, well-regarded software, yet "operational experience doesn't seem to effectively shake out these kinds of issues."
etcd: garbage collection as the loop
The third example backs his earlier GC argument. etcd is written in Go, which uses a garbage collector. The run starts at 500 reads per second and then spikes to 1,000. Brooker describes a self-reinforcing loop:
More load means more allocation, so the garbage collector runs more.
Requests take longer, so their objects live longer. Brooker calls this an increase in "7", and it means more live memory the collector has to deal with.
GC takes CPU that would otherwise serve reads, so requests slow down further, and step 2 gets worse.
The system "doesn't recover without intercession": someone has to cut load or restart it. Brooker suspects a language without GC could show the same loop through rising allocator work, but says he hasn't reproduced that yet.
Raft losing writes over one lying disk
The post opens with the claim that a Raft cluster can lose writes if even one member's storage lies about fsync(). The text doesn't walk through the mechanism, so here is the standard reasoning (general knowledge, not taken from the article). Take three nodes, A, B and C. Leader A sends an entry. A and B report it as durable, which makes a majority, so the entry is committed and the client gets success. But B's disk only pretended to sync. B crashes and comes back without the entry, and then A fails. B and C still make a majority. Neither has the entry, so one of them can win the election and overwrite that log position. A write the client was told succeeded is now gone. Raft's safety proof assumes acknowledged writes survive crashes, and one node breaking that assumption is enough to break the guarantee.
How the animations were made
Brooker says he generated the animations with Kiro and KiroCrew, AI coding tools, mostly using Opus 5.5. The underlying behaviour comes from the real test environment, which captures the traces the animations replay. He presents animation as a way to build intuition for why systems work and why they fail. The article doesn't describe the test harness, the hardware, how long each run lasted, or how recovery was finally triggered.
What stays open
The post gives two or three numbers per example and no latency or throughput curves in the text. It doesn't say how big a spike each system needs before it tips over, and it doesn't cover mitigations such as retry budgets, admission control or memory limits on queries. The allocator version of the GC loop is still unproven, by Brooker's own account. What the post does establish is narrower but useful: these loops happen in ordinary configurations of software many teams already run.
Remember
Metastability doesn't need a distributed system. A single Postgres instance can lose its page cache to query memory and stay slow.
In garbage-collected runtimes, slower requests mean longer-lived objects, more GC work and less CPU, a loop that sustains itself.
Raft's safety assumes acknowledged writes are durable. One node with lying storage is enough to lose committed data.
Cloudflare runs an anycast network, so the same address is served from data centers worldwide and config gets replicated everywhere. Regulations such as EU rules can require that some data is decrypted and processed only inside one jurisdiction. That clashes with global replication.
Example key hierarchy: customer keys grouped by service and region under shared application keys.1 / 4
Cloudflare has put a post-quantum version of GeoKey Manager into closed beta, with general availability planned for Q1 2027. GeoKey Manager is part of the 1, Cloudflare's data-sovereignty products. It ensures a customer's private keys can only be unwrapped, and so only used to decrypt traffic, by servers in a region the customer picks. It launches first for Cloudflare One, the company's corporate security suite. CDN support comes later.
The problem
Cloudflare wants to replicate configuration everywhere for availability. Sovereignty rules want decryption confined to one jurisdiction. Customers with long-lived secrets also want protection from harvest now, decrypt later, where ciphertext recorded today is broken by a future quantum computer.
Why ABE was dropped
The 2022 version used 2, which encrypts keys under policies like "region = EU". No production-ready post-quantum ABE scheme exists, and customers need only a few regions. So Cloudflare moved to a simpler hierarchy:
A regional root key: a 256-bit symmetric secret per region and 3 (rotation generation).
An application-specific key pair derived from that root for one service, such as Tunnel or Gateway.
The public half wraps customer private keys using 4 (Hybrid Public Key Encryption, RFC 9180). The key exchange combines 5, NIST's post-quantum standard, with classical 6. It stays secure as long as either one holds.
Separate paths for ciphertext and keys
7, Cloudflare's global config system, sends wrapped keys everywhere but never sees root keys. Root keys go through a separate provisioning service, backed by an on-premises Vault. A server gets root keys only after three checks. A 8 (hardware security chip) proves its identity. 9, the server inventory, maps that identity to a location. The provisioning service then decides which regions' keys it may hold.
Keys live in the Linux 10, never on disk, so a reboot means provisioning again. A Spanish server can hold a Germany-wrapped key but can't open it.
Failing closed
The edge key service won't start if a required root key is missing or malformed. Any request whose region, service or epoch check fails is rejected, never unwrapped out of region. Region membership is refreshed several times a day, and servers cache keys until a restart or cache expiry.
Leaking a Tunnel-Germany application key exposes only Tunnel keys in Germany. Leaking the Germany root key exposes every Germany key in that epoch. Soft rotation adds a new epoch and keeps a limited number of old ones usable. Hard rotation rewraps keys so old epochs can be revoked.
Caveats
Central services can see all root keys, so the guarantee covers where keys are used, not whether Cloudflare can reach them. Routing and inspection locality belong to other systems. The post gives no performance numbers.
Cloudflare has launched a closed beta of a post-quantum version of GeoKey Manager, part of its 1 (DLS), the company's set of data-sovereignty products. GeoKey Manager guarantees that a customer's private keys can only be unwrapped, and so only used to decrypt traffic, by Cloudflare servers inside a region the customer chooses. General availability is planned for Q1 2027. The first integration is Cloudflare One, the company's corporate-network security suite (Access, Gateway, Tunnel and the client). CDN support will follow later as a separate integration.
The problem
Two requirements pull in opposite directions. For availability, Cloudflare wants to replicate customer configuration, including key material, across its whole global network. Sovereignty rules say some traffic may only be decrypted inside a particular jurisdiction. On top of that, customers handling long-lived secrets worry about harvest now, decrypt later: an adversary stores ciphertext today and breaks the classical public-key encryption once quantum computers can.
How the design got here
The first GeoKey Manager, in 2017, tied TLS keys to a fixed set of data centers. TLS is the protocol that encrypts web traffic. In 2022 Cloudflare switched to ciphertext-policy 2. With ABE, a key is encrypted under a policy such as "region = European Union", and any server holding matching attributes can decrypt it. New servers could join a region without every customer key being re-encrypted.
No production-ready post-quantum ABE scheme exists, though. Cloudflare also notes that customers don't need many regions. So it chose a simpler two-level hierarchy:
A regional root key: a 256-bit symmetric secret tied to one region and one 3 (a generation number that increases with each rotation).
An application-specific key pair derived from that root for one service context, such as Tunnel or Gateway.
The application public key wraps the customer's private key. The derived private key unwraps it. Wrapping uses 4 (Hybrid Public Key Encryption, RFC 9180). Its key-encapsulation mechanism (KEM, the step that establishes a shared secret using a public key) combines 5, the NIST-standardized post-quantum KEM, with classical 6. HKDF-SHA-256 handles key derivation and AES-256-GCM handles authenticated encryption. The hybrid stays confidential as long as either component holds, which hedges against a flaw in the newer post-quantum algorithm.
The blast radius, by example
Every wrapped key carries metadata: service context, regional boundary and epoch. Keys sharing all three share one application key pair. In the article's example:
Key
Service
Region
acme0001
Tunnel
Germany
acme0002
Gateway
Germany
runner0001
Tunnel
Germany
runner0002
Gateway
EU
Leaking the Tunnel-Germany application private key exposes acme0001 and runner0001, but neither Gateway key. Leaking the Germany root key for that epoch exposes acme0001, acme0002 and runner0001. runner0002 sits under the EU root and is unaffected.
Two distribution paths
The key idea is that ciphertext and the keys that open it travel separately.
7, Cloudflare's global configuration-distribution system, pushes wrapped private keys and their metadata everywhere. It never sees root keys, so it sits outside the trust boundary.
Regional root keys follow a separate path. The key management service creates them when an admin configures a region, then hands them to a provisioning service. That service stores them in Vault (HashiCorp's secrets store), which Cloudflare runs on-premises.
An edge server gets root keys only after the provisioning service checks three things:
A 8 (Trusted Platform Module, a hardware security chip) proves the server has a registered hardware identity.
9, Cloudflare's server inventory, maps that identity to a data center and location.
The provisioning service decides which regional root keys that location may hold.
If the checks pass, the server gets a token that lets it fetch only its authorized root keys. It loads them into the Linux 10, which is in-memory storage, never on disk. Process-level access controls limit which services can use them. A reboot wipes the keys and forces the server to authenticate again. Cloudflare accepts that operational cost so that no persistent key material sits on disk for an attacker to steal.
To wrap a key, the key management service looks up the root key and latest epoch for the requested region, derives the application key pair, and wraps with the public half. To unwrap, an edge key service needs the regional root key for that region and epoch, plus the service context. A server in Spain therefore holds a perfectly good copy of a Germany-wrapped key and still can't open it. The article's section on unwrapping is only a diagram, so the exact per-request steps aren't spelled out in text.
Failing closed
The edge key service won't start if any root key its configuration requires is missing or malformed. After startup, a request whose metadata points to a root key that isn't available locally is rejected. It is never unwrapped somewhere else. The same applies if the service context, region or epoch check fails. A server serves a region only once provisioning is complete. Cloudflare presents this as a deliberate choice of correctness over availability: a misconfigured server drops requests rather than decrypting out of region.
Membership changes and rotation
Regions are not static, because data centers are added, maintained and decommissioned. Zinc updates membership asynchronously, and the provisioning layer refreshes it several times a day. When membership changes, it syncs the server's kernel keyring right away. The edge key service caches keys in process memory until it restarts or the cache expires, then reloads from the keyring. This means a server removed from a region may keep its cached keys for a while. The article doesn't say how long that window is.
Rotation comes in two forms, separate from membership changes:
Soft rotation creates a new epoch. New keys are wrapped under it, while a limited number of previous epochs stay usable (one is the article's example), so service continues during the transition. Cloudflare compares this to a card issuer that honors your old card for existing recurring payments.
Hard rotation rewraps the affected customer keys under a replacement epoch so access to the old epoch can be revoked completely.
What's left open
The trust boundary covers the key management service, the provisioning service and every authorized edge key service. The central services can see every region's root keys, so the guarantee is about where keys are used, not about Cloudflare being unable to access them. GeoKey Manager also controls only where keys unwrap. Routing, tunnel termination and traffic inspection belong to other systems (Regional Services), though all of them depend on it. The post gives no performance figures, such as the latency cost of hybrid KEM unwrapping, and no rotation schedules.
Remember
Separating where ciphertext is stored from where unwrapping keys are held turns global replication into region-limited access.
Cloudflare dropped flexible attribute-based encryption because no post-quantum version exists; a simple per-region hierarchy was enough.
Keys are shared per service, region and epoch, so the blast radius of a leak is explicit and bounded.