skip to content

How would you find out which entries in a running volatile tier could not be regenerated if it emptied?

level: seniorimportance: should knowfreq 58%

answer

  1. classes, not individual entries
  2. start from the writers
  3. what regenerates this, and at what cost?
  4. three answers, not two
  5. the dangerous middle: re-derives differently

basics

~20 s

Go class by class, not entry by entry: for each writer, name what produces the value again. Three outcomes — a system of record does, nothing does, or something does but not the value that was there.

solid answer

~50 s

You cannot answer this one entry at a time, and you should not try. Work by entry class, and take the list of classes from the code paths that write to the tier, because those are authoritative; a listing of what happens to be in the tier is the cross-check that finds classes the writers list missed, such as retired features, operators, or another service sharing the tier. For each class, ask one question: if this entry disappeared between two requests, what produces the value again and at what cost? There are three answers. A system of record does, and the class really is a derived copy. Nothing does, and the tier is the sole home for that fact. Or something nominally does, but not the value that was there — which is the answer reviews miss, because they ask whether a database exists behind it, hear yes, and stop.

go deeper

for a junior

The question to carry away is a short one: for anything in the tier, who else has this? If the only honest answer is the tier itself, that is worth saying out loud to whoever owns the design.

for a middle

Practise splitting a tier into entry classes by writer and naming what regenerates each. Be able to explain why a value accumulated inside the tier is different in kind from one copied out of a system of record.

for a senior

Show the method and the cross-check: writers first, live contents second, and the disagreement between them as the finding. Name the middle case — a source exists but re-deriving yields a different value — because that is where real incidents come from.

for a principal

Make the audit repeatable rather than heroic: a standing rule that every entry class names what regenerates it, enforced at review, plus an owner for the table. Decide what the organisation does with a class whose answer is nothing.

## Why class by class, and not entry by entry A running tier holds far too many entries to reason about individually, and the property you are looking for is not a property of entries anyway — it is a property of the code that writes them. Two entries with adjacent keys can have completely different answers, while a million entries written by one function all share one. So the unit of the audit is the **entry class**: one writer, one naming scheme, one meaning. This matters because the usual failure of this audit is granularity. Asked "is the tier safe to lose?", people answer for the tier as a whole, and the tier as a whole is almost always a mixture. ## Getting the list of classes Two sources, in this order: 1. **The writers in the code.** Every place that puts something into the tier defines a class. This list is authoritative about intent, and it is the list you can keep current as the system changes. 2. **What is actually present in the tier**, as a cross-check. It regularly turns up classes the first list missed: a retired feature still writing, an operator's manual entries, a batch job, or another service that shares the tier and was never part of your review. (How you walk a live keyspace safely is its own subject; here the point is only that the two lists disagree, and the disagreement is the finding.) Where the two lists differ, the difference is the interesting part — not an error in the audit. ## The one question, and its three answers For each class, ask: **if this entry vanished between two requests, what produces the value again, and what does producing it cost?** | Answer | What the class actually is | What to do | |---|---|---| | A system of record produces it | A derived copy; the precondition holds | Record the rebuild cost and move on | | Nothing produces it | The tier is the sole home for that fact | Decide deliberately: give it a home, accept the loss, or remove the class | | Something produces a value, but not that value | The dangerous middle | Treat it as the second case until proven otherwise | The third row is the one that gets missed, because the review question is usually phrased as "is there a database behind this?" — which gets a yes, and stops the conversation one question early. ## What lives in the dangerous middle - **Accumulated values.** A counter or running total that grew inside the tier was never computed from stored state, so there is nothing to compute it from now. The source can tell you what it is today only if it independently recorded every increment, which is usually the very thing the tier was introduced to avoid. - **Derivations over inputs that have moved on.** The source rows still exist, so the review says derivable; but re-running the derivation today produces a different value, because the inputs changed, were corrected, or were deleted. If anyone acted on the old value, the new one is not a replacement. - **Values obtained from a third party.** Derivable, at a price — a rate limit, a per-call charge, or a contract that does not allow bulk re-fetching. Derivable once is not the same as derivable for every entry at once. - **Values that were expensive to produce the first time.** A derivation that takes minutes per entry is technically reconstructible and practically unavailable during an incident. - **Results of a non-repeatable decision.** Anything assigned rather than computed — an ordering chosen at write time, a randomised assignment, a generated identifier — cannot be regenerated, only invented again differently. ## Writing the answer down where it survives The output of this audit is not a verbal reassurance; it is a small table that lives with the design and is checked when a class is added: 1. **Entry class** — the naming scheme and what the entries mean. 2. **Writer** — the code path or the person that creates them. 3. **What regenerates it** — a named system of record, or the word nothing. 4. **Cost to regenerate** — per entry, and for the whole class at once. 5. **What is lost if it is not regenerated** — stated in terms a product owner recognises, not in terms of keys. A class whose third column is blank is the finding. Not a defect to fix on the spot — it may be an entirely legitimate use of the tier — but a decision somebody has to make on purpose, rather than a fact discovered during an incident. ## How this shows up in an interview The weak answer inspects the tier and reports what is in it. The strong answer says: I would list the writers, ask of each class what regenerates it and what that costs, cross-check against what is actually present, and expect the mixture — some genuinely derived, some with nothing behind them, and a third group that looks derivable until you ask whether re-deriving yields the same value.

  • Why is a listing of what is currently in the tier not enough on its own?
    It shows what exists, not what produces it, and it is a snapshot of a moving population, so classes written rarely may be absent at the moment you look. It earns its place as a cross-check against the writers list, where the disagreement between the two is the actual finding.
  • A class has a source, but re-deriving it now gives a different value. Is the precondition satisfied?
    Not for any purpose that depended on the old value. Treat it as a class with nothing behind it until someone shows the difference is harmless. The common cases are derivations over inputs that were corrected or removed, and values assigned at write time rather than computed.
  • The tier is shared by several services. How does that change the audit?
    The list of writers is no longer inside one codebase, so your team's answer covers only its own classes. Another team's class with nothing behind it changes what an outage of the shared tier means for everyone, which makes the audit an organisational artefact rather than a service-level one.

saying these in an interview costs you the question

  • Audits the tier as a whole instead of class by class.
  • Accepts a source exists without asking whether it yields the same value.
  • Believes a counter accumulated in the tier can be recomputed later.
  • Treats derivable once as derivable for every entry at once.
  • Keeps the conclusion in someone's head rather than in a reviewable table.