Web servers, batch workers
One instance disappears, another appears, and traffic continues without anyone caring which execution answered.
Investigation 028 - Persistent State Principles
A failed cluster member is replaced. The replacement reconnects to the exact same durable state. Its peers still refuse to accept it.
Begin the investigation downPrologue
A distributed database runs three replicas. One fails unexpectedly. The platform notices, creates a replacement, and reconnects it to the surviving volume. Every byte is intact. From the platform's perspective, recovery is complete.
Persistent storage survives process failure and reattaches automatically.
Data surviving is sufficient for the cluster to accept the replacement.
The remaining replicas still expect the member that disappeared. They do not recognize the newcomer.
If nothing about storage, placement, or the interface has failed, what has the platform not yet provided?
First Principles
A process begins, performs work, and stops; the platform can destroy it and create another. A distributed database's replica does more than execute — it participates. The cluster remembers who joined, who leads, and who owns particular responsibilities, and those memories attach to a participant, not to whichever process happens to be running.
One instance disappears, another appears, and traffic continues without anyone caring which execution answered.
A notebook a newcomer carries may hold every decision recorded so far. It does not make the newcomer the participant who left the room.
The platform cannot distinguish a crashed member from a slow one. We assume a failed member has been safely identified; preventing two executions from sharing one identity is left to a later investigation.
Restoring bytes does not restore the relationships a cluster remembers.
Naive Architecture
The platform owns execution; the application owns meaning. When a process fails, start another and let it reconnect to the same durable volume. Whether it receives the same name, the same address, or is recognized by its peers is not the platform's concern.
The Architecture That Almost Worked
The replacement starts with exactly the files its predecessor left behind. No data is copied, nothing is recreated. For batch processors, web servers, and background workers — anything that only needs equivalent work to continue — this is not merely acceptable, it is ideal.
Data survives, placement respects storage topology, and any storage backend integrates through the same interface.
If the replacement has the same data, nothing else about the system should care who is running it.
The architecture fractures only when the replacement tries to rejoin peers who remember someone specific.
Breaking Our Design
Each experiment starts from its own clean state and stops at its assigned discovery.
Pressure. A member fails mid-operation. Its durable state is intact and owned. The platform replaces it anonymously, under a fresh name.
Prediction. If the data is correct, rejoining the cluster should be a formality.
Establish the original member and its owned durable state, fail its execution, replace it anonymously, then attempt to rejoin.
The replacement carries the correct data under a different name.
The remaining peers still consider the original participant missing and reject the newcomer.
Persistence is not participation. If peers require the same participant name to accept a return, the platform must guarantee that stable name.
Even with a stable name, can every peer still find where it currently runs?
Discoverability of the current address is not tested here.
Prediction: if the data is correct, rejoining should be a formality. Start the member to find out.
Pressure. The platform now guarantees a stable name for every replacement. This replacement starts on a different machine than its predecessor.
Prediction. A stable name should be enough for peers to find the replacement wherever it runs.
Move the stably-named replacement to a new address, send to its last-known address, then refresh the platform-derived mapping.
Messages sent to the old address never arrive; the name alone does not carry the current location.
A peer cannot tell whether the target is unreachable or mid-recovery while the mapping is stale.
A stable name must always resolve to the current address of its bearer; observations and mappings of that address may themselves be delayed.
With identity and discoverability both guaranteed, does replacement order still matter?
Recovery order and sequencing are not tested here.
Prediction: a stable name should be enough. Move the member to test that.
Pressure. A three-member quorum cluster needs to bootstrap. Identity and discoverability are already guaranteed for every member.
Prediction. With identity and discoverability solved, replacing all three members at once should recover the cluster fastest.
Attempt concurrent recovery of all three quorum members at once, then observe the bootstrap protocol.
No member has an established peer to bootstrap against, and quorum drops to zero before any replacement establishes itself.
The protocol's prerequisite for a sequenced start is violated; the cluster cannot confirm any replacement or make progress.
When protocol correctness depends on sequence, recovery order is an architectural constraint, not a scheduling preference.
What replaces anonymous, unordered recovery as the platform's contract? Chapter 07 formalizes the answer once all three experiments are complete.
The specific sequencing mechanism is not derived here.
Prediction: replacing all three at once should recover the cluster fastest. Test it.
The Turning Point
A process may fail. The logical participant must endure.
The Stable Identity Contract
The platform must preserve the continuity of every logical participant across process replacement — not merely the storage it depends on.
Replacing execution must never create a different logical participant.
Every peer must always be able to locate the current execution behind that stable identity.
When correctness depends on order, the platform must preserve that sequence rather than assuming independence.
Each logical participant must always reconnect to the persistent state that belongs to it alone.
The fourth responsibility is not a discovery earned in Episode 3. It is INV-025's per-participant storage ownership, inherited here and joined into identity continuity rather than newly derived.
Only Now: Kubernetes
Kubernetes realizes the identity continuity contract through StatefulSet, working together with a governing headless Service and per-Pod storage claims. Each replica receives a stable ordinal Pod name and a stable network identity, and the governing Service provides the DNS domain through which peers perform current discovery at a high level. Depending on how the workload is configured, Pods can start and terminate in an ordered, one-at-a-time sequence when the application requires it. volumeClaimTemplates give each ordinal Pod its own persistent volume claim rather than a claim shared across replicas.
Each Pod keeps its ordinal name and network identity across replacement.
A headless Service gives the set its DNS domain for locating each member's current address.
volumeClaimTemplates allocate a distinct persistent volume claim to each ordinal Pod.
StatefulSet does not make failure detection certain, does not fence duplicate identities from both believing they hold the same role, does not guarantee an application will accept a returning member, does not make DNS resolution instant or always current, and does not guarantee exclusive backend access to a volume. Ordered, one-at-a-time Pod management is a configurable default, not a universal guarantee — Pod management policy may permit parallel Pod management when the application allows it.
Engineering Reflection
Persistence answers what survives failure. Identity answers who returns after failure. A platform that preserves one without the other can recover data while still failing to recover the distributed system that depends on it.
Stateless services, batch processing, and interchangeable workers care that work continues, not which execution performs it. Identity continuity adds cost without improving correctness here.
Replicated databases, consensus systems, and message brokers assign durable responsibilities to individual members. Continuity becomes necessary, not optional, for these.
Replacements can no longer be treated as anonymous workers.
Correct ordering may take precedence over maximum recovery parallelism.
The platform must track participant continuity, not merely count running processes.
Replacing a participant too early risks two executions that both believe they hold the same identity.
Investigation Exercise
A database member returns with the same data but a different name. Predict whether its peers should accept it as the missing participant.
Compare that replacement with one that also preserves its name, its current discoverable location, and any required recovery order.
Notice that the bytes stored on disk never decided whether the cluster trusted the returning execution.
Ask what a platform must additionally guarantee once an application assigns durable responsibilities to named participants.
Bridge to INV-029
The platform no longer merely reconnects a replacement to surviving data.
It preserves a stable participant identity across process replacement.
It preserves discoverability of that identity's current execution.
It preserves the recovery sequence some distributed protocols require.
Kubernetes realizes this contract through StatefulSet, its governing Service, and per-Pod storage claims — yet the returning participant still may not know its intended role.
This investigation inherits desired-state reconciliation, explicit ownership, and architectural decomposition from earlier investigations. Raft and Paxos provide source-grounded examples of distributed protocols whose safety and progress depend on remembered participants and quorum membership rather than anonymous process replacement. Kubernetes StatefulSet is one realization of the broader continuity contract derived here; this investigation does not claim that StatefulSet invented stable participant identity.