Concepts

Mental models and definitions that make the code understandable.

896 published

Page 9 of 9

Distributed Lock

A distributed lock grants mutual exclusion across processes through a shared store, but correctness requires leases, ownership checks, and fencing tokens.

distributed-systems
distributed-systems · locking · coordination

Distributed Tracing

Distributed tracing follows one request across services with a shared trace id and timed spans, revealing where latency and failures originate.

observability
observability · tracing · microservices

DNS

DNS maps names to addresses and service endpoints. Its caching, TTLs, and record types shape failover speed, latency, and how users reach your system.

networking
networking · dns · reliability

Encryption at Rest

Encryption at rest protects stored data, backups, and disks with keys held in a KMS. It defends against media theft but not against a compromised application or SQL injection.

security
security · cryptography

Error Budget

An error budget is the allowed amount of unreliability implied by an SLO, used to balance feature delivery against reliability work.

reliability
reliability · operations · risk

ETag

An ETag is an HTTP validator that identifies a specific version of a resource. Clients send it back to skip unchanged responses and avoid overwriting concurrent edits.

networking
http · caching · concurrency

Event Sourcing

Event sourcing stores state as an ordered append-only sequence of domain events, deriving current state by replay and enabling audit, replay, and projections.

data-consistency
event-driven · data-consistency · architecture

Feature Branching

Feature branching isolates each change on its own branch until complete, giving teams parallel workspaces at the cost of long-lived divergence and harder merges.

delivery
delivery · version-control · branching

Feature Toggle

A feature toggle is a runtime switch that decouples deployment from release, enabling staged rollouts, kill switches, experiments, and permissioned access.

delivery
delivery · configuration · reliability

GitOps

GitOps uses Git as the single source of truth for infrastructure and application state, with an automated agent continuously reconciling the cluster to match committed manifests.

delivery
delivery · gitops

Golden Signals

Golden signals are latency, traffic, errors, and saturation — four metrics that give a fast, actionable view of any service's health.

observability
observability · reliability · metrics

GraphQL

GraphQL exposes a typed schema that clients query for exactly the fields they need through one endpoint, trading simple HTTP caching for flexible data fetching.

api
api · graphql · schema

gRPC

gRPC is a high-performance RPC framework using HTTP/2 and Protocol Buffers, with generated clients, streaming calls, deadlines, and typed errors across languages.

api
api · rpc · protobuf

HSTS

HSTS tells browsers to use HTTPS for a site for a fixed period, blocking protocol downgrade and cookie-hijacking attacks after the first successful response.

security
security · web

HTTP Caching

HTTP caching stores responses and reuses them until freshness expires, then revalidates with ETag or Last-Modified validators to save bandwidth and latency.

web
web · http · performance

Idempotent Consumer

An idempotent consumer records processed message ids so at-least-once delivery produces the same state as a single delivery, even after retries.

messaging
messaging · idempotency · reliability

Immutable Infrastructure

Immutable infrastructure replaces servers instead of patching them: every change produces a new image, and running instances are never modified in place, removing drift.

delivery
delivery · infrastructure

Incident Command

Incident command assigns clear roles such as commander, communications lead, and operations lead during an outage so responders act instead of negotiating who decides.

operations
operations · incident-response · coordination

Infrastructure as Code

Infrastructure as code defines servers, networks, and cloud resources in versioned files, so environments are reproducible, reviewable, and provisioned by automation.

delivery
delivery · infrastructure

Key Rotation

Key rotation replaces cryptographic keys on a schedule or after an incident while keeping old data decryptable. Versioned key IDs and automated re-encryption make rotation safe.

security
security · cryptography

Leader Election

Leader election chooses one node to perform singleton work, using leases or consensus plus fencing tokens so a paused old leader cannot keep writing.

distributed-systems
distributed-systems · coordination · reliability

Least Privilege

Least privilege grants identities only the permissions needed for a task, for only as long as needed, reducing the blast radius of mistakes and compromise.

security
security · access-control · cloud

Load Shedding

Load shedding rejects work early when a service is saturated, protecting latency and stability for the requests it accepts instead of failing everything.

resilience
resilience · overload · capacity

Log Levels

Log levels classify messages by severity so operators can filter noise, alert on actionable events, and control storage cost without losing critical signals.

operations
operations · observability · logging

Long Polling

Long polling holds an HTTP request open until an update or timeout arrives, giving near-real-time delivery without WebSockets or dedicated streaming protocols.

web
web · http · realtime

Materialized View

A materialized view stores the result of a query physically, trading freshness and write cost for fast reads of expensive aggregations or joins.

databases
databases · performance · reporting

Monorepo

A monorepo keeps many projects in one repository, sharing tooling and dependencies while enabling atomic cross-project changes and a single review workflow.

delivery
delivery · tooling

Multi-Tenancy

Multi-tenancy serves many customers from shared infrastructure, requiring a tenant identity in every data path, isolation boundaries, and per-tenant resource limits.

architecture
architecture · saas · data-isolation

OAuth Scopes

OAuth scopes are space-delimited strings that request and limit delegated access. Resource servers must enforce them; they do not authenticate users or replace authorization logic.

security
security · authentication

OpenAPI Contract

An OpenAPI contract is a machine-readable description of an HTTP API that drives documentation, SDK generation, validation, and drift checks in CI.

api
api · contract · tooling

OpenID Connect

OpenID Connect adds authentication to OAuth 2.0 with a signed ID token, discovery metadata, and standard claims, enabling single sign-on across applications and providers.

security
security · authentication

Outbox Pattern

The transactional outbox pattern writes a business change and its event in one database transaction, then relays the event so other services see it exactly when the change commits.

data-consistency
distributed-systems · events · data-consistency

Partition Pruning

Partition pruning skips partitions that cannot match a query predicate, turning a full-table scan into a scan of only the relevant time or key ranges.

databases
databases · performance · partitioning

Password Hashing

Password hashing converts passwords into slow, salted verifiers with Argon2id, bcrypt, or scrypt. Fast hashes and reversible encryption are unsafe for password storage.

security
security · authentication

Personally Identifiable Information

PII is data that can identify a specific person, alone or combined with other records. Handling direct and quasi-identifiers correctly drives privacy design.

security
privacy · security · compliance

Postmortem

A postmortem is a blameless written analysis after an incident that reconstructs the timeline, identifies contributing causes, and assigns durable follow-up actions.

operations
operations · incident-response · learning

Quorum

A quorum is the minimum set of replicas that must acknowledge an operation; majority quorums and R + W > N overlap to prevent stale reads in replicated systems.

distributed-systems
distributed-systems · replication · consistency

REST vs RPC

REST models resources with uniform HTTP semantics, while RPC models actions as named procedures. The choice shapes caching, coupling, tooling, and client evolution.

architecture
architecture · api · design

Rolling Deployment

Rolling deployment replaces service instances in batches, keeping the application available while old and new versions overlap, with pause and rollback controls.

delivery
delivery · kubernetes

RTO and RPO

RTO is the maximum acceptable downtime; RPO is the maximum acceptable data loss. Both turn recovery from an aspiration into a measurable design target.

reliability
reliability · operations · disaster-recovery

Runbook

A runbook is a tested, step-by-step operational procedure that lets an on-call engineer diagnose or remediate a known condition without rediscovering the system.

operations
operations · on-call · documentation

Saga Pattern

A saga coordinates a sequence of local transactions across services, using compensating actions instead of a distributed transaction when a later step fails.

data-consistency
distributed-systems · transactions · microservices

Telemetry Sampling

Sampling keeps a representative subset of traces, logs, or metrics instead of every event, cutting cost and volume while preserving statistically useful visibility.

operations
operations · observability · cost

Schema Evolution

Schema evolution changes data or event schemas over time while old and new producers and consumers continue to interoperate.

data-integration
data-integration · events · contracts

Schema Registry

A schema registry stores versioned event or message schemas and enforces compatibility rules so producers can evolve data without breaking consumers.

data-integration
event-driven · data-integration · contracts

Secret Management

Secret management stores, distributes, rotates, and audits credentials so they never live in source, images, logs, or long-lived environment files.

security
security · secrets · operations

Semantic Versioning

Semantic versioning encodes compatibility in a three-part version number, so consumers can tell a breaking change from a feature or a bug fix before upgrading.

delivery
delivery · versioning

Server-Sent Events

Server-Sent Events stream text updates from server to browser over one long-lived HTTP response, with automatic reconnection and last-event replay built in.

web
web · streaming · http

Service Mesh

A service mesh moves service-to-service networking concerns into a data plane of proxies controlled by a central control plane, adding mTLS, retries, and telemetry without changing application code.

architecture
architecture · networking · kubernetes

Session vs Token Authentication

Session authentication stores state server-side behind an opaque cookie, while token authentication carries a signed or opaque credential. The choice affects revocation, scaling, and XSS exposure.

security
security · authentication

Shadow Traffic

Shadow traffic mirrors real production requests to a new service without returning its responses, validating behavior under real load before users depend on it.

delivery
delivery · testing · networking

Sharding

Sharding partitions data across independent databases by a shard key, trading cross-shard simplicity for horizontal write capacity and operational complexity.

databases
databases · scaling · distributed-systems

Sidecar Proxy

A sidecar proxy runs next to each service instance, intercepting network traffic to provide mTLS, retries, routing, and telemetry without application changes.

architecture
architecture · networking · kubernetes

SLO, SLI, and SLA

SLIs measure service behavior, SLOs set an internal reliability target, and SLAs define the contractual consequences of missing it.

reliability
reliability · observability · operations

Split Brain

Split brain occurs when two parts of a distributed system both believe they are authoritative, accepting divergent writes that cannot be merged safely.

distributed-systems
distributed-systems · reliability · consistency

Strangler Fig

The strangler fig pattern replaces a legacy system incrementally by routing slices of traffic to new implementations until the old system can be retired.

architecture
architecture · migration · legacy

Supply Chain Security

Supply chain security protects the dependencies, build systems, and distribution channels that produce software, from lockfiles and pinned CI actions to SBOMs and provenance.

security
security · supply-chain · ci-cd

Telemetry Pipeline

A telemetry pipeline collects, processes, and routes logs, metrics, and traces from services to backends, controlling enrichment, sampling, and cost in one place.

reliability
reliability · observability · infrastructure

Test Pyramid

The test pyramid favors many fast unit tests, fewer integration tests, and a small number of end-to-end tests to balance feedback speed and confidence.

testing
testing · quality · architecture

Threat Modeling

Threat modeling identifies assets, trust boundaries, attackers, and mitigations before code is written, turning security from a checklist into a design activity.

security
security · design · risk

Thundering Herd

A thundering herd is a synchronized surge of retries, reconnects, or cache misses that overwhelms a recovering service and delays recovery further.

resilience
resilience · retries · caching

Timeout Budget

A timeout budget is a deadline shared across a request chain, so each call gets only the time remaining and retries cannot exceed the caller's patience.

resilience
resilience · timeouts · distributed-systems

TLS

TLS encrypts and authenticates data in transit, using certificates and a handshake to derive session keys. It protects network hops, not endpoints or data at rest.

security
security · networking

Trunk-Based Development

Trunk-based development keeps every engineer committing to one shared mainline at least daily, using short-lived branches, feature flags, and continuous integration to avoid merge hell.

delivery
delivery · version-control · ci-cd

Two-Phase Commit

Two-phase commit coordinates an atomic commit across multiple databases, at the cost of blocking, coordinator failure, and operational complexity.

data-consistency
distributed-systems · transactions · consistency

Vector Clock

A vector clock tracks causal relationships between events across nodes, detecting concurrency that a single timestamp or counter cannot express.

distributed-systems
distributed-systems · consistency · causality

Webhooks

Webhooks push events to subscriber HTTP endpoints in near real time, replacing constant polling with signed, retried deliveries that consumers must verify and deduplicate.

web
webhooks · events · integration

Write-Ahead Logging

Write-ahead logging persists changes to a sequential log before applying them to data files, enabling atomic commit and crash recovery.

databases
databases · durability · storage

Write Amplification

Write amplification is the ratio of bytes physically written to bytes logically changed, driven by indexes, replication, logging, and storage compaction.

databases
databases · storage · performance

Zero Trust

Zero trust treats every request as untrusted until authenticated and authorized, replacing implicit network trust with identity, policy, and continuous verification.

security
security · architecture · access-control

Backpressure

Backpressure is a flow-control signal that tells a fast producer to slow down when a downstream consumer cannot keep up, preventing unbounded queues and memory growth.

resilience
resilience · streams · queues · performance

Cache Invalidation

Cache invalidation is the policy that decides when cached data stops being trustworthy, using TTLs, versioned keys, or explicit purge events to avoid stale reads.

performance
performance · caching · consistency

CAP Theorem

During a network partition a distributed system must choose between consistency and availability. CAP is a narrow guarantee, not a general ranking of databases.

distributed-systems
distributed-systems · consistency · availability

Circuit Breaker

A circuit breaker stops sending requests to a failing dependency after a threshold, failing fast while the dependency recovers instead of exhausting callers with timeouts.

resilience
resilience · distributed-systems · failure-handling

Cross-Site Request Forgery (CSRF)

CSRF tricks a victim's browser into sending an authenticated state-changing request to another site. Defenses use SameSite cookies, CSRF tokens, and origin checks.

security
security · web · authentication

Debounce and Throttle

Debounce delays work until input stops; throttle caps how often work runs. They solve different burst patterns and are not interchangeable.

performance
performance · events · javascript · rate-control

Event Loop Starvation

Event loop starvation happens when long synchronous work or unbounded microtasks prevent timers, I/O, and rendering from running, making a JavaScript process unresponsive.

runtime
runtime · performance · async · javascript

Eventual Consistency

Eventual consistency guarantees that replicas converge if updates stop, without promising when a read sees the latest write. Applications must handle stale reads and conflicts explicitly.

data-integrity
distributed-systems · consistency · databases

Graceful Shutdown

Graceful shutdown stops accepting new work, drains in-flight requests, and closes resources before the process exits, avoiding dropped responses and corrupted state.

operations
operations · deployment · reliability

Idempotency

An operation is idempotent when repeating it produces the same observable result as performing it once. It is the foundation of safe retries in distributed systems.

api-design
api-design · reliability · http · retries

Index Selectivity

Selectivity measures how many rows an index condition filters out. High-cardinality predicates and well-ordered composite indexes make lookups efficient; low-selectivity indexes often lose to scans.

data-integrity
databases · performance · indexing

JSON Web Token (JWT)

A JWT is a signed, URL-safe token with header, payload, and signature. It carries claims but is not encrypted by default, and verification must pin algorithms and validate claims.

security
security · authentication · tokens

N+1 Query Problem

The N+1 problem runs one query for a list and one more per row. Eager loading, joins, or batched lookups reduce it to a constant number of queries.

performance
performance · databases · orm

OAuth 2.0 Authorization Code Flow with PKCE

The authorization code flow delegates access without sharing passwords. PKCE binds the code exchange to the client, and state protects the redirect from CSRF.

security
security · oauth · authentication

Optimistic Concurrency

Optimistic concurrency detects conflicting writes with a version or timestamp instead of locking rows up front, allowing parallel work and retrying the loser.

data-integrity
data-integrity · concurrency · databases

Rate Limiting

Rate limiting controls how many requests a client may make in a time window, protecting shared capacity and enforcing fair use with explicit rejection signals.

security
security · api-design · traffic-control

Replication Lag

Replication lag is the delay between a primary write and its visibility on replicas, causing stale reads and missing read-after-write guarantees unless reads are routed deliberately.

data-integrity
databases · replication · consistency

Retry Budget

A retry budget caps retries as a fraction of successful traffic so that retry storms cannot amplify load during an outage.

resilience
resilience · retries · distributed-systems

SameSite Cookies

SameSite controls whether cookies are sent on cross-site requests. Lax, Strict, and None have different CSRF and usability trade-offs, and None requires Secure.

security
security · cookies · web

Single Flight

Single flight deduplicates concurrent calls for the same key so only one expensive operation runs while all callers share its result.

resilience
resilience · concurrency · caching

SQL Injection

SQL injection occurs when untrusted input changes query structure. Parameterized queries separate code from data and are the primary defense across languages and databases.

security
security · databases · injection

Transaction Isolation Levels

Isolation levels trade concurrency for protection against dirty reads, non-repeatable reads, phantom reads, and serialization anomalies. Match the level to the invariant.

data-integrity
databases · transactions · consistency

Cross-Site Scripting (XSS)

XSS injects attacker-controlled script into a page viewed by others. Output encoding, safe DOM APIs, and CSP limit execution, while input validation alone is insufficient.

security
security · web · xss

Closures and Lexical Scope

A closure is a function that captures variables from its surrounding lexical scope, preserving access to those variables after the outer function has returned.

language-fundamentals
javascript · scope · functional · fundamentals

Prototypal Inheritance

JavaScript's prototype-based object model where objects delegate behavior to other objects through an internal [[Prototype]] chain, forming the basis of property lookup and code reuse.

language-fundamentals
javascript · prototype · objects · inheritance

JavaScript Event Loop

The mechanism enabling JavaScript's single-threaded concurrency. It checks whether the call stack is empty and dequeues the next task or microtask.

runtime
javascript · async · runtime · concurrency · v8