fivenines

Learning library

Find the exact skill you want to practice.

Browse independently, or use Tracks when you want a recommended sequence.
166 tutorials
Build Your Own Redis20m

Single-node Core

Single-Node Key-Value Core

ArticlePracticeDesignFree

Build GET, SET, and DEL around one in-memory dictionary while defining clear command, reply, and missing-key semantics.

foundationOpen
Build Your Own Redis20m

Network Protocol

RESP Protocol Parser

ArticlePracticeDesignFree

Parse incremental RESP frames safely across partial reads, nested values, and malformed input before dispatching commands.

foundationOpen
Build Your Own Redis25m

Network Protocol

Client Connection Lifecycle

ArticlePracticeDesignFree

Trace each client from accept through buffered reads, command execution, queued replies, and connection teardown.

foundationOpen
Build Your Own Redis25m

Execution Core

Event Loop

ArticlePracticeDesignPro

Multiplex file readiness and timer work in one event loop while keeping handlers short enough to preserve responsiveness.

foundationOpen
Build Your Own Redis25m

Execution Core

Command Table And Dispatch

ArticlePracticeDesignPro

Drive validation, authorization, and execution from command metadata instead of hard-coding a separate request path for every command.

foundationOpen
Build Your Own Redis20m

Data Model

Redis Object Model

ArticlePracticeDesignPro

Separate logical value types from physical encodings so representation can change without changing command semantics.

foundationOpen
Build Your Own Redis25m

Data Model

Hash Table And Rehashing

ArticlePracticeDesignPro

Spread hash-table resizing across ordinary operations so rehashing avoids a single latency spike while lookups consult both tables.

foundationOpen
Build Your Own Redis25m

Memory Lifecycle

Expiration System

ArticlePracticeDesignPro

Combine lazy expiration on access with sampled active cleanup so expired keys disappear without blocking the server.

foundationOpen
Build Your Own Redis25m

Memory Lifecycle

Memory Limits And Eviction

ArticlePracticeDesignPro

Enforce maxmemory by selecting victims under an explicit eviction policy whose trade-offs match the workload.

foundationOpen
Build Your Own Redis25m

Data Model

Core Data Types

ArticlePracticeDesignPro

Choose encodings and operations for lists, hashes, sets, and sorted sets according to their access patterns and size.

foundationOpen
Build Your Own Redis25m

Command Behavior

Pipelining And Output Buffers

ArticlePracticeDesignPro

Pipeline requests to reduce round trips while bounding per-client output buffers so slow consumers cannot exhaust memory.

intermediateOpen
Build Your Own Redis30m

Command Behavior

Transactions

ArticlePracticeDesignPro

Queue commands between MULTI and EXEC, and use WATCH to abort optimistic transactions when observed keys change.

intermediateOpen
Build Your Own Redis25m

Command Behavior

Scripts/functions

ArticlePracticeDesignPro

Execute server-side scripts atomically by blocking interleaving, while controlling runtime so one script cannot stall every client.

intermediateOpen
Build Your Own Redis25m

Command Behavior

Pub/Sub

ArticlePracticeDesignPro

Fan published messages out to channel and pattern subscribers while accepting Pub/Sub's transient, at-most-once delivery semantics.

intermediateOpen
Build Your Own Redis30m

Command Behavior

Streams

ArticlePracticeDesignPro

Use ordered stream IDs, pending-entry tracking, acknowledgements, and claiming to divide durable work among consumers.

intermediateOpen
Build Your Own Redis30m

Persistence

RDB Snapshotting

ArticlePracticeDesignPro

Create point-in-time snapshots with fork and copy-on-write, balancing compact recovery files against snapshot cost and possible data loss.

intermediateOpen
Build Your Own Redis30m

Persistence

AOF Persistence

ArticlePracticeDesignPro

Use an append-only command log plus background rewrite to trade recovery fidelity against write amplification and file growth.

intermediateOpen
Build Your Own Redis30m

Persistence

Startup Recovery

ArticlePracticeDesignPro

Restore persisted state by loading an RDB snapshot or replaying AOF commands before accepting client traffic.

intermediateOpen
Build Your Own Redis30m

Replication And Failover

Replication: Full Sync

ArticlePracticeDesignPro

Bootstrap a replica from a consistent snapshot, then stream buffered writes so it catches up without losing changes made during transfer.

advancedOpen
Build Your Own Redis30m

Replication And Failover

Replication: Partial Sync

ArticlePracticeDesignPro

Resume replication from IDs, offsets, and a bounded backlog when history is available, falling back to full synchronization when it is not.

advancedOpen
Build Your Own Redis30m

Replication And Failover

Failover Controller

ArticlePracticeDesignPro

Use independent monitors, quorum, and epochs to promote one replica without letting competing observers create split-brain.

advancedOpen
Build Your Own Redis30m

Clustering

Cluster Sharding

ArticlePracticeDesignPro

Partition keys into hash slots and use MOVED redirects so clients can discover which node owns each key.

advancedOpen
Build Your Own Redis30m

Clustering

Cluster Resharding

ArticlePracticeDesignPro

Move hash slots live with migrating and importing states, ASK redirects, and dual-node coordination that preserves availability.

advancedOpen
Build Your Own Redis30m

Capstone

track Redis-Like System

ArticlePracticeDesignPro

Integrate protocol parsing, event handling, data structures, persistence, replication, and clustering into one coherent Redis-like system.

advancedOpen
Build Your Own PostgreSQL6m

Promises And Server Shape

What a database is really promising

ArticlePractice

A database earns trust by defending three contracts under pressure: acknowledged changes remain recoverable, concurrent state stays coherent, and declarative questions preserve their meaning as execution routes change.

foundationOpen
Build Your Own PostgreSQL20m

Promises And Server Shape

Processes, memory, and the shared system

ArticlePracticeDesignFree

PostgreSQL presents one database through many backend processes: each connection owns private working memory, while backends and background processes coordinate through shared memory and durable files.

foundationOpen
Build Your Own PostgreSQL20m

Promises And Server Shape

The Wire Protocol and Session Lifecycle

ArticlePracticeDesignFree

A PostgreSQL connection is a state machine: startup establishes identity, normal messages advance explicit query and transaction states, and errors, cancellation, and termination each have defined recovery consequences.

foundationOpen
Build Your Own PostgreSQL6m

SQL Meaning Pipeline

SQL as a Language of Relations

ArticlePractice

SQL fixes the desired relation while leaving PostgreSQL free to choose its execution order, provided every transformation preserves duplicates, null semantics, types, and observable ordering.

foundationOpen
Build Your Own PostgreSQL6m

SQL Meaning Pipeline

Parsing SQL into trees

ArticlePractice

Raw parsing establishes grammatical structure, not database meaning: tokens and precedence become a faithful tree while object identity, types, operators, and privileges remain unresolved.

foundationOpen
Build Your Own PostgreSQL25m

SQL Meaning Pipeline

Binding Names, Types, and Schemas

ArticlePracticeDesignFree

Binding freezes SQL meaning for a statement: visible names become catalog identities, expressions receive concrete types and operators, and privileges are checked before strategy begins.

intermediateOpen
Build Your Own PostgreSQL6m

Planning And Execution

Turning queries into logical plans

ArticlePractice

Logical planning may rearrange an analyzed query only across proven semantic equivalences; predicates, joins, projections, and subqueries are opportunities until SQL or security boundaries make their order observable.

foundationOpen
Build Your Own PostgreSQL6m

Planning And Execution

Costs, cardinality, and choosing a plan

ArticlePractice

Physical planning is a decision under uncertainty: PostgreSQL prices semantically valid paths from estimated cardinalities, so correct results are guaranteed while good performance depends on statistical evidence.

foundationOpen
Build Your Own PostgreSQL25m

Planning And Execution

Executors as Iterator Machines

ArticlePracticeDesignPro

Execution is demand-driven composition: plan nodes share a lifecycle and tuple interface, allowing streaming pipelines, blocking operators, visibility checks, and cleanup to cooperate without exposing their internals.

intermediateOpen
Build Your Own PostgreSQL25m

Storage And Durability

Rows, Pages, and Heap Storage

ArticlePracticeDesignPro

Heap storage gives each physical tuple version a page-and-item address; line pointers keep that address stable within a page, while logical row identity and version lifetime remain separate concerns.

intermediateOpen
Build Your Own PostgreSQL25m

Storage And Durability

Buffer Pools and the Memory-Disk Border

ArticlePracticeDesignPro

Shared buffers maintain one coherent in-memory identity per cached page: pins protect frame lifetime, short synchronization protects contents, and the WAL rule constrains when dirty pages may cross to disk.

intermediateOpen
Build Your Own PostgreSQL30m

Storage And Durability

Write-Ahead Logging and the Durability Contract

ArticlePracticeDesignPro

WAL decouples commit from data-page placement through two orderings: durable commit waits for required log records, and a dirty page may reach disk only after WAL that explains its state.

advancedOpen
Build Your Own PostgreSQL30m

Storage And Durability

Transactions and the illusion of instant change

ArticlePracticeDesignPro

Transactions make many physical traces carry one outcome: tuple metadata and transaction status determine whether work is committed or aborted, while WAL and later cleanup operate on separate schedules.

advancedOpen
Build Your Own PostgreSQL30m

Concurrency And History

MVCC and reading the past

ArticlePracticeDesignPro

MVCC preserves a snapshot invariant: each reader combines tuple-version metadata with transaction outcomes to see one coherent past, while writers create future versions and vacuum later reclaims unreachable history.

advancedOpen
Build Your Own PostgreSQL30m

Concurrency And History

Locks, Latches, and Coordination

ArticlePracticeDesignPro

Coordination primitives must match resource and lifetime: heavyweight locks defend logical claims, while LWLocks, spinlocks, and buffer content locks protect shared internals only for short critical sections.

advancedOpen
Build Your Own PostgreSQL25m

Concurrency And History

Indexes as ordered shortcuts

ArticlePracticeDesignPro

A B-tree preserves ordered routes from keys to physical tuple candidates; it can narrow work or supply order, but heap and transaction state remain authoritative for MVCC visibility.

intermediateOpen
Build Your Own PostgreSQL6m

Concurrency And History

Maintaining indexes through change

ArticlePractice

Index maintenance must never omit a candidate for a visible tuple; PostgreSQL may retain obsolete candidates for MVCC rechecks, use HOT chains when keys stay fixed, and remove dead routes later.

foundationOpen
Build Your Own PostgreSQL30m

Concurrency And History

Vacuum and the Cost of History

ArticlePracticeDesignPro

Vacuum reclaims history only after a visibility-horizon proof shows no relevant snapshot can need it, then reconciles heap space, index routes, visibility metadata, and transaction-ID age.

advancedOpen
Build Your Own PostgreSQL30m

Recovery Metadata And Extensibility

Checkpoints and Crash Recovery

ArticlePracticeDesignPro

A checkpoint bounds where redo must begin; recovery then compares ordered WAL with each page's state, reapplies missing effects, and restores committed history without treating the checkpoint as the commit guarantee.

advancedOpen
Build Your Own PostgreSQL25m

Recovery Metadata And Extensibility

Catalogs as the database about the database

ArticlePracticeDesignPro

PostgreSQL describes itself with transactional catalog relations: stable identities and dependencies preserve structural meaning, while locks, visibility, caching, and invalidation make live DDL coherent.

intermediateOpen
Build Your Own PostgreSQL30m

Recovery Metadata And Extensibility

Functions, Operators, and Extensibility

ArticlePracticeDesignPro

PostgreSQL extensibility is a metadata contract: implementations join typed catalog interfaces, while declared semantic properties constrain every optimization and storage structure that trusts them.

advancedOpen
Build Your Own PostgreSQL30m

Scale And Distributed Shape

Isolation Levels and Anomalies

ArticlePracticeDesignPro

Isolation levels define which concurrent histories applications may observe; PostgreSQL strengthens the contract from statement snapshots to stable snapshots to serializable histories enforced through possible abort and retry.

advancedOpen
Build Your Own PostgreSQL30m

Scale And Distributed Shape

Replication and Streaming Change

ArticlePracticeDesignPro

Streaming replication exports ordered history, but receipt, write, durable flush, and replay are distinct progress claims; availability, commit safety, and read freshness depend on which position the contract names.

advancedOpen
Build Your Own PostgreSQL30m

Scale And Distributed Shape

Partitioning and distributed shape

ArticlePracticeDesignPro

Partitioning preserves one logical relation by proving which local children can contain a read and routing each write to one bound; indexing, replication, and sharding solve different problems.

advancedOpen
Build Your Own PostgreSQL30m

Architecture Synthesis

The Whole Machine

ArticlePracticeDesignPro

PostgreSQL is a chain of handoff invariants: session context becomes bound meaning, equivalent plans become visible tuple work, and ordered physical changes become recoverable committed history.

advancedOpen
Build Your Own Uber5m

Orientation

The product: a ride exchange

ArticlePractice

Model ride hailing as a two-sided, real-time marketplace whose core loop is request, quote, match, trip, payment, and feedback.

foundationOpen
Build Your Own Uber5m

Orientation

Non-functional requirements: nines math and the scale envelope

ArticlePractice

Translate demand, latency, availability, durability, RPO, and RTO into numeric constraints that architecture decisions can be tested against.

foundationOpen
Build Your Own Uber20m

Three Nines — 99.9%

The system skeleton

ArticlePracticeDesignFree

Separate edge, identity, marketplace, trip, payment, communication, and data-platform responsibilities around a small set of authoritative state flows.

foundationOpen
Build Your Own Uber20m

Three Nines — 99.9%

Identity and onboarding

ArticlePracticeDesignFree

Separate authentication, rider and driver profiles, document verification, and account state so onboarding checks do not leak into every service.

foundationOpen
Build Your Own Uber20m

Three Nines — 99.9%

Maps, routing, and ETA

ArticlePracticeDesignFree

Combine map data, routing, traffic signals, and continuous ETA correction while isolating uncertain predictions from trip truth.

foundationOpen
Build Your Own Uber20m

Three Nines — 99.9%

Driver presence and location ingestion

ArticlePracticeDesignPro

Ingest high-rate, ephemeral driver updates with freshness rules and spatial indexing so nearby-driver views remain useful without pretending every point is durable truth.

foundationOpen
Build Your Own Uber20m

Three Nines — 99.9%

Quotes and pricing v1: surge as market clearing

ArticlePracticeDesignPro

Produce expiring price quotes from supply and demand, using surge to balance the market without rewriting an accepted trip's price.

foundationOpen
Build Your Own Uber20m

Three Nines — 99.9%

The matching engine: clearing the market

ArticlePracticeDesignPro

Rank feasible driver–rider pairs under location, ETA, and marketplace constraints while keeping dispatch decisions explicit and auditable.

foundationOpen
Build Your Own Uber20m

Three Nines — 99.9%

Trip lifecycle: the state machine of record

ArticlePracticeDesignPro

Make the trip state machine the source of truth, enforcing legal transitions and idempotent commands across request, match, pickup, and completion.

foundationOpen
Build Your Own Uber20m

Three Nines — 99.9%

Payments, ledger, and payouts

ArticlePracticeDesignPro

Record money movement in an immutable double-entry ledger while isolating processor retries, reconciliation, and driver payouts from trip state.

foundationOpen
Build Your Own Uber20m

Three Nines — 99.9%

Notifications, chat, and masked calls

ArticlePracticeDesignPro

Treat push, chat, and masked calling as asynchronous, privacy-preserving channels that support a trip without becoming its source of truth.

foundationOpen
Build Your Own Uber20m

Three Nines — 99.9%

Ratings, history, support, and admin

ArticlePracticeDesignPro

Build read models and privileged workflows around immutable trip history so support actions are auditable and operational tools stay off the hot path.

foundationOpen
Build Your Own Uber20m

Three Nines — 99.9%

Infrastructure baseline: one region, three zones

ArticlePracticeDesignPro

Start with one region spread across three zones, using stateless services and zonally redundant data to survive a single-zone failure.

foundationOpen
Build Your Own Uber20m

Three Nines — 99.9%

Observability v1: golden signals and on-call

ArticlePracticeDesignPro

Instrument latency, traffic, errors, and saturation, then connect actionable alerts to an on-call response loop.

foundationOpen
Build Your Own Uber20m

Three Nines — 99.9%

Data platform, BI, and reporting v1

ArticlePracticeDesignPro

Move operational events into an analytical pipeline so reporting workloads cannot destabilize the transactional ride path.

foundationOpen
Build Your Own Uber5m

Three Nines — 99.9%

Recap: what 99.9% buys — and what breaks

ArticlePractice

Recognize that a three-nines baseline tolerates hours of annual disruption and still fails under zonal loss, overload, and fragile dependencies.

foundationOpen
Build Your Own Uber5m

Four Nines — 99.99%

SLOs, error budgets, and criticality tiers

ArticlePractice

Give user journeys explicit SLOs and criticality tiers so scarce reliability investment follows impact and remaining error budget.

foundationOpen
Build Your Own Uber25m

Four Nines — 99.99%

Hardening the topology

ArticlePracticeDesignPro

Remove hidden single points of failure by adding zonal redundancy, independent dependencies, health-aware routing, and bounded failover.

intermediateOpen
Build Your Own Uber25m

Four Nines — 99.99%

Data layer: sharding and automated failover

ArticlePracticeDesignPro

Shard state by stable ownership keys and automate fenced failover so growth and replica loss do not require unsafe manual intervention.

intermediateOpen
Build Your Own Uber25m

Four Nines — 99.99%

The event backbone: outbox, idempotency, replay

ArticlePracticeDesignPro

Publish state changes through a transactional outbox and make consumers idempotent so events can be retried and replayed safely.

intermediateOpen
Build Your Own Uber25m

Four Nines — 99.99%

Matching at scale: geo-sharded dispatch

ArticlePracticeDesignPro

Partition dispatch by geography, manage boundary spillover, and keep candidate search local enough to scale without missing viable drivers.

intermediateOpen
Build Your Own Uber25m

Four Nines — 99.99%

Resilience patterns: timeouts, breakers, shedding, degradation

ArticlePracticeDesignPro

Combine deadlines, bounded retries, circuit breakers, load shedding, and graceful degradation so dependency trouble does not cascade.

intermediateOpen
Build Your Own Uber25m

Four Nines — 99.99%

Multi-region disaster recovery: active–passive

ArticlePracticeDesignPro

Replicate critical state to a passive region and define detection, fencing, traffic shift, RPO, and RTO for a controlled regional failover.

intermediateOpen
Build Your Own Uber25m

Four Nines — 99.99%

Safe change: canaries, flags, and reversible migrations

ArticlePracticeDesignPro

Reduce deployment risk with canaries, feature flags, backward-compatible schemas, and migrations that can be paused or reversed.

intermediateOpen
Build Your Own Uber25m

Four Nines — 99.99%

Observability v2: SLO-driven operations

ArticlePracticeDesignPro

Turn user-facing SLIs into SLOs and error budgets that govern alerting, reliability work, and release pace.

intermediateOpen
Build Your Own Uber25m

Four Nines — 99.99%

Streaming data platform and real-time BI

ArticlePracticeDesignPro

Stream immutable operational events into replayable processing so real-time metrics and features do not couple analytics to production databases.

intermediateOpen
Build Your Own Uber25m

Four Nines — 99.99%

Fraud, security, and compliance

ArticlePracticeDesignPro

Layer identity, authorization, encryption, audit trails, and risk signals around sensitive ride and payment flows without overloading the hot path.

intermediateOpen
Build Your Own Uber5m

Four Nines — 99.99%

Recap: the four-nines checklist

ArticlePractice

Validate that every critical ride path has zonal redundancy, bounded failover, overload protection, observability, and safe-change controls.

foundationOpen
Build Your Own Uber30m

Five Nines — 99.999%

Where five nines is worth it — and where it's waste

ArticlePracticeDesignPro

Apply five nines only to safety- and trip-critical paths, allowing less critical analytics and convenience features to fail more cheaply.

advancedOpen
Build Your Own Uber30m

Five Nines — 99.999%

Active–active multi-region with regional homes

ArticlePracticeDesignPro

Assign each trip and user a regional home while serving traffic from multiple regions, avoiding cross-region write conflicts during normal operation.

advancedOpen
Build Your Own Uber30m

Five Nines — 99.999%

Cell-based architecture: bounding the blast radius

ArticlePracticeDesignPro

Group compute and data into repeatable cells so a hot market or failed dependency affects only its assigned riders and drivers.

advancedOpen
Build Your Own Uber30m

Five Nines — 99.999%

State at five nines: quorum truth, ephemeral speed

ArticlePracticeDesignPro

Use quorum-backed storage for authoritative state and disposable fast stores for location and presence, matching consistency cost to data semantics.

advancedOpen
Build Your Own Uber30m

Five Nines — 99.999%

Static stability: the data plane outlives the control plane

ArticlePracticeDesignPro

Precompute and cache routing and ownership decisions so existing rides continue when control-plane services are unavailable.

advancedOpen
Build Your Own Uber30m

Five Nines — 99.999%

Client-side resilience: the app is part of the architecture

ArticlePracticeDesignPro

Make mobile clients retry safely, cache useful state, and communicate degraded service because intermittent networks are part of the system.

advancedOpen
Build Your Own Uber5m

Five Nines — 99.999%

Chaos engineering and gamedays: rehearsing the theory

ArticlePractice

Use hypothesis-driven failure injection and gamedays to prove that detection, degradation, and recovery work under realistic conditions.

foundationOpen
Build Your Own Uber30m

Five Nines — 99.999%

Observability v3: probes, client truth, and auto-remediation

ArticlePracticeDesignPro

Combine synthetic probes, client telemetry, and guarded automation to detect failures invisible to server metrics and remediate known cases safely.

advancedOpen
Build Your Own Uber5m

Five Nines — 99.999%

The operating model and the cost of a nine

ArticlePractice

Treat additional availability as an ongoing staffing and complexity cost, supported by ownership, runbooks, incident learning, and capacity discipline.

foundationOpen
Build Your Own Uber30m

Five Nines — 99.999%

The final architecture

ArticlePracticeDesignPro

Assemble cells, regional homes, durable event flows, layered state, observability, and safe operations into one selectively five-nines ride exchange.

advancedOpen
Build Your Own Stock Exchange5m

Orientation

What a stock exchange actually does

ArticlePractice

Understand an exchange as an ordered market that accepts constrained orders, discovers prices, publishes trades, and hands obligations downstream.

foundationOpen
Build Your Own Stock Exchange5m

Orientation

The full requirements map

ArticlePractice

Map functional flows, scale, latency, consistency, availability, and recovery requirements before committing to component boundaries.

foundationOpen
Build Your Own Stock Exchange5m

Orientation

Reading the nines: availability as a budget

ArticlePractice

Convert availability percentages into concrete downtime and failed-request budgets before choosing an architecture.

foundationOpen
Build Your Own Stock Exchange20m

Three Nines — 99.9%

Architecture of a complete exchange

ArticlePracticeDesignFree

Decompose an exchange into order entry, risk, matching, market data, and post-trade boundaries connected by explicit event flows.

foundationOpen
Build Your Own Stock Exchange20m

Three Nines — 99.9%

The life of an order

ArticlePracticeDesignFree

Trace an order through validation, risk, sequencing, matching, acknowledgement, market data, and post-trade processing.

foundationOpen
Build Your Own Stock Exchange20m

Three Nines — 99.9%

The order book and price-time priority

ArticlePracticeDesignFree

Represent bids and asks so the matcher always selects the best price first and preserves arrival order within each price level.

foundationOpen
Build Your Own Stock Exchange20m

Three Nines — 99.9%

The order state machine

ArticlePracticeDesignPro

Encode accepted, active, partially filled, filled, canceled, and rejected transitions so retries cannot produce impossible order states.

foundationOpen
Build Your Own Stock Exchange20m

Three Nines — 99.9%

Order types and time in force

ArticlePracticeDesignPro

Translate order types and time-in-force rules into explicit matching constraints so execution behavior is deterministic and testable.

foundationOpen
Build Your Own Stock Exchange20m

Three Nines — 99.9%

Auctions, halts, and safeguards

ArticlePracticeDesignPro

Use auctions, volatility controls, and trading halts to restore orderly price discovery when continuous matching becomes unsafe.

foundationOpen
Build Your Own Stock Exchange20m

Three Nines — 99.9%

Determinism: the event log is the exchange

ArticlePracticeDesignPro

Make every matching decision a deterministic function of an ordered event log so replicas can replay and recover identical state.

foundationOpen
Build Your Own Stock Exchange20m

Three Nines — 99.9%

Market data at scale

ArticlePracticeDesignPro

Publish sequenced snapshots and incremental updates through a fanout path that lets consumers detect gaps and rebuild state.

foundationOpen
Build Your Own Stock Exchange20m

Three Nines — 99.9%

Accounts, custody, and pre-trade risk

ArticlePracticeDesignPro

Keep matching fast and safe by checking balances, positions, limits, and custody constraints before an order reaches the book.

foundationOpen
Build Your Own Stock Exchange20m

Three Nines — 99.9%

Post-trade: clearing and settlement

ArticlePracticeDesignPro

Separate execution from clearing and settlement, carrying immutable trades into obligations, netting, and final asset transfer.

foundationOpen
Build Your Own Stock Exchange20m

Three Nines — 99.9%

Scaling to millions of users

ArticlePracticeDesignPro

Scale participants by partitioning session and market-data fanout while preserving a narrow, deterministically ordered matching core.

foundationOpen
Build Your Own Stock Exchange20m

Three Nines — 99.9%

Operating at three nines: crash, restart, replay

ArticlePracticeDesignPro

Achieve a credible three-nines baseline by persisting ordered events and rebuilding deterministic state after process crashes.

foundationOpen
Build Your Own Stock Exchange6m

Four Nines — 99.99%

The four-nines contract: audit your SPOFs

ArticlePractice

Audit every critical request path for single points of failure, including hidden dependencies shared across otherwise redundant components.

foundationOpen
Build Your Own Stock Exchange25m

Four Nines — 99.99%

The hot standby: replicated state machines

ArticlePracticeDesignPro

Replicate an ordered input log to a hot standby so deterministic replay produces a ready-to-promote copy of matching state.

intermediateOpen
Build Your Own Stock Exchange25m

Four Nines — 99.99%

Reliable messaging: gaps, NAKs, retransmits

ArticlePracticeDesignPro

Sequence messages and repair detected gaps with NAKs, retransmission, and snapshots instead of pretending packet delivery is perfect.

intermediateOpen
Build Your Own Stock Exchange25m

Four Nines — 99.99%

Sessions that survive failure

ArticlePracticeDesignPro

Decouple durable session identity and sequence state from individual gateways so clients can reconnect without duplicating or losing orders.

intermediateOpen
Build Your Own Stock Exchange25m

Four Nines — 99.99%

Change without downtime

ArticlePracticeDesignPro

Deploy compatible, reversible changes with canaries, dual-version protocols, and staged migrations so trading continues during upgrades.

intermediateOpen
Build Your Own Stock Exchange25m

Four Nines — 99.99%

Deciding who leads: failure detection without split-brain

ArticlePracticeDesignPro

Combine failure detection, quorum-backed leases, fencing, and epochs so only one matching leader can accept orders.

intermediateOpen
Build Your Own Stock Exchange25m

Four Nines — 99.99%

Degrade, don't die: overload protection

ArticlePracticeDesignPro

Protect order entry and matching with admission control and load shedding, degrading noncritical work before queues collapse.

intermediateOpen
Build Your Own Stock Exchange25m

Four Nines — 99.99%

Four nines at scale: multi-zone anatomy

ArticlePracticeDesignPro

Reach four nines by spreading critical components across zones, removing shared failure domains, and automating bounded failover.

intermediateOpen
Build Your Own Stock Exchange25m

Four Nines — 99.99%

The four-nines architecture, assembled

ArticlePracticeDesignPro

Assemble multi-zone redundancy, automated failover, durable logs, and overload controls into a coherent four-nines exchange.

intermediateOpen
Build Your Own Stock Exchange7m

Five Nines — 99.999%

Five nines where it counts — and nowhere else

ArticlePractice

Reserve five-nines engineering for the trading paths whose failure causes the most harm, and give supporting systems cheaper targets.

foundationOpen
Build Your Own Stock Exchange30m

Five Nines — 99.999%

Consensus in the hot path

ArticlePracticeDesignPro

Keep consensus out of per-order execution where possible, using it to establish ownership while a single leader orders the hot path.

advancedOpen
Build Your Own Stock Exchange30m

Five Nines — 99.999%

Losing a datacenter gracefully

ArticlePracticeDesignPro

Survive regional loss with preplanned traffic shifts, fenced ownership, replicated state, and explicit recovery-point trade-offs.

advancedOpen
Build Your Own Stock Exchange30m

Five Nines — 99.999%

Cells: capping the blast radius

ArticlePracticeDesignPro

Partition the exchange into self-contained cells so overload or failure in one market segment cannot consume the whole platform.

advancedOpen
Build Your Own Stock Exchange30m

Five Nines — 99.999%

Gray failures and chaos drills

ArticlePracticeDesignPro

Expose partial and ambiguous failures with targeted probes and chaos drills that verify detection, isolation, and recovery before production does.

advancedOpen
Build Your Own Stock Exchange30m

Five Nines — 99.999%

The riskiest component is change

ArticlePracticeDesignPro

Treat deployment as a failure mode and reduce its blast radius with staged rollout, compatibility, observability, and fast rollback.

advancedOpen
Build Your Own Stock Exchange9m

Five Nines — 99.999%

The five-nines architecture, assembled

ArticlePractice

Assemble cells, multi-region ownership, static stability, and disciplined operations into a five-nines design with bounded failure domains.

foundationOpen
Build Your Own Stock Exchange30m

Five Nines — 99.999%

track: the whole exchange, end to end

ArticlePracticeDesignPro

Connect order entry, risk, deterministic matching, market data, clearing, and recovery into one end-to-end exchange design.

advancedOpen
Build Your Own Stock Exchange7m

The Fast Exchange — Milliseconds to Microseconds

Latency is a fairness property

ArticlePractice

Control latency variance across participants because unequal access time can distort price-time priority even when matching is correct.

foundationOpen
Build Your Own Stock Exchange30m

The Fast Exchange — Milliseconds to Microseconds

Measuring without lying

ArticlePracticeDesignPro

Measure end-to-end latency with coordinated timestamps, percentiles, and realistic load so queues and tail behavior remain visible.

Build Your Own Stock Exchange30m

The Fast Exchange — Milliseconds to Microseconds

The millisecond rung: architecture-level latency

ArticlePracticeDesignPro

Reach millisecond latency by shortening synchronous paths, bounding queues, colocating dependencies, and eliminating avoidable network hops.

Build Your Own Stock Exchange30m

The Fast Exchange — Milliseconds to Microseconds

The microsecond rung: mechanical sympathy

ArticlePracticeDesignPro

Reach microsecond latency by aligning data layout, CPU affinity, memory access, and network I/O with the hardware's actual costs.

Build Your Own Stock Exchange9m

The Fast Exchange — Milliseconds to Microseconds

Jitter: the tail is the product

ArticlePractice

Treat tail latency and jitter as first-class outcomes because unpredictable delay undermines both throughput and participant fairness.

foundationOpen
Build Your Own Stock Exchange30m

The Fast Exchange — Milliseconds to Microseconds

Fairness engineering

ArticlePracticeDesignPro

Turn fairness into enforceable ordering rules, synchronized ingress, and auditable timestamps rather than relying on average latency.

Build Your Own Stock Exchange30m

The Fast Exchange — Milliseconds to Microseconds

When nines fight microseconds

ArticlePracticeDesignPro

Resolve reliability–latency conflicts by keeping the hot path minimal while moving replication and recovery work to carefully bounded boundaries.

Build Your Own Docker10m

Foundations

What Problem Does Docker Solve?

ArticlePractice

Learn What Problem Does Docker Solve? while evolving MiniDock, a complete container engine designed from first principles.

foundationOpen
Build Your Own Docker10m

Foundations

Containers vs. Virtual Machines

ArticlePractice

Learn Containers vs. Virtual Machines while evolving MiniDock, a complete container engine designed from first principles.

foundationOpen
Build Your Own Docker20m

Foundations

The Layered Runtime Architecture

ArticlePracticeDesignFree

Learn The Layered Runtime Architecture while evolving MiniDock, a complete container engine designed from first principles.

foundationOpen
Build Your Own Docker20m

Foundations

Namespaces: The Walls

ArticlePracticeDesignFree

Learn Namespaces: The Walls while evolving MiniDock, a complete container engine designed from first principles.

foundationOpen
Build Your Own Docker20m

Foundations

Cgroups: The Meters

ArticlePracticeDesignFree

Learn Cgroups: The Meters while evolving MiniDock, a complete container engine designed from first principles.

foundationOpen
Build Your Own Docker25m

Foundations

The Security Sandwich

ArticlePracticeDesignPro

Learn The Security Sandwich while evolving MiniDock, a complete container engine designed from first principles.

intermediateOpen
Build Your Own Docker10m

Images

Anatomy of an Image

ArticlePractice

Learn Anatomy of an Image while evolving MiniDock, a complete container engine designed from first principles.

foundationOpen
Build Your Own Docker20m

Images

Content Addressing

ArticlePracticeDesignPro

Learn Content Addressing while evolving MiniDock, a complete container engine designed from first principles.

foundationOpen
Build Your Own Docker20m

Images

Union Filesystems

ArticlePracticeDesignPro

Learn Union Filesystems while evolving MiniDock, a complete container engine designed from first principles.

foundationOpen
Build Your Own Docker10m

Images

Building Images

ArticlePractice

Learn Building Images while evolving MiniDock, a complete container engine designed from first principles.

foundationOpen
Build Your Own Docker25m

Images

The Build Cache

ArticlePracticeDesignPro

Learn The Build Cache while evolving MiniDock, a complete container engine designed from first principles.

intermediateOpen
Build Your Own Docker20m

Images

Multi-Stage Builds

ArticlePracticeDesignPro

Learn Multi-Stage Builds while evolving MiniDock, a complete container engine designed from first principles.

foundationOpen
Build Your Own Docker25m

Images

The On-Disk Stores

ArticlePracticeDesignPro

Learn The On-Disk Stores while evolving MiniDock, a complete container engine designed from first principles.

intermediateOpen
Build Your Own Docker25m

Distribution

Registry Architecture

ArticlePracticeDesignPro

Learn Registry Architecture while evolving MiniDock, a complete container engine designed from first principles.

intermediateOpen
Build Your Own Docker25m

Distribution

Pull, End to End

ArticlePracticeDesignPro

Learn Pull, End to End while evolving MiniDock, a complete container engine designed from first principles.

intermediateOpen
Build Your Own Docker25m

Distribution

Push and Dedup

ArticlePracticeDesignPro

Learn Push and Dedup while evolving MiniDock, a complete container engine designed from first principles.

intermediateOpen
Build Your Own Docker25m

Distribution

Tags, References, and Garbage

ArticlePracticeDesignPro

Learn Tags, References, and Garbage while evolving MiniDock, a complete container engine designed from first principles.

intermediateOpen
Build Your Own Docker25m

Runtime

The Container Lifecycle

ArticlePracticeDesignPro

Learn The Container Lifecycle while evolving MiniDock, a complete container engine designed from first principles.

intermediateOpen
Build Your Own Docker30m

Runtime

docker run: The Full Picture

ArticlePracticeDesignPro

Learn docker run: The Full Picture while evolving MiniDock, a complete container engine designed from first principles.

advancedOpen
Build Your Own Docker10m

Runtime

Copy-on-Write at Runtime

ArticlePractice

Learn Copy-on-Write at Runtime while evolving MiniDock, a complete container engine designed from first principles.

foundationOpen
Build Your Own Docker25m

Runtime

Supervision and Restart Policies

ArticlePracticeDesignPro

Learn Supervision and Restart Policies while evolving MiniDock, a complete container engine designed from first principles.

intermediateOpen
Build Your Own Docker25m

Runtime

exec, attach, and logs

ArticlePracticeDesignPro

Learn exec, attach, and logs while evolving MiniDock, a complete container engine designed from first principles.

intermediateOpen
Build Your Own Docker25m

Runtime

Stopping Gracefully

ArticlePracticeDesignPro

Learn Stopping Gracefully while evolving MiniDock, a complete container engine designed from first principles.

intermediateOpen
Build Your Own Docker25m

Runtime

Health Checks

ArticlePracticeDesignPro

Learn Health Checks while evolving MiniDock, a complete container engine designed from first principles.

intermediateOpen
Build Your Own Docker20m

Storage

Volumes, Binds, tmpfs

ArticlePracticeDesignPro

Learn Volumes, Binds, tmpfs while evolving MiniDock, a complete container engine designed from first principles.

foundationOpen
Build Your Own Docker25m

Storage

Volume Lifecycle and Drivers

ArticlePracticeDesignPro

Learn Volume Lifecycle and Drivers while evolving MiniDock, a complete container engine designed from first principles.

intermediateOpen
Build Your Own Docker25m

Storage

Storage Drivers

ArticlePracticeDesignPro

Learn Storage Drivers while evolving MiniDock, a complete container engine designed from first principles.

intermediateOpen
Build Your Own Docker25m

Networking

The Container Network Model

ArticlePracticeDesignPro

Learn The Container Network Model while evolving MiniDock, a complete container engine designed from first principles.

intermediateOpen
Build Your Own Docker25m

Networking

Bridge Networking

ArticlePracticeDesignPro

Learn Bridge Networking while evolving MiniDock, a complete container engine designed from first principles.

intermediateOpen
Build Your Own Docker25m

Networking

Publishing Ports

ArticlePracticeDesignPro

Learn Publishing Ports while evolving MiniDock, a complete container engine designed from first principles.

intermediateOpen
Build Your Own Docker25m

Networking

DNS and Service Discovery

ArticlePracticeDesignPro

Learn DNS and Service Discovery while evolving MiniDock, a complete container engine designed from first principles.

intermediateOpen
Build Your Own Docker25m

Networking

Host, None, and the Driver Seam

ArticlePracticeDesignPro

Learn Host, None, and the Driver Seam while evolving MiniDock, a complete container engine designed from first principles.

intermediateOpen
Build Your Own Docker30m

Networking

Overlay Networks

ArticlePracticeDesignPro

Learn Overlay Networks while evolving MiniDock, a complete container engine designed from first principles.

advancedOpen
Build Your Own Docker25m

Orchestration

Compose: Declarative Applications

ArticlePracticeDesignPro

Learn Compose: Declarative Applications while evolving MiniDock, a complete container engine designed from first principles.

intermediateOpen
Build Your Own Docker25m

Orchestration

Dependency Ordering

ArticlePracticeDesignPro

Learn Dependency Ordering while evolving MiniDock, a complete container engine designed from first principles.

intermediateOpen
Build Your Own Docker30m

Orchestration

Swarm Architecture

ArticlePracticeDesignPro

Learn Swarm Architecture while evolving MiniDock, a complete container engine designed from first principles.

advancedOpen
Build Your Own Docker30m

Orchestration

Services, Tasks, and Reconciliation

ArticlePracticeDesignPro

Learn Services, Tasks, and Reconciliation while evolving MiniDock, a complete container engine designed from first principles.

advancedOpen
Build Your Own Docker10m

Production & Capstone

Events, Logs, and Metrics

ArticlePractice

Learn Events, Logs, and Metrics while evolving MiniDock, a complete container engine designed from first principles.

foundationOpen
Build Your Own Docker30m

Production & Capstone

Hardening MiniDock

ArticlePracticeDesignPro

Learn Hardening MiniDock while evolving MiniDock, a complete container engine designed from first principles.

advancedOpen
Build Your Own Docker30m

Production & Capstone

track: The Full Map

ArticlePracticeDesignPro

Learn track: The Full Map while evolving MiniDock, a complete container engine designed from first principles.

advancedOpen