Low-level design
Topic, then cluster, then study. Recently added is the short list at the top.
Recently added
Show more- 3.ArchiveSweep - Concurrency, Symlinks & Hardlink Edge CasesWhich stages parallelize safely, how to aggregate errors without losing groups, symlink policy, hardlink reclaim math, and how to explain the design without overselling hash equality.
- 2.ArchiveSweep - Streaming SHA Solution & TestsFull runnable stdlib implementation: archive_sweep(root, workers) with scan, sample, stream hash, byte verify, ThreadPoolExecutor, and unittest coverage for duplicates, near-misses, symlinks, hard links, and empty files.
- 3.Comments and Replies - Concurrent IDs, Snapshots & Post IsolationConcurrent ID allocation, defensive snapshots, post isolation, lock granularity decision chart, follow-ups.
- 2.Comments and Replies - In-Memory Solution, Ordering & TestsFull CommentService Python+TS sketch with tests for order, validation, isolation, independent IDs, concurrency, snapshots.
- 3.Feature Flag Service - Evaluation Order & ConcurrencyWhy the kill switch short-circuits before the percentage, why get copies the flag, and how this round connects to progressive delivery.
- 2.Feature Flag Service - Sticky Bucket + Kill Switch Solution & TestsRunnable FlagStore with upsert, sticky SHA-256 bucketing, segment gates, kill-switch precedence, and a concurrent upsert/evaluate test.
Low-level design
OOP and SOLID class design for machine-coding LLD: interfaces, invariants, in-memory state, and concurrency you can implement and test.
ArchiveSweep
3 studies- 1.ArchiveSweep (File Deduplication) LLD - Spec, Pipeline & ConceptsMachine-coding LLD: recursively scan a directory tree, skip symlinks, collapse hard links to one inode, then find byte-identical duplicate groups with a staged pipeline (size -> sample prefix -> streaming SHA-256 -> byte verify).
- 2.ArchiveSweep - Streaming SHA Solution & TestsFull runnable stdlib implementation: archive_sweep(root, workers) with scan, sample, stream hash, byte verify, ThreadPoolExecutor, and unittest coverage for duplicates, near-misses, symlinks, hard links, and empty files.
- 3.ArchiveSweep - Concurrency, Symlinks & Hardlink Edge CasesWhich stages parallelize safely, how to aggregate errors without losing groups, symlink policy, hardlink reclaim math, and how to explain the design without overselling hash equality.
Comments and Replies
3 studies- 1.Comments and Replies LLD - Spec, Design Steps & ConceptsTwo-level in-memory comments/replies LLD: spec, structure choices, independent IDs, order, snapshots, concepts.
- 2.Comments and Replies - In-Memory Solution, Ordering & TestsFull CommentService Python+TS sketch with tests for order, validation, isolation, independent IDs, concurrency, snapshots.
- 3.Comments and Replies - Concurrent IDs, Snapshots & Post IsolationConcurrent ID allocation, defensive snapshots, post isolation, lock granularity decision chart, follow-ups.
Feature Flag Service
3 studies- 1.Feature Flag Service LLD - Targeting, Sticky Buckets & Kill SwitchesProvisional machine-coding LLD for an in-memory flag service: kill switch, disabled, segment gate, then a sticky SHA-256 percentage.
- 2.Feature Flag Service - Sticky Bucket + Kill Switch Solution & TestsRunnable FlagStore with upsert, sticky SHA-256 bucketing, segment gates, kill-switch precedence, and a concurrent upsert/evaluate test.
- 3.Feature Flag Service - Evaluation Order & ConcurrencyWhy the kill switch short-circuits before the percentage, why get copies the flag, and how this round connects to progressive delivery.
LLM Gateway Rate Limiter
3 studies- 1.Rate Limiter for an LLM Gateway - LLD Spec & ConceptsMachine-coding LLD for an in-process LLM gateway limiter: a per-tenant token bucket, an exact sliding-window log, and a composed decision with remaining and retry_after_ms.
- 2.Rate Limiter - Token Bucket + Sliding Window Solution & TestsRunnable TokenBucket, SlidingWindowLog, and GatewayLimiter, with a fake clock and an 80-thread burst flood.
- 3.Rate Limiter - Concurrency, Retry-After & CompositionWhy one RLock around the composed check still counts an RPM event when the burst denies, how retry_after_ms is computed, and how this round maps onto Redis Lua.