Dinesh/ Blog

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 first
  1. Updated ·systems

    HTTP 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 read
  2. Updated ·systems

    REST 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 read
  3. Updated ·systems

    GraphQL — 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 read
  4. Updated ·systems

    gRPC & 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 read
  5. Updated ·systems

    AuthN & 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 read
  6. Updated ·systems

    OS 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 read
  7. Updated ·systems

    Networking 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 read
  8. Updated ·systems

    Networking 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 read
  9. Updated ·systems

    Caching — 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 read
  10. Updated ·systems

    CDN — 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 read
  11. Updated ·systems

    CAP & PACELC — the Actual Trade-Offs

    Reason from operation histories to CAP and PACELC, compare configured database contracts, and choose consistency for checkout.

    20 min read
  12. Updated ·systems

    Replication — Leader/Follower, Multi-Leader, Leaderless

    Compare replication topologies, acknowledgment boundaries and lag; reason about quorum limits, session positions and fenced failover.

    19 min read
  13. Updated ·systems

    Consistency Models — Linearizable, Sequential, Eventual

    Test consistency with precise operation histories, independent session guarantees and bounded Python checks; choose contracts by invariant.

    20 min read
  14. Updated ·systems

    Consensus — 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 read
  15. Updated ·systems

    Sharding & 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 read
  16. Updated ·systems

    Message 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 read
  17. Updated ·systems

    Multi-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 read
  18. Updated ·systems

    Prometheus, 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 read
  19. Updated ·systems

    SLIs, 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 read
  20. Updated ·systems

    Incident Response — Runbooks, Postmortems, On-Call

    Coordinate technical response and communications, choose safe mitigations, verify full recovery and turn evidence into accountable learning.

    20 min read
  21. Updated ·systems

    AuthN 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 read
  22. Updated ·systems

    TLS 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 read
  23. Updated ·systems

    Design 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 read
  24. Updated ·systems

    Design 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 read
  25. Updated ·systems

    Design 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 read
  26. Updated ·systems

    Design 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 read
  27. Updated ·systems

    A metering ledger that survives a replay

    Put event identity and usage aggregation in one transaction, then test rollback, duplicates and conflicting payloads.

    12 min read
  28. Updated ·systems

    Release 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 read
  29. Updated ·systems

    Kimi 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 read
  30. Updated ·systems

    10 · 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 read
  31. Updated ·systems

    Capstone: 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 read
  32. Updated ·systems

    Monolith: 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 read
  33. Updated ·systems

    Kusto 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 read
  34. Updated ·systems

    RAG begins with an evidence boundary

    Build permission-filtered retrieval and a deterministic evidence packet before asking a model to synthesize an answer.

    24 min read
  35. Updated ·systems

    Learning 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 read
  36. Updated ·systems

    The 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 read
  37. Updated ·systems

    Recommendation quality starts before ranking

    An executable retrieve-score-rerank pipeline that exposes candidate recall and diversity trade-offs.

    11 min read
  38. Updated ·systems

    Capacity 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 read
  39. Updated ·systems

    Designing 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 read
  40. Updated ·systems

    Designing 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 read
  41. Updated ·systems

    Designing for Scale · URL Shortener

    Identifier probability and redirect policy. A source-bounded lesson with worked reasoning, failure analysis and explicit runtime limitations.

    9 min read
  42. Updated ·systems

    Token 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 read
  43. Updated ·systems

    Designing 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 read
  44. Updated ·systems

    Designing 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 read
  45. Updated ·systems

    Designing 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 read
  46. Updated ·systems

    Designing 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 read
  47. Updated ·systems

    Historical features need two clocks

    A point-in-time join lab that rejects future events and late backfills while preserving explicit TTL semantics.

    12 min read
  48. Updated ·systems

    Designing for Scale · Model Serving

    Budget model-serving queues, batching, memory and asymmetric scaling, then design bounded shadow deployments and controlled rollouts.

    22 min read
  49. Updated ·systems

    Designing 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 read
  50. Updated ·systems

    Designing 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 read
  51. Updated ·systems

    Designing 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 read
  52. Updated ·systems

    Systems 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 read
  53. Updated ·systems

    Replay 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 read
  54. Updated ·systems

    07 · 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 read
  55. Updated ·systems

    08 · Retries: a timeout is not a verdict

    Model a lost acknowledgement, define idempotent effects, and separate delivery, durable processing and response replay.

    13 min read
  56. Updated ·systems

    09 · 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 read
  57. Updated ·systems

    Recommendation 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 read
  58. Updated ·systems

    The 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 read
  59. Updated ·systems

    OWASP 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 read
  60. Updated ·systems

    System 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 read
  61. Published ·systems

    Designing 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