Backend Engineering Glossary
A living, plain-English dictionary of terms encountered across Phases 0–5.
A
- ACID: Database transaction guarantees: Atomicity (all or nothing), Consistency (constraints hold), Isolation (concurrent transactions don't corrupt each other), Durability (committed data survives crashes via WAL).
- Amortized $O(1)$: An operation that is almost always constant time, except occasionally when a backing buffer resizes (e.g., Python
list.append), averaging out to $O(1)$ over many operations. - At-Least-Once Delivery: Message broker guarantee that a message will be delivered one or more times, never zero. Requires consumers to be idempotent.
B
- Backpressure: A mechanism where an overloaded downstream system signals an upstream producer to slow down (via bounded queues, HTTP
429, or TCP window sizing) rather than crashing with Out-Of-Memory (OOM). - B-Tree Index: The default balanced tree index in PostgreSQL (
O(log n)lookup). Keeps keys sorted on disk pages, supporting both equality (=) and range (<,>,BETWEEN,ORDER BY) queries.
C
- Cache Stampede (Thundering Herd): When a popular cache key expires and hundreds of concurrent requests simultaneously miss the cache and hammer the database with the exact same heavy query.
- Circuit Breaker: A resilience pattern that stops calling a failing downstream service after a threshold of errors, failing fast to allow the downstream system to recover.
- Comparable Cursor (Keyset) Pagination: Paginating via
WHERE (created_at, id) < (:last_ts, :last_id) ORDER BY created_at DESC, id DESC LIMIT 50($O(\log n)$ via index) instead ofOFFSET 100000(which scans and discards 100,000 rows).
D
- Dead-Letter Queue (DLQ): A dedicated queue where a message broker (RabbitMQ/Celery) routes messages that have failed processing repeatedly ("poison pills") so they don't block healthy traffic and can be inspected later.
- Durable Execution (Temporal): An execution model where every step (Activity) of a workflow is persisted in an event history log. If a worker crashes mid-workflow, another worker replays the history and resumes from the exact point of failure.
F
- File Descriptor (FD): An integer handle assigned by the Linux kernel to an open file, pipe, or network socket (
0=stdin,1=stdout,2=stderr).
I
- Idempotency: The property that performing an operation once or multiple times with the same input/key produces the exact same system state and side effects (critical for safe retries in payments, webhooks, and Celery tasks).
- Inverted Index: The core data structure inside Elasticsearch/Lucene that maps every tokenized word (term) to a sorted list of document IDs containing that word.
M
- MVCC (Multi-Version Concurrency Control): How PostgreSQL allows readers and writers to work without blocking each other by maintaining multiple timestamped/transaction-ID versions (tuples) of a row.
N
- $N+1$ Query Problem: Fetching $N$ parent records in 1 query, then lazily executing $N$ separate queries inside a loop to fetch each parent's child records. Fixed via SQL joins (
joinedload) or batchedINqueries (selectinload).
O
- Outbox Pattern (Transactional Outbox): Saving domain state changes and outgoing events into the same relational database transaction (in an
outboxtable), then having a background relay publish those events to RabbitMQ/Kafka. Prevents dual-write inconsistency.
S
SKIP LOCKED: A PostgreSQL clause (SELECT ... FOR UPDATE SKIP LOCKED) that locks available rows while silently skipping rows currently locked by other workers, enabling high-throughput, lock-free work queues in SQL.