Subject / Published lessons
systems
Explore the ideas, work through an example, and save a lesson to return to.
Filters · 1 active
61 articles
Recently updated firstHTTP Fundamentals — Verbs, Status Codes, Headers, Caching
Interpret HTTP messages, methods and conditional response semantics; Separate cache freshness, validation, Vary and private data policies; Explain protocol versions, session state and bounded retry contracts.
20 min readREST API Design — Resources, Versioning, Idempotency
Design resources, domain actions, errors and compatible evolution; Implement atomic operation replay and bounded total-order pagination; Describe OpenAPI, correct deprecation dates and patch semantics.
20 min readGraphQL — Schema, Resolvers, N+1, When to Pick It
Trace typed GraphQL execution, nullability and mutation ordering; Compare exact naive and batched lookup results with scoped authorisation; Bound queries and distinguish persisted documents from allowlists.
20 min readgRPC & Protobuf — When RPC Wins
Define RPC messages and four streaming shapes with explicit limits; Verify Protobuf bytes, presence and mixed-schema compatibility; Distinguish message framing, deadlines, cancellation and durable effects.
20 min readAuthN & AuthZ — OAuth 2.0, OIDC, JWT
Token validation is more than decoding. A source-bounded lesson with worked reasoning, failure analysis and explicit runtime limitations.
20 min readOS Basics — Processes, Threads, Memory, FDs
Processes, threads and resource accounting. A source-bounded lesson with worked reasoning, failure analysis and explicit runtime limitations.
18 min readNetworking I — TCP/IP, DNS, Sockets
A reliable byte stream is not a durable message protocol. A source-bounded lesson with worked reasoning, failure analysis and explicit runtime limitations.
18 min readNetworking II — Load Balancers L4 vs L7, Reverse Proxies
Balance work, drain connections and bound retries. A source-bounded lesson with worked reasoning, failure analysis and explicit runtime limitations.
17 min readCaching — Cache-Aside, Write-Through, TTLs, Invalidation
Cache-aside races and lease ownership. A source-bounded lesson with worked reasoning, failure analysis and explicit runtime limitations.
18 min readCDN — Edge, Cache Hierarchies, Cache-Control
Cache keys are isolation boundaries. A source-bounded lesson with worked reasoning, failure analysis and explicit runtime limitations.
20 min readCAP & PACELC — the Actual Trade-Offs
Reason from operation histories to CAP and PACELC, compare configured database contracts, and choose consistency for checkout.
20 min readReplication — Leader/Follower, Multi-Leader, Leaderless
Compare replication topologies, acknowledgment boundaries and lag; reason about quorum limits, session positions and fenced failover.
19 min readConsistency Models — Linearizable, Sequential, Eventual
Test consistency with precise operation histories, independent session guarantees and bounded Python checks; choose contracts by invariant.
20 min readConsensus — Paxos & Raft Intuition
Quorum intersection is necessary but protocol rules carry the value. A source-bounded lesson with worked reasoning, failure analysis and explicit runtime limitations.
18 min readSharding & Partitioning Strategies
Choose hash, range or directory routing, measure movement and hot keys, and plan a versioned snapshot/stream migration with safe cutover.
19 min readMessage Queues — SQS, RabbitMQ, Kafka as Queue
Separate delivery attempts from business effects; compare queue/log contracts, budget retries and build a bounded idempotent-consumer model.
19 min readMulti-Region — Active-Passive, Active-Active, Failover
Match regional data authority, spare capacity and DNS recovery to RTO/RPO objectives; work through loss, fencing and failback examples.
18 min readPrometheus, Grafana, OpenTelemetry — Hands-on
Follow telemetry from instrumentation to queries and decisions: versioned stack wiring, weighted ratios, histogram semantics, dashboards and alert failure modes.
20 min readSLIs, SLOs & Error Budgets — the SRE Math
Define reliability in the right units, derive error budgets and burn rates, and test rolling-window alerts without confusing requests with downtime.
20 min readIncident Response — Runbooks, Postmortems, On-Call
Coordinate technical response and communications, choose safe mitigations, verify full recovery and turn evidence into accountable learning.
20 min readAuthN vs AuthZ, Sessions & Password Storage
Separate credential validation from permission decisions; reason about password storage, sessions, JWTs, revocation, tenant isolation and safe local tests.
20 min readTLS 1.3, PKI & Cert Lifecycle
Trace TLS 1.3 authentication and key agreement, inspect PKI trust boundaries, and operate certificate lifecycles without disabling verification.
21 min readDesign a URL Shortener — the Classic Warm-Up
Design a shortener around authoritative mappings, unique allocation, explicit redirect caching and takedown policies, with executable failure models.
23 min readDesign a Chat System — WebSockets, Delivery, Presence
Design idempotent durable chat acceptance, ordering, replay and receipts. Mechanisms, worked examples, failure analysis and complete practice answers.
18 min readDesign a Newsfeed / Recommender — Pull vs Push, Ranking
Derive push and pull costs from follower and reader activity. Mechanisms, worked examples, failure analysis and complete practice answers.
17 min readDesign an AI Chat Product — RAG + Agents + Serving
Design durable turn state, authorized retrieval and tool execution. Mechanisms, worked examples, failure analysis and complete practice answers.
19 min readA metering ledger that survives a replay
Put event identity and usage aggregation in one transaction, then test rollback, duplicates and conflicting payloads.
12 min readRelease gates need denominators, not reassuring scores
Combine deterministic checks, calibrated model judges, multimodal evidence and statistically explicit release gates without replacing human accountability.
24 min readKimi K3: architecture, derivations and a pinned-source audit
Derive KDA state updates, depth attention and latent expert routing; reconcile pinned Kimi architecture claims and execution limits.
56 min read10 · Capstone: a trustworthy local job notebook
Integrate validation, dependency checks, atomic event ingestion and retry tests. A runnable reference core and an evidence-based assessment rubric.
19 min readCapstone: an evidence service with replay-safe usage
Compose tenant-scoped retrieval, explicit abstention and a durable-event invariant into one executable failure lab.
6 min readMonolith: a source-backed study of real-time recommendation architecture
Explain full-key embedding admission, expiry and incremental synchronization. Mechanisms, worked examples, failure analysis and complete practice answers.
15 min readKusto and KQL — pipelines, safe queries and honest windows
Read KQL pipelines, reason about joins and aggregation, parameterize safe telemetry queries, and distinguish fixed bins from rolling windows.
24 min readRAG begins with an evidence boundary
Build permission-filtered retrieval and a deterministic evidence packet before asking a model to synthesize an answer.
24 min readLearning how to build an recommendation system from initial signals
Build candidate and propensity-model evaluation contracts without future leakage. Mechanisms, worked examples, failure analysis and complete practice answers.
20 min readThe 6-Month Learning Plan · 130 Sessions and a Foundations Lab
A coherent 130-session, 16-module engineering curriculum with 26 revisions, a protected ten-lesson Foundations Lab and honest pacing and prerequisite boundaries.
30 min readRecommendation quality starts before ranking
An executable retrieve-score-rerank pipeline that exposes candidate recall and diversity trade-offs.
11 min readCapacity estimates that survive an overload question
Derive traffic, storage, bandwidth, working set and backlog with explicit units, sensitivity analysis and exact retained laboratory programs.
22 min readDesigning for Scale · The Storage Decision Tree
Storage selection has several independent axes. A source-bounded lesson with worked reasoning, failure analysis and explicit runtime limitations.
8 min readDesigning for Scale · CAP and the Consistency Spectrum
CAP is a history argument, not a database label. A source-bounded lesson with worked reasoning, failure analysis and explicit runtime limitations.
9 min readDesigning for Scale · URL Shortener
Identifier probability and redirect policy. A source-bounded lesson with worked reasoning, failure analysis and explicit runtime limitations.
9 min readToken buckets: bursts, clocks and the atomic boundary
Implement and test one token bucket, then identify what changes when several servers enforce the same quota.
12 min readDesigning for Scale · Chat and Real-time Communication
Transport, durable acceptance and per-conversation order. A source-bounded lesson with worked reasoning, failure analysis and explicit runtime limitations.
9 min readDesigning for Scale · Newsfeed and Fan-out
Hybrid fan-out is a workload decision, not a law. A source-bounded lesson with worked reasoning, failure analysis and explicit runtime limitations.
8 min readDesigning for Scale · Typeahead and Search Autocomplete
Prefix lookup, top-k maintenance and hot prefixes. A source-bounded lesson with worked reasoning, failure analysis and explicit runtime limitations.
9 min readDesigning for Scale · Notification Systems
The provider acknowledgement is an uncertainty boundary. A source-bounded lesson with worked reasoning, failure analysis and explicit runtime limitations.
9 min readHistorical features need two clocks
A point-in-time join lab that rejects future events and late backfills while preserving explicit TTL semantics.
12 min readDesigning for Scale · Model Serving
Budget model-serving queues, batching, memory and asymmetric scaling, then design bounded shadow deployments and controlled rollouts.
22 min readDesigning for Scale · RAG and Vector Search
Build versioned authorized retrieval, compare exact and approximate search, fuse lexical and vector candidates, and test evidence boundaries.
24 min readDesigning for Scale · End-to-End Design Review I
Trace video upload, processing, publication, feed fanout and deletion through a worked capacity model and guarded state machine.
24 min readDesigning for Scale · End-to-End Design Review II
Protect ticket inventory through bounded admission, short transactions, durable holds and idempotent payment reconciliation with a SQLite state-machine fixture.
27 min readSystems laboratory: make the failure observable
A practical route from capacity estimates to replay-safe data, permission-aware retrieval and evidence-based release gates.
11 min readReplay is a feature; duplicate effects are a design choice
Choose partition keys and independent groups for hot, warm and cold ML pipelines. Mechanisms, worked examples, failure analysis and complete practice answers.
12 min read07 · Relations, joins and all-or-nothing changes
Build an in-memory SQLite notebook, preserve zero-event jobs in a join, and test rollback without confusing it with crash durability.
15 min read08 · Retries: a timeout is not a verdict
Model a lost acknowledgement, define idempotent effects, and separate delivery, durable processing and response replay.
13 min read09 · Bounded work: queues, deadlines and ownership
Reason about backlog growth, choose an overload policy and distinguish admission, completion and cancellation without running a server.
12 min readRecommendation Systems From Scratch
Candidate recall, exposure bias and constrained ranking. A source-bounded lesson with worked reasoning, failure analysis and explicit runtime limitations.
5 min readThe 3 Pillars — Metrics, Logs, Traces
Signals answer questions only if context survives. A source-bounded lesson with worked reasoning, failure analysis and explicit runtime limitations.
20 min readOWASP Top 10, Secrets Mgmt & Threat Modelling
Use the OWASP Top 10:2021 as a bounded risk map, then test interpreter and access boundaries and design secrets, STRIDE and dependency controls.
21 min readSystem Design Framework — Reqs, Capacity, HLD, Deep-Dive
A worked design-review method grounded in measurable requirements, consistent capacity arithmetic, complete request paths and defensible failure tradeoffs.
21 min readDesigning for Scale · Requirements to Architecture
Convert prompts into testable requirements, capacity constraints and failure contracts through four worked designs and a traceable review method.
24 min read