Why Reliable Systems Need Just Enough State to Stay Honest

Jaeyeol Lee

Hatched by Jaeyeol Lee

Jul 16, 2026

10 min read

88%

0

The Hidden Cost of Making Things Simple

What if the biggest mistake in experimentation and networking is the same mistake in disguise: pretending a system can stay purely stateless when reality demands memory?

That question sounds abstract, but it shows up everywhere. In product experimentation, we like to imagine that a test can run cleanly, with users split into groups and results read off like a laboratory instrument. In networking, we like to imagine packets traveling from point A to point B without complication, as if the path itself were a neutral tube. But both domains eventually collide with the same uncomfortable fact: the world is not obligated to remember what you intended.

When a system forgets too much, it becomes fast but blind. When it remembers too much, it becomes fragile and heavy. The real art is not choosing between state and no state. It is deciding what must be remembered, where, and for how long.

That is the deeper connection between experiment design and packet routing. Both are about preserving meaning across uncertainty.


Stateless Idealism Meets Messy Reality

There is an elegant appeal to stateless design. A stateless system seems easier to scale, easier to reason about, and easier to recover after failure. If every request can stand alone, then any node can handle it, any packet can be routed, any test can be evaluated without history.

But statelessness is often a storytelling device, not a truth. It hides the work being done elsewhere. A network packet may appear to move independently, but someone has to know where it belongs when the reply comes back. That is why translation devices maintain tables that map local tuples to public ones. The packet itself does not carry the full story, so the network creates a memory layer around it.

The same thing happens in experiments. A/B testing looks simple when you describe it as split traffic, compare outcomes, choose winner. Yet the moment the experiment touches real users, the environment introduces memory everywhere: cookies expire, devices change, sessions reconnect, users share links, and traffic is rerouted. If your assignment logic or measurement logic forgets who saw what, your experiment becomes a conversation with missing nouns.

The lesson is not that state is bad. The lesson is that state is inevitable, and the real question is whether it is explicit, minimal, and trustworthy or accidental, bloated, and contradictory.

The most dangerous systems are not the ones with state. They are the ones that deny having state while depending on it everywhere.

A product team that believes its test is purely randomized may ignore assignment leakage. A network engineer who treats UDP as “just packets” may forget the translation tables, session mapping, and failure modes that make replies possible. In both cases, the danger begins when the system’s hidden memory stops matching the user’s mental model.


The Paradox of State: Memory Creates Reliability, Then Breaks It

State is a paradox because it solves the problem it creates.

Without state, a system cannot remember enough to preserve continuity. With state, a system can preserve continuity, but now it must protect, synchronize, expire, and repair that memory. That is exactly why NAT devices are such a revealing example. They make communication possible across address scarcity, but they do so by maintaining tables and rewriting source information on every packet. The network becomes workable by storing a little truth about each flow, then carrying that truth forward.

Experiments have the same shape. To know whether a change caused improvement, you need memory of exposure. Otherwise, you are just observing a pile of outcomes with no causal bridge. But once you keep that memory, you inherit new risks: contamination, inconsistent assignment, delayed conversion, novelty effects, and sample ratio mismatch. Your test is no longer just a measurement. It is a living process that must preserve identity over time.

This suggests a useful framework: state is not a binary choice, it is an accounting problem.

Ask four questions:

  1. What must be remembered? Not all memory matters. A network translator needs enough information to route replies. An experiment needs enough information to connect exposure with outcome. More memory than this becomes clutter.

  2. Where should memory live? In the client, in the edge layer, in a database, in logs, in a cache, or in an external coordinator. Placing memory in the wrong place creates brittleness. If the memory is too close to the user, it can be manipulated. If it is too far away, it can drift or lag.

  3. How long should memory survive? UDP translation tables time out. Experiments have assignment windows. Memory that lasts too short breaks continuity. Memory that lasts too long leaks old assumptions into new contexts.

  4. What happens when memory disagrees with reality? This is the failure mode everyone underestimates. A stale table, a broken cookie, a double assignment, a mismatched session, these are not just technical glitches. They are contradictions between the system’s remembered story and the present world.

This is where experimentation and networking become philosophically identical. Both are systems that must reconstruct meaning from fragments. Packets do not say, “I am the reply to that request.” Users do not say, “I belong to the treatment group forever.” The system has to maintain enough state to connect the dots, then constantly verify that the dots still belong together.


A Better Mental Model: The Ledger, Not the Box

Most people picture systems as boxes with inputs and outputs. That model is too static for both networking and experimentation. A better model is a ledger.

A ledger records relationships over time. It does not merely store objects, it preserves commitments: this packet belongs to this flow, this user was assigned to this variant, this conversion can be attributed to that exposure. The ledger is what makes distributed action coherent.

This framing changes how you design. Instead of asking, “Can we make it stateless?” ask, “What ledger entries are required for truth?”

For a network flow, the necessary ledger entry might include source port, source address, destination address, and a timeout. That is enough to map a reply back to the correct origin. For an A/B test, the ledger entry might include user identifier, assignment variant, timestamp, and experiment version. That is enough to tie behavior to exposure without overfitting the past.

A ledger mindset also clarifies why hidden state is so risky. Hidden state is an unofficial ledger. It still influences outcomes, but no one has audited its rules. That is how you get bizarre bugs like a user appearing in two variants, or a reply packet dying because its translation entry expired a moment too soon.

Consider a restaurant analogy. If the kitchen only accepted anonymous tickets and never remembered which meal belonged to which table, service would collapse. But if every order were memorized forever, the kitchen would drown in old tickets and stale assumptions. Good service depends on a ledger with a careful scope: enough state to route the right plate to the right table, and no more.

This is the hidden discipline behind both good infra and good experimentation: make the minimum memory that keeps identity intact.

Reliability is not the absence of state. Reliability is state with boundaries.


The Real Design Challenge Is Boundary Management

Once you see state as a ledger, the design problem becomes boundary management.

Boundaries answer: when does one unit of meaning begin and end? In networking, a flow boundary is often defined by address and port tuples plus timeout rules. In experimentation, a unit boundary is often defined by a user, session, device, or account, depending on what outcome you care about. If you choose the wrong boundary, the system may still run, but the meaning becomes corrupted.

This is why experimentation mistakes often look like networking bugs. Both are boundary failures.

If assignment happens at the wrong level, one human can be exposed through multiple devices or one device can represent multiple humans. That is like rewriting packets with a translation table that is too coarse or too narrow. The routing still “works,” but replies may go to the wrong place. Outcomes still appear in dashboards, but they no longer mean what you think they mean.

Boundary management has three practical dimensions:

  • Identity: what entity are we tracking?
  • Continuity: how do we recognize the same entity over time?
  • Expiration: when should old identity stop counting?

A good system makes these explicit. A weak system smears them together. For example, using a browser cookie as the sole basis for experiment assignment may be easy, but if the cookie is deleted, shared, or blocked, continuity breaks. Using only IP-based routing may be simple, but NAT can collapse many users into one public address, making identity ambiguous. In both cases, the boundary marker is convenient, but not always truthful.

That is the deeper engineering lesson: your state model is only as good as the boundary assumptions underneath it.

If the boundaries are wrong, adding more cleverness does not fix the issue. It only hides the contradiction longer.


What This Means for Builders

The temptation in modern systems is to pursue elegance by removing memory wherever possible. But the more useful goal is to move from implicit memory to intentional memory.

That means designing state as if it were part of the interface, not an implementation detail. It means being honest about what must survive a retry, a page reload, a network hop, or a delayed conversion. It means choosing the smallest state that can still preserve meaning under real-world failure.

In practice, this gives you a different way to think about both infrastructure and experimentation:

  • A packet is not just data, it is a relationship waiting to be reconstructed.
  • A variant is not just a page, it is an assignment that must remain attributable.
  • A timeout is not just a cleanup rule, it is a claim about how long truth remains valid.
  • A rewrite is not just a technical trick, it is a promise to preserve identity across a transformation.

This perspective also helps explain why so many systems fail at the edges. Inside the happy path, state seems harmless. Under load, delay, retries, browser quirks, NAT behavior, or cross-device behavior, the hidden ledger starts to show its seams. The failures are not random. They are the price of pretending continuity does not need memory.

The goal, then, is not to eliminate all state. The goal is to make state legible, bounded, and testable.


Key Takeaways

  1. Do not ask whether a system is stateless. Ask what state it is already carrying. Hidden memory is usually the most dangerous kind.

  2. Treat state as a ledger of identity and continuity. The important question is not storage, it is whether the system can reliably reconnect cause and effect.

  3. Define boundaries explicitly. Know what constitutes one user, one flow, one session, or one experiment unit, and when that identity expires.

  4. Minimize memory, but do not oversimplify it. Keep only the information required to preserve meaning across uncertainty.

  5. Design for contradiction detection. Assume the remembered story will eventually diverge from reality, and build checks that reveal the mismatch early.


Conclusion: The Best Systems Remember Just Enough

The deepest insight connecting experiment design and network routing is not technical, it is epistemic. Both are attempts to preserve truth while the world keeps moving. Both fail when they forget too much, and both become brittle when they remember carelessly.

So the next time a system is praised for being simple, ask a harder question: simple for whom, and at what cost? If the answer depends on hidden tables, fragile cookies, stale assignments, or implicit assumptions about identity, then the simplicity is cosmetic.

Real robustness comes from a more mature discipline: keep just enough state to remain honest.

That is true of packets. It is true of experiments. It is true of any system that wants to make sense of a changing world without losing track of what happened before.

Sources

← Back to Library

Hatch New Ideas with Glasp AI 🐣

Glasp AI allows you to hatch new ideas based on your curated content. Let's curate and create with Glasp AI :)

Start Hatching 🐣