skip to content

In-memory store concepts

9 roadmaps252 questionsupdated

The volatile tier as a component you run: what it holds, what it drops under pressure, what it loses on a restart, and what one round trip costs. Not one product's command set.

on this pageshow

guide

overview

~1 min

Questions about in-memory stores are rarely about one product's commands. Interviewers use them to find out whether you treat the volatile tier as a component with its own failure modes: what happens when it fills up, when it restarts empty, when two callers touch the same entry, and when one request quietly makes hundreds of network crossings. A candidate who says "just keep it in memory" gets follow-ups until the cost surfaces; a candidate who names the loss, the limit and the round trip first gets the harder and more interesting questions. The subject splits into four groups. The first is placement: [the volatile tier](/topics/db-in-memory-concepts-tier) itself, what it is for and when a design is better off without one, and the [ephemeral state workloads](/topics/db-in-memory-concepts-workloads) such as sessions, leases, quotas, deduplication records and live fan-out that live there with no other copy. The second is the data model: [server-side value shapes](/topics/db-in-memory-concepts-value-shapes), [keyspace design](/topics/db-in-memory-concepts-keyspace) and [expiry semantics](/topics/db-in-memory-concepts-expiry). The third is the resource limit and what survives a restart: [the memory ceiling](/topics/db-in-memory-concepts-memory) and [durability options](/topics/db-in-memory-concepts-durability). The fourth is running the tier under load and at scale: [atomicity and concurrency](/topics/db-in-memory-concepts-atomicity), [the access cost model](/topics/db-in-memory-concepts-access), [spreading the tier](/topics/db-in-memory-concepts-distribution) across nodes and regions, and [operating it](/topics/db-in-memory-concepts-operations) in production. Start with the tier's roles, because nearly every later answer turns on whether the entry in question is a copy or the only copy. Then learn the access cost model, since round trips explain most latency questions, and the memory ceiling, where expiry and eviction are the pair candidates most often blur together. Questions run from a junior explaining why an entry disappeared early to a principal reasoning about failover, split brain and loss windows across regions.

primer

A few ideas carry the whole subject. With them in place, most questions below become applications rather than facts to memorise. - **Copy or only copy decides most answers.** An entry is either derived from something a durable store still holds, or it is the state itself. A derived entry can disappear at any moment and cost a reload; an entry with no other copy turns every eviction, restart and failover into lost data. Say which kind of entry you are holding before arguing about policy. - **The crossing usually costs more than the work.** The server's effort on a lookup is small next to the time a request spends travelling to it and back, so crossings, not server work, are what a design should count. That is why partial updates, batched calls and pooled connections matter more than raw server speed. - **Memory is a wall with a configured response.** A disk store tends to slow down as it fills; an in-memory store reaches a hard limit. What happens at that limit is a setting, and per-entry overhead means the limit arrives earlier than payload arithmetic predicts. - **Two mechanisms remove entries nobody deleted.** A lifetime is something the application asked for; eviction is something the store does under pressure. They follow different rules, show up in different metrics and cause different bugs, so be explicit about which one a design depends on. - **Atomic operations do not make a sequence atomic.** A single operation runs without interleaving, but reading in one call and writing in another leaves a gap. Server-side arithmetic, grouped operations, version-checked writes and logic run on the server each close that gap at a different price, and none of them is a transaction with rollback. - **Durability and replication narrow a window; they do not close it.** Snapshots, write logs and replicas each shrink what a crash can take, but a write is commonly acknowledged before it is safe anywhere else. State the loss window instead of calling the tier persistent or replicated.

Volatile tier
A store that keeps its data in memory and may lose it on restart, pressure or failover, so the design must stay correct when an entry is missing.
Derived entry
An entry that can be rebuilt from a durable source; losing it costs a reload rather than data. This is what a cache holds.
Ephemeral state
Data whose only home is the volatile tier, such as sessions, leases or rate counters; losing it changes behaviour instead of merely slowing a request.
Round trip
One request travelling to the server and its reply coming back; for fast in-memory operations it is usually the largest part of a call's cost.
Pipelining
Sending several operations without waiting for each reply, so many crossings collapse into one; every operation is still executed and judged on its own.
Time to live
A lifetime attached to an entry, after which the store stops serving it. The memory may be reclaimed later than the deadline itself.
Eviction
Removal the store performs to free memory near its ceiling, choosing victims by a policy such as least recently used or least frequently used.
Working set
The entries actually read within a period; the figure that should size a cache, rather than the total volume of data behind it.
Per-entry overhead
Memory an entry costs beyond its key and value: lookup slot, header, lifetime metadata and allocator rounding. It grows with entry count, not payload size.
Snapshot
A point-in-time copy of the whole keyspace written to disk; a restart from it restores the state as of the moment it was cut.
Write log
An append-only record of state-changing operations, replayed at start to rebuild the keyspace; its flush policy decides how many writes a crash can take.
Loss window
The span of acknowledged writes a failure can erase, stated in time or operations; the honest way to describe a tier's durability.
Check-and-set
A write accepted only if the entry is unchanged since it was read, usually detected with a version token; a refusal means re-read, recompute and retry.
Split brain
Two nodes both acting as primary after a network partition, each accepting writes the other never sees.

The sections are not separate chapters; each one changes what the others mean. **The tier's role is the input to everything else.** Whether an entry is derived or the only copy decides which eviction policy is safe, whether durability is worth paying for, and how a restart is felt behind the tier. [The volatile tier](/topics/db-in-memory-concepts-tier) covers derived copies and whether to add a tier at all; [ephemeral state workloads](/topics/db-in-memory-concepts-workloads) cover state with nowhere else to live. **Data model and memory are one budget.** Value shapes set the weight of an entry and the crossings an update costs; keyspace design sets how many entries exist; expiry sets how long they stay. Multiply those and you reach [the memory ceiling](/topics/db-in-memory-concepts-memory): the working set, the overhead per entry, and the policy that fires at the limit. Expiry and eviction meet here, and how they interact is a common follow-up. **Cost and concurrency pull against each other.** [The access cost model](/topics/db-in-memory-concepts-access) pushes you towards fewer, larger calls; [atomicity and concurrency](/topics/db-in-memory-concepts-atomicity) asks what those calls promise while other callers interleave. Pipelining saves crossings but groups nothing. Server-side logic saves crossings and closes a race, but on a store that runs operations strictly in turn it holds every other caller until it finishes, which is how one slow operation becomes everyone's latency. **Durability and distribution answer different failures.** [Durability options](/topics/db-in-memory-concepts-durability) cover a restart on the same machine; [spreading the tier](/topics/db-in-memory-concepts-distribution) covers losing the machine and adds capacity by partitioning. Both trade a loss window for cost, and partitioning also changes the data model, because an operation over several keys stops being one unit once those keys can sit on different nodes. **Operations closes the loop.** [Operating the tier](/topics/db-in-memory-concepts-operations) is where the earlier sections reappear as signals: memory figures that disagree, a hit ratio that depends on who counts, a slowdown traced to one oversized entry, and the choice of which axis to scale.

  1. The Volatile Tier →

    Start with what the tier is for and the four roles it plays; whether an entry is a copy shapes every later answer.

  2. The Access Cost Model →

    Round trips dominate the cost of a fast store, so learn to count crossings before judging any design's latency.

  3. Server-Side Value Shapes →

    Which shapes the server understands decides how many crossings an update takes and which races vanish.

  4. Expiry Semantics →

    Lifetimes are the tier's main housekeeping tool, and their promises are narrower than most candidates assume.

  5. The Memory Ceiling →

    With values and lifetimes known, size the working set and decide what happens when memory runs out.

  6. Atomicity & Concurrency →

    Shared keyspaces race; this section shows what the store makes atomic and the remedies when it does not.

  • Calling the tier a cache while it holds sessions, leases or counters with no other copy; eviction and restarts then lose data instead of adding a reload.

  • Promising lower latency because memory beats disk, without asking whether the source already serves from its own memory and the tier adds a network hop.

  • Blaming a missing entry on its lifetime alone; eviction under memory pressure can remove it earlier, and the two are configured and monitored separately.

  • Leaving the behaviour at the memory ceiling on its default, so nobody knows whether a full store will refuse writes, drop entries or be killed.

  • Reading a value, changing it in the caller and writing it back, as if per-operation atomicity covered the whole sequence.

  • Asking a serving instance for every key matching a pattern in one call instead of walking the keyspace with a cursor in bounded batches.

  • Calling the tier durable or replicated without stating the loss window: snapshot interval, log flush policy, and writes acknowledged before any replica held them.

  • Bringing an empty tier back under full traffic without estimating the miss load it sends to the source behind it.

  • Treating the store as safe because it sits on an internal network; anyone who can reach it unauthenticated can usually read or delete everything.

Many questions here come down to a few recurring choices. Naming the one you are making, and what would change it, is often worth more than the mechanism. - **In-process versus shared.** A copy inside each application instance costs no crossing but diverges across the fleet; a shared tier gives one answer but adds a crossing and another component to run. - **Opaque values versus structure.** Serialized blobs keep the store simple and the format under your control; letting the server understand fields, counters and collections saves crossings and removes races, at the cost of depending on the operations the store offers. - **One key or many.** Grouping related data under one key makes it one unit of work and one crossing; splitting it lets each piece expire, be evicted or be placed on a node independently, and avoids one oversized entry. - **Fixed versus idle lifetimes.** A fixed deadline bounds how stale an entry can get; an idle deadline keeps busy entries alive but may keep them indefinitely and can add a write to every read. - **Evict versus refuse at the ceiling.** Evicting keeps writes flowing and suits derived data; refusing protects state that exists nowhere else and pushes the problem back to callers, where it is visible. - **Loss window versus write cost.** Flushing the write log more often shrinks what a crash takes and spends disk work on the write path; snapshots cost little while serving but can lose a whole interval.

Several shapes recur across sections under different names; recognising them places an unfamiliar question quickly. - **Claim with a lifetime.** Leases, locks and deduplication records share one skeleton: a conditional create that only the first caller wins, plus a lifetime that releases the claim if the holder disappears. The variants differ in how long that lifetime must be. - **Count inside a window.** Rate limits, quotas and usage meters use a server-side increment on a key whose name or lifetime encodes the window. - **Keep your own index.** Any lookup by something other than the key needs a second entry the application maintains, and a window where the two disagree. - **Rank by score.** Leaderboards, time-ordered windows and scheduled work keep members sorted by a caller-supplied number, and need explicit trimming because a lifetime applies to the whole collection. - **Collapse the crossings.** Multi-key operations, pipelines and server-side logic all cut round trips; they differ in what they promise about failure and interleaving. - **Deliver only to who is listening.** Broadcast fan-out reaches recipients connected at that instant; anything that must survive a disconnect belongs in a durable stream, as the [ephemeral workloads](/topics/db-in-memory-concepts-workloads) section discusses.

explore

report an issue with this guide →

questions

252 · 11 sections

A team adds a shared in-memory store purely because memory is fast; what does the architecture now have that it did not before?

level: juniorimportance: must knowfreq 64%
basics
~20 s

A second running component on the hot path: one more thing to size, secure, upgrade and be paged about, one more way a request can fail, and a store whose entries can be gone by the next request.

open as a page

How does a store that answers every read from RAM differ from a disk engine holding most pages in RAM?

level: juniorimportance: must knowfreq 72%
basics
~10 s

An in-memory store guarantees every read it serves is a memory read; a disk engine usually gets one. The gap shows in the tail - a miss costs the engine a device access.

open as a page

A design holds a derived copy of catalogue data in a shared volatile tier. What must be true of every entry, and who guarantees it?

level: juniorimportance: must knowfreq 76%
basics
~20 s

Every entry must be reconstructible from a system of record that still holds what it was made from. No store enforces that — it is a promise the design makes, and the caller must stay correct when an entry is absent.

open as a page

A team runs one in-memory store for several jobs - what four roles can it fill, and which one is a cache?

level: juniorimportance: must knowfreq 66%
basics
~20 s

An in-memory store is rented for four jobs: a derived copy of data a system of record still holds, the sole home for ephemeral state, a coordination point, and a transient transport. Only the first is a cache.

open as a page

A service reads a derived copy from a shared tier that stops answering; what decides whether its requests degrade or fail?

level: middleimportance: must knowfreq 58%
basics
~20 s

Three facts decide it: whether the entries are a derived copy with a system of record behind them, whether the read path has a route to that source, and whether the source can absorb the tier's full read rate.

open as a page

Two teams share one flat keyspace and one writes entries under the key user:1042 — what should that key carry instead?

level: juniorimportance: must knowfreq 70%
basics
~20 s

On a shared flat keyspace the key string is the entire addressing model, so it must say whose it is: an owning prefix, then the entity, then the identifier, and a format version where the value's shape may change.

open as a page

A store answers only by key, but a service must find an account by email address. What has to exist, and who maintains it?

level: juniorimportance: must knowfreq 74%
basics
~20 s

A second entry: an application-maintained index keyed by the email address, holding the account's key. The application writes, updates and repairs it, and nothing in the store's base data model builds such a lookup or notices when it is wrong.

open as a page

Why is asking a serving in-memory store for every key matching a prefix in one operation not a harmless query?

level: juniorimportance: must knowfreq 72%
basics
~20 s

A whole-keyspace listing costs the distinct-key count, not the number of matches, and the reply is assembled whole before anything is sent. Where the store executes one operation at a time, every waiting caller pays it.

open as a page

A key scheme in an in-memory store mints one entry per user per day per field. How do you size it before shipping?

level: middleimportance: must knowfreq 62%
basics
~20 s

Multiply the factors out to a distinct-key count, then price each entry as key bytes plus value bytes and multiply again. Compare the result with the tier's budget, and identify which factor is unbounded before arguing about the bytes.

open as a page

On a store that hands values back as opaque bytes, what does one entry grown to hundreds of megabytes cost to read, write and remove?

level: middleimportance: must knowfreq 60%
basics
~20 s

Every operation on that entry is proportional to its whole size: a read ships all of it, any change rewrites all of it, and removing it is real work that someone has to pay for.

open as a page

On a store that can address named fields inside a value, what does writing one field buy over a whole-value read-modify-write round trip?

level: juniorimportance: must knowfreq 72%
basics
~10 s

Writing one field sends only that field and skips the read: one round trip instead of two, and two callers changing different fields of the same entry stop overwriting each other.

open as a page

Why do in-memory stores offer an operation that adds to a stored number instead of leaving the arithmetic to the caller?

level: juniorimportance: must knowfreq 70%
basics
~10 s

Server-side arithmetic means the caller never holds the old number: one round trip replaces a read-modify-write round trip, and two concurrent callers each contribute a change instead of one silently overwriting the other.

open as a page

A store hands back exactly the bytes it was given, so what does changing one field of a stored value take?

level: juniorimportance: must knowfreq 72%
basics
~20 s

Changing one field costs a read-modify-write round trip: read the whole value, deserialize it, change the field, serialize it again, write the whole value back. Two operations where a store that can address parts of a value needs one.

open as a page

In a score-ordered set, where does the ordering come from, and what does it turn into a read instead of a sort?

level: juniorimportance: must knowfreq 72%
basics
~20 s

The caller supplies a number - the ordering score - with every member, and the store keeps the members arranged by it as they are written. Position then becomes a read: the rank of one member, or a slice by position or by score band.

open as a page

Should a user's 200 live room memberships, each checked individually, be one member collection under one key or 200 keys?

level: middleimportance: must knowfreq 58%
basics
~20 s

One member collection: the checks are membership tests the server answers without moving the collection, and the group is one unit of work. Choose separate keys only when a membership must expire on its own.

open as a page

How does an entry with a fixed deadline behave differently from one with an idle deadline pushed forward by every access?

level: juniorimportance: must knowfreq 70%
basics
~20 s

A fixed deadline is set when the entry is written and never moves, so total life is bounded no matter how busy the entry is. An idle deadline is pushed forward by access, so it removes only entries that have gone quiet.

open as a page

An entry's deadline passed ten minutes ago and nothing has read it since — what does a reader get, and is the memory back?

level: juniorimportance: must knowfreq 68%
basics
~20 s

A reader is served nothing: past its deadline the entry is never handed back. The memory is usually still held — stores free an expired entry when something touches it, a sweep reaches it, or the room is needed.

open as a page

An entry written with a one-hour lifetime is missing ten minutes later - what else removes entries besides a deadline?

level: juniorimportance: must knowfreq 64%
basics
~20 s

Two different events remove entries. Expiry is removal the application asked for by attaching a lifetime; eviction is removal the store forced on it to free room. Only the second can take an entry early.

open as a page

A service needs an entry gone ten minutes after it is written. What does attaching a lifetime buy over deleting it later from application code?

level: juniorimportance: must knowfreq 72%
basics
~20 s

A lifetime attached at write makes cleanup the store's obligation: it stops serving the entry at the deadline even if the writing process crashes, is redeployed, or never reaches its delete path. Application-side deletion survives none of that.

open as a page

Your design wants an entry kept alive while it is being read — which side actually pushes the deadline forward, and what does that cost?

level: middleimportance: must knowfreq 60%
basics
~20 s

Usually the caller, not the store. Many stores do not move a deadline on a read, so an idle deadline is an extra write on every access, turning a read-heavy path into a write-heavy one.

open as a page

A running in-memory store exhausts the memory available to it: what three outcomes can follow, and how does each appear to the caller?

level: juniorimportance: must knowfreq 76%
basics
~20 s

Memory exhaustion has three configured endings: the store refuses writes while reads still work, it removes entries to make room, or the operating system kills the process. Which one you get was a choice, usually a default nobody made deliberately.

open as a page

What does one entry in an in-memory store cost beyond the bytes of its key and value?

level: juniorimportance: must knowfreq 72%
basics
~20 s

An entry also costs a slot in the store's lookup structure, a small header of lengths and pointers, a lifetime field or record if it carries one, and whatever the allocator rounds each of its several allocations up to.

open as a page

Only 5 million of a store's 200 million entries, all copies of database rows, are read hourly — which number sizes it?

level: juniorimportance: must knowfreq 62%
basics
~20 s

Size for the working set — the entries actually touched in a window — not total data. A database holds the rows, so an absent entry costs one extra read, and memory bought for untouched entries is never read.

open as a page

An in-memory store's memory steps sharply when its small maps each gain their hundredth field — which two representations explain that step?

level: middleimportance: must knowfreq 58%
basics
~20 s

Many in-memory stores keep two representations of one value: a compact form that packs elements together, and a general form with a lookup structure per element. Crossing the promotion threshold swaps them, so memory steps rather than climbs.

open as a page

Why does a store report 2.4 GB of data size for 10 million entries whose payloads total 800 MB?

level: middleimportance: must knowfreq 64%
basics
~20 s

Because the fixed per-entry cost is charged 10 million times. Data size over entry count is 240 bytes, of which 80 is payload and 160 is lookup slot, header, key bytes and allocator rounding. Overhead scales with count, not bytes.

open as a page

An in-memory store applies four submitted operations as one uninterleaved group; what does that promise, and what does it not?

level: juniorimportance: must knowfreq 68%
basics
~10 s

It promises only that no other caller's operation is applied between the four. It is not a database transaction: there is no rollback, so when the third step fails, the first two stay applied.

open as a page

Two callers read one entry holding a quota count, each adds ten, and both write back — what is stored, and what is reported?

level: juniorimportance: must knowfreq 80%
basics
~20 s

The second write lands whole and the first caller's addition is gone. An entry that held 100 holds 110, not 120 — and nothing is reported: both callers were told their write succeeded. That default outcome is last-writer-wins.

open as a page

A write presented with the version token read alongside the value is refused - what happened, and what must the caller do next?

level: juniorimportance: must knowfreq 64%
basics
~20 s

Another caller changed that entry between the read and the write, so the store refused it instead of overwriting. The caller must re-read the entry, recompute the change from the new value, and write with the new token.

open as a page

If a store makes every operation atomic, why can two callers that read one entry, change it and write it back still lose a change?

level: juniorimportance: must knowfreq 78%
basics
~20 s

Per-operation atomicity covers one operation, not a caller's sequence. A read and a write are two operations, and other callers' operations run in the gap between them, so the later write lands whole and the earlier change is gone.

open as a page

Two stores both guarantee that one operation on one entry is atomic - how does run-to-completion execution deliver that, and how does per-entry locking?

level: middleimportance: must knowfreq 60%
basics
~10 s

Run-to-completion executes one operation fully before starting the next, so nothing interleaves. Per-entry locking lets worker threads run concurrently, each holding the entry it operates on for that operation's duration. Same promise, different consequences.

open as a page

A team says their in-memory tier "has persistence turned on" — what must you still ask before you can say what a crash costs?

level: juniorimportance: must knowfreq 62%
basics
~20 s

"Persistence is on" is not a loss window. Ask which posture is in force and the flush policy or copy interval that governs it — those numbers, not the word, say how many seconds of acknowledged writes a crash costs.

open as a page

An in-memory store restarts empty and takes traffic again. What does the system of record behind it experience, and how large is that effect?

level: juniorimportance: must knowfreq 64%
basics
~20 s

Until entries accumulate again, every read lands on the system of record behind the tier. The multiplier is the inverse of the miss rate: at a 95% hit ratio that system briefly sees twenty times its normal read load.

open as a page

A store writes a whole copy of its keyspace to disk every 15 minutes while still accepting writes; which writes does that copy hold?

level: juniorimportance: must knowfreq 68%
basics
~20 s

A point-in-time copy holds the keyspace as of the instant it was cut, not when its file finished writing. Writes accepted after the cut are absent, so up to one whole copy interval of acknowledged writes can be missing.

open as a page

What does an in-memory store hold after a restart if it keeps nothing, a periodic copy, a write log, or both?

level: juniorimportance: must knowfreq 72%
basics
~20 s

Keep nothing gives an empty store. A periodic whole copy gives the keyspace as of the last copy. A write log gives it replayed to the last flush to disk. Keeping both replays the log on top of a copy.

open as a page

When an in-memory store is configured to keep a write log, what is appended while it runs and what happens to that log at start?

level: juniorimportance: must knowfreq 68%
basics
~20 s

A write log records every state-changing operation in the order it was accepted. At start the process replays that log from the beginning, applying each entry again, to rebuild the keyspace it held before it stopped.

open as a page

A tier whose nodes each hold a share of the keyspace, not a copy: what limits an operation naming three keys?

level: juniorimportance: must knowfreq 58%
basics
~20 s

One operation runs on one node, so it can only name keys that are all in the same partition. Split across partitions, the call is refused, composed by an intervening layer, or has to be split by the caller.

open as a page

A volatile tier acknowledges a write before any replica holds a copy of it: what has the caller been promised?

level: juniorimportance: must knowfreq 66%
basics
~10 s

Acknowledgment means one node has the write in memory, nothing more. Until it propagates, the write exists in exactly one place, and if that node is lost the write is simply gone.

open as a page

In a volatile tier with a primary and two replicas of the whole keyspace, why must a replica be promoted before writes resume?

level: juniorimportance: must knowfreq 62%
basics
~20 s

A replica holds a copy of the keyspace but is not the address that accepts writes, so writes resume only after some deciding party promotes one of them to primary. That promotion is a deliberate step, and it takes time.

open as a page

When a keyspace is split so each key lives on one node, why must every caller resolve keys the same way?

level: juniorimportance: must knowfreq 68%
basics
~20 s

Assignment must be a deterministic function of the key, evaluated identically by every caller. If two callers disagree about where a key belongs, each reads and writes its own copy on a different node and neither sees the other's.

open as a page

A caller updates a key on the primary of an in-memory store, then reads it from a replica and sees the previous value — why?

level: juniorimportance: must knowfreq 62%
basics
~20 s

A replica answers from its own copy, which trails the primary by the propagation lag, so a read issued inside that window returns the value the key held before the write. The write is not lost, only not yet visible there.

open as a page

An in-memory store answers a lookup in microseconds, but the caller opens a fresh connection for every call - what does each call pay?

level: juniorimportance: must knowfreq 70%
basics
~20 s

Connection setup, paid before any work begins: at least one network round trip for the handshake, plus further trips where an encrypted transport or a credential exchange is required. Microseconds of server work end up buried under milliseconds of setup.

open as a page

A request makes 500 single-key reads, each answered in microseconds, yet takes 300 ms overall — where did the time go?

level: juniorimportance: must knowfreq 76%
basics
~20 s

Almost all of it went into the network. Each read pays one full crossing, so 500 sequential reads pay 500 crossings. The store's microseconds are far too small to explain the delay; the number of crossings is the cost.

open as a page

One write in a run of two hundred sent to a volatile tier without waiting for replies fails — what happened to the others?

level: middleimportance: must knowfreq 62%
basics
~20 s

The other one hundred and ninety-nine were executed and their effects stand. Sending a run of operations without waiting for replies buys latency and nothing else: no atomicity, no isolation, no rollback — each operation succeeds or fails on its own.

open as a page

A request needs forty values from a volatile tier one zone away — how does a pipelined run differ from one operation taking all forty keys?

level: middleimportance: must knowfreq 68%
basics
~20 s

Both collapse forty round trips into one, and that is all they share. A pipelined run stays forty independent operations with forty replies matched in order; one operation taking many keys is a single operation with a single reply and a single outcome.

open as a page

While a caller is parked on a wait-with-deadline call, what does it consume on the store and what does it not?

level: middleimportance: must knowfreq 58%
basics
~20 s

A parked caller consumes a connection slot for the entire wait and essentially no server processing time. The store registers the waiter and goes on serving everyone else, so every store-side signal stays flat while the caller's connection is unusable.

open as a page

A quota counter on a shared volatile tier uses one key per subject per period and never gets a lifetime - what does that cost?

level: juniorimportance: must knowfreq 62%
basics
~20 s

Dead counters accumulate. The keyspace grows with the whole history of subjects and periods rather than with the active ones, and on a tier that removes entries under memory pressure those dead keys crowd out live ones.

open as a page

Why does a lease key that lets only one worker run a job carry a lifetime instead of living until its holder releases it?

level: juniorimportance: must knowfreq 68%
basics
~20 s

A lifetime bounds a crash. If the holder dies between claiming and releasing, an entry that only a release deletes blocks the job forever; the lifetime lets the store drop the claim so another worker can take it.

open as a page

Why must per-user request state leave the application instance once a second instance exists, and what does the move cost?

level: juniorimportance: must knowfreq 72%
basics
~20 s

State held in one instance's memory is readable only by that instance, so the next request may land on a stranger. A shared tier makes all instances equivalent, at the price of a round trip per authenticated request.

open as a page

A price feed is broadcast to recipients attached to a shared volatile tier; one drops for two seconds — what does it receive on reconnect?

level: juniorimportance: must knowfreq 74%
basics
~20 s

Nothing from those two seconds. A broadcast reaches only the connections attached at the instant it is sent, and is then forgotten, so the reconnecting recipient starts from the next message — and neither side can tell a gap happened.

open as a page

Why must a deduplication record be written before the guarded work rather than after it, and what must the store offer?

level: middleimportance: must knowfreq 68%
basics
~20 s

A retry arrives while the first attempt is still running, so a record written after the work is absent exactly when it is needed. Claim it first, with a conditional create: a write that succeeds only if the key is absent.

open as a page

A dashboard says an in-memory store answered in 0.3 ms while the caller reports 40 ms for the same calls; what does each number measure?

level: juniorimportance: must knowfreq 58%
basics
~20 s

The store's number is server-side execution only, from the server starting the operation to the reply being produced. The caller's number adds waiting for a connection, both network hops and time queued before execution. That gap is where the slowdown lives.

open as a page

A shared in-memory store reports stored-data size at 80% of its memory ceiling; why can that number not name whose entries to remove?

level: juniorimportance: must knowfreq 60%
basics
~20 s

Stored-data size is one total for the whole keyspace, carrying no owner and no breakdown. Naming a holder is a separate measurement: walk the entries, estimate each one's size, and roll those estimates up per key prefix.

open as a page

A dashboard for an in-memory store shows a single 'memory used' figure - which four quantities could it be, and what does each mean?

level: juniorimportance: must knowfreq 72%
basics
~20 s

Four quantities hide behind one 'memory used' figure: stored-data size (the server's count for its entries), resident footprint (what the operating system sees), the memory ceiling the server enforces, and the host or container limit above it.

open as a page

Callers of an in-memory store are timing out, yet the server's record of operations past its configured time threshold is empty; how is that possible?

level: middleimportance: must knowfreq 55%
basics
~20 s

That record times execution only: its clock starts once the server begins an operation, so waiting never enters it. Callers can be timing out on pool wait, on queueing before execution, or on the network while every operation the server actually ran was genuinely quick.

open as a page

An in-memory store is brought up with stock settings on a routable host — what reaches it, and what proves a caller's identity?

level: middleimportance: must knowfreq 58%
basics
~20 s

Stock settings in this class of store assume a private network. Many servers listen on every interface and several offer no identity step at all, so whatever can route to the address can read, overwrite and empty the keyspace.

open as a page