Glossary

Glossary

One line per term, in alphabetical order, each linked to the post that explains it. Terms are defined the way they are used on this blog, which is the way you should use them in an interview.

A to C

  • Aliasing bug. Two names for one mutable object, so a change through one is seen through the other: a live list stored in results, a single row shared across a grid. Find the bug
  • ADR (Architecture Decision Record). A short document recording a decision, its context, and its consequences, ideally with a “we will revisit this if” clause. Decision went wrong
  • At-least-once. A delivery guarantee: every message is delivered, and some are delivered more than once. The honest guarantee of every queue, relay, and scheduler; paired with idempotent consumers. Job scheduler, Idempotency
  • Backpressure. A consumer signaling a producer to slow down. A neighbor of rate limiting and load shedding, not a synonym. Rate limiter
  • Boxing. Wrapping a primitive such as Int in an object so it can live in a generic collection. Array<Int> boxes; IntArray does not. Coding questions in Kotlin
  • Backtracking. Building a candidate solution incrementally and undoing the last step when it cannot lead to a result. Subsets, permutations, and constraint problems. More coding questions in Kotlin
  • CAP. During a network partition, a system must choose between refusing operations (consistent, meaning linearizable) and serving possibly stale data (available). Says nothing about the normal case. Consistency
  • Causal consistency. If operation B could have depended on A, everyone sees A before B; concurrent operations may be seen in different orders. Prevents a reply appearing before its post. Consistency
  • CDC (Change Data Capture). Tailing a database’s log to publish changes. The log-based way to run an outbox relay. Sagas and the outbox
  • Channel. A hot, point-to-point conduit between coroutines: each value goes to exactly one receiver, with a capacity you choose. Use for handing work between coroutines. Concurrency in Kotlin
  • Choreography. A saga style where each service reacts to events and emits its own, with no central coordinator. Fine for two or three steps. Sagas and the outbox
  • Circuit breaker. Protects a caller from a failing callee by stopping calls after repeated failures. The opposite direction from a rate limiter. Rate limiter
  • Compare-and-set (conditional write). An update that succeeds only if the row still has the value or version the writer expects. Prevents lost updates at read committed. Isolation
  • Compensation. A new forward transaction that semantically undoes a completed saga step. Not a rollback; it can fail and must be retried. Sagas and the outbox
  • Conditional update. A single statement whose WHERE clause encodes the precondition, so the check and the write are atomic. The mechanism behind holds, decrements, and fencing. Ticket booking, Isolation
  • Cooperative cancellation. Cancelling a coroutine sets a flag; only code that checks the flag, by suspending or calling isActive or ensureActive(), actually stops. Concurrency in Kotlin
  • Conway’s Law. Systems mirror the communication structure of the organizations that build them. Service boundaries that do not match team boundaries do not hold. Monolith or microservices
  • CRDT (Conflict-free Replicated Data Type). A data structure whose concurrent updates merge deterministically without coordination. The alternative to last-writer-wins for shopping carts and counters. Consistency

D to H

  • Dead-letter queue. Where a message goes after exhausting its retries, so that it is not silently dropped and someone looks at it. Job scheduler
  • Disagree and commit. Stating a disagreement fully, with evidence, then executing the decision as if it were your own once it is made, with the dissent and a revisit trigger written down. Disagree with a senior engineer
  • Dispatcher. The component that decides which thread runs a coroutine’s code: Default for CPU work, IO for blocking calls, Main for a UI thread, or one you create for confinement. Concurrency in Kotlin
  • Dual write. Writing to a database and then publishing to a broker as two separate operations. The bug the outbox fixes. Sagas and the outbox
  • Eventual consistency. If writes stop, all replicas converge; anything may be observed in between. Always name the anomaly you are accepting. Consistency
  • Fail open / fail closed. What a protective component does when its own dependency is down: let everything through, or block everything. Decided per rule. Rate limiter
  • Fan-out. Delivering one write to many recipients, as in feeds and notifications. The shape where the hard part is delivery to hot users. First five minutes
  • Fencing token. A monotonically increasing number attached to a lease, checked on every write, so a stale holder’s late writes are rejected. Job scheduler, Ticket booking
  • Flow. A cold asynchronous stream: the producer block runs anew for each collector, with backpressure built in because emitting suspends until the collector takes the value. Concurrency in Kotlin
  • Fixed window. A rate limiting algorithm with one counter per window; allows double the limit across a boundary. Rate limiter
  • Hold. A time-limited reservation stored as a status and an expiry in the row, taken and released by conditional updates. Not a lock. Ticket booking
  • Hot key / hot row / hot shard. One key, row, or partition receiving a disproportionate share of traffic. The seat during an on-sale; the celebrity in a feed. Ticket booking, Rate limiter

I to L

  • Idempotency key. A client-generated identifier for an intent, reused on every retry, so the server can detect and dedupe repeats. Idempotency
  • Inbox pattern. A consumer records each processed message ID in its own database, in the same transaction as the processing, so duplicates are no-ops. The mirror of the outbox. Idempotency, Sagas and the outbox
  • Isolation level. How much concurrent transactions on one copy can interfere with each other: read uncommitted, read committed, repeatable read, snapshot, serializable. Isolation
  • Jitter. Randomizing retry delays or scheduled times so that many clients do not act in the same instant. Job scheduler
  • Kadane’s algorithm. Maximum-sum subarray in one pass by choosing at each element to extend the current run or restart. More coding questions in Kotlin
  • KGS (Key Generation Service). A background service that pre-generates unique keys for a URL shortener. One of five ID strategies. URL shortener
  • Lease. A lock with an expiry, renewed by heartbeat while the holder is alive, so a dead holder’s work can be taken over. Job scheduler
  • Leaky bucket. A rate limiting algorithm that drains a queue at a fixed rate; smooths traffic and adds latency. Rate limiter
  • Linearizability. Every operation appears to take effect instantaneously at some point between its start and its acknowledgment, in real time. The strongest single-object guarantee, and what CAP means by consistency. Consistency
  • Little’s law. Concurrency equals throughput times latency. Sizes thread pools, connection pools, and server counts. Numbers
  • Load shedding. A server dropping requests because it is at capacity, regardless of who sent them. A policy about the server, not the client. Rate limiter
  • Lost update. Two transactions read, compute, and write; one write silently overwrites the other. Permitted at read committed. Isolation

M to P

  • Minimal reproduction. The smallest input that makes a bug observable: "abba", [3, 3], an all-negative array. Producing it is the difference between a hypothesis and a finding. Find the bug
  • Misfire policy. What a scheduler does with runs it missed while down: skip, fire once, or fire all. Per-job configuration. Job scheduler
  • Modular monolith. One deployable with enforced module boundaries that could become services later. The default for a new system. Monolith or microservices
  • Monotonic stack. A stack kept in sorted order by popping until the new element fits; each index is pushed and popped once, giving amortized O(n) for next-greater-element problems. More coding questions in Kotlin
  • Monotonic reads. A client never sees time go backward: a value once seen is not later replaced by an older one. Consistency
  • MVCC (Multi-Version Concurrency Control). Keeping multiple versions of a row so readers see a consistent snapshot without blocking writers. How snapshot isolation is implemented. Isolation
  • Negative caching. Caching a “not found” result briefly so that misses do not each become a database read. URL shortener
  • One-way and two-way doors. Decisions that are hard to reverse versus easy to reverse. Spend the analysis on the one-way doors. Decision went wrong
  • Orchestration. A saga style where one component sends commands to each service and tracks the state machine. Preferred for flows with branches or more than three steps. Sagas and the outbox
  • Outbox (transactional outbox). Writing the event to an outbox table in the same transaction as the business data, with a relay that publishes it afterward. The fix for the dual write. Sagas and the outbox
  • PACELC. Extends CAP: during a partition choose availability or consistency; else, choose latency or consistency. Describes the normal case. Consistency
  • Phantom. A predicate query returning new rows on a second execution within the same transaction. Isolation
  • Pivot transaction. The saga step that is the point of no return. Before it, failures compensate backward; after it, steps are retried forward until they succeed. Sagas and the outbox

Q to S

  • Psychological safety. A team norm in which people can disagree, ask, and be wrong without penalty. What the senior person in the room is responsible for creating. Disagree with a senior engineer
  • Pseudo-polynomial. A runtime that is polynomial in the numeric value of an input rather than in its length, as in coin change’s O(amount × coins). Coding questions in Kotlin
  • Quickselect. Partition-based selection of the kth element in expected O(n) time with a random pivot, O(n²) worst case. More coding questions in Kotlin
  • Quorum. Reading from and writing to enough replicas that any read set overlaps any write set (R + W > N). Close to linearizable, with caveats. Consistency
  • Reaper. A background process that finds abandoned work, such as expired leases or claimed-but-never-enqueued rows, and releases or re-queues it. Job scheduler
  • Read-your-writes. A client always sees its own writes. Enforced by routing the client to the writer briefly, or by a version token. The session guarantee users notice most. Consistency
  • Regression test. A test built from a bug’s minimal reproduction so the bug cannot silently return. Stating it is the second half of a debugging answer. Find the bug
  • Saga. A sequence of local transactions across services, each with a compensating transaction, that together end in a consistent state. Sagas and the outbox
  • Semantic lock. A status such as PENDING on a record that tells other processes a saga is in flight, standing in for the isolation sagas lack. Sagas and the outbox
  • Serializable. The isolation level whose result equals some serial ordering of the transactions. Implemented by locking, optimistic detection, or literal serial execution; requires retries. Isolation
  • Sharding. Partitioning data across nodes by a key. The key choice is the whole decision; hot partitions are the risk. Job scheduler, Ticket booking
  • Sliding window. Two indices that only move forward over a sequence, maintaining an invariant about the range between them. The pattern for longest-substring problems. Coding questions in Kotlin
  • SKIP LOCKED. A SELECT FOR UPDATE modifier that skips rows already locked by another transaction, letting many workers claim distinct rows from one table atomically. Job scheduler
  • Sliding window counter. A rate limiting algorithm that blends the current and previous fixed windows; accurate and cheap. Rate limiter
  • Snapshot isolation. Each transaction reads from a consistent snapshot taken at its start; first committer wins on write conflicts to the same row. Prevents everything in the standard’s list except write skew. What most “repeatable read” implementations actually are. Isolation
  • SSI (Serializable Snapshot Isolation). An optimistic serializable implementation that tracks read-write dependencies and aborts transactions that could form a cycle. PostgreSQL’s serializable. Isolation
  • Steelman. Restating someone’s position in its strongest form, better than they did, before disagreeing with it. The first step of the disagreement playbook. Disagree with a senior engineer
  • Strangler fig. Migrating from a monolith by routing traffic feature by feature to new services until the old system can be retired. Monolith or microservices
  • Structured concurrency. Every coroutine belongs to a scope that owns a tree of jobs: the parent waits for its children, cancellation flows down, and failure flows up unless a supervisor stops it. Concurrency in Kotlin
  • Strict serializability. Serializable transactions that are also linearizable. What most people mean by “strong.” Consistency

T to Z

  • Thundering herd. Many clients acting at the same instant, such as an on-sale, a cache expiry, or a retry storm. Shaped by a waiting room, jitter, or a queue. Ticket booking
  • Timing wheel. An in-memory hierarchical timer structure for finding due jobs with sub-second precision. Job scheduler
  • Token bucket. A rate limiting algorithm with a bucket that refills at a fixed rate and holds a burst capacity. The default for API limits. Rate limiter
  • Topological sort. An ordering of a directed acyclic graph’s nodes so every edge points forward. Kahn’s algorithm peels nodes with no remaining incoming edges; if any remain, there is a cycle. More coding questions in Kotlin
  • Tortoise and hare. Floyd’s cycle detection: a slow pointer and a fast pointer that meet if and only if the list has a cycle. Coding questions in Kotlin
  • Trie. A prefix tree where each node’s children are indexed by character and a terminal flag marks the end of a stored word. More coding questions in Kotlin
  • Two-phase commit (2PC). A distributed transaction protocol in which a coordinator asks every participant to prepare, then commit. Blocking, coordinator-dependent, and unsupported by most brokers and APIs. Sagas and the outbox
  • Waiting room. An edge component that queues arrivals and admits them at a chosen rate with a signed token, providing fairness and a place for bot control. Ticket booking
  • Write skew. Two transactions read overlapping data, decide, and write to different rows; each write is fine alone and together they break an invariant. Permitted by snapshot isolation. Isolation
  • 301 vs. 302. A permanent redirect that browsers cache, versus a temporary one that sends every click through the server. The analytics decision in a URL shortener. URL shortener