A living knowledge base for system design — written for engineers who want to go beyond surface-level answers.
This repository is a personal system design notebook — every document here is a deep-dive written after actually working through the design problem from scratch, not copied from a tutorial.
Each guide covers:
- Clarifying questions a senior engineer asks before designing
- Algorithm / pattern selection with explicit trade-offs
- Data layer choices with capacity estimates
- Failure modes & resilience strategies
- API contracts (HTTP + gRPC)
- Observability — metrics, alerts, dashboards
- Interview cheat sheet at the end of every guide
| Guide | Description | Difficulty |
|---|---|---|
| 🚦 Rate Limiter | Distributed rate limiting at 500M req/day. Token bucket, Redis Cluster, Lua atomicity, circuit breakers | ⭐⭐⭐ Senior |
| ⚡ Distributed Cache | Caching at 1M reads/sec. Cache-aside vs write-through, Redis vs Memcached, consistent hashing, stampede prevention, eviction policies | ⭐⭐⭐ Senior |
| 🔔 Notification System | Push, email, SMS, in-app at 100B/month. Kafka pipeline, delivery guarantees, dedup, preferences, rate limiting, DLQ | ⭐⭐⭐ Senior |
| Guide | Description | Difficulty |
|---|---|---|
| ⚡ Hyper-Local Flash Inventory Sync | Preventing overselling across 5,000 dark stores. Redis Lua atomics, Redlock, reservation TTL, event sourcing, CRDT, flash sale virtual queues | ⭐⭐⭐⭐⭐ Principal |
| Guide | Description | Difficulty |
|---|---|---|
| 🧠 How LLMs Work | Transformer architecture, attention mechanism, pre-training pipeline, RLHF, inference, RAG, serving at scale | ⭐⭐⭐⭐ Staff |
| 🔍 Vector Database Design | HNSW, IVF-PQ, embeddings, filtered search, hybrid sparse+dense, RAG pipelines, Pinecone vs Qdrant vs pgvector, 1B-vector design | ⭐⭐⭐⭐ Staff |
| Guide | Description | Difficulty |
|---|---|---|
| 💸 How UPI Works | NPCI architecture, VPA resolution, 2FA, idempotency, Google Pay vs PhonePe vs Paytm internals, fraud detection at scale | ⭐⭐⭐ Senior |
| Guide | Description | Difficulty |
|---|---|---|
| 💸 How UPI Works | NPCI architecture, VPA resolution, P2P/QR/Collect flows, Google Pay/PhonePe/Paytm internals, MPIN security, 10B txn/month scalability | ⭐⭐⭐⭐ Staff |
More guides coming soon. Each one added after a real design session.
software-design/
│
├── use-cases/ # One folder per design problem
│ ├── rate-limiter-system-design.md
│ ├── distributed-cache.md
│ ├── notification-system.md
│ ├── flash-inventory-sync.md
│ ├── how-llm-works.md
│ ├── vector-database-design.md
│ └── how-upi-works.md
│
├── docs/ # GitHub Pages website source
│ └── index.html
│
├── README.md # You are here
└── LICENSE
For interview prep:
- Read the guide end-to-end once
- Close it and whiteboard the architecture from memory
- Re-read and check what you missed
- Repeat the Interview Cheat Sheet section until fluent
For production reference:
- Jump directly to the section you need (data layer, failure modes, API contract)
- Each guide has numbered sections for quick navigation
-
Distributed Cache (Redis vs Memcached, eviction, consistency)✅ -
Notification System (push, email, SMS at scale)✅ - URL Shortener (hashing, redirects, analytics)
- Search Autocomplete (trie, prefix indexing, ranking)
- Distributed Message Queue (Kafka internals)
- Web Crawler (politeness, deduplication, frontier)
- Distributed ID Generator (Snowflake, UUID, ULID)
- Key-Value Store (LSM trees, SSTables, compaction)
This repo has a companion website where all guides are browsable with a clean UI.
→ simplymanas.github.io/software-design
To enable GitHub Pages on your fork:
- Go to Settings → Pages
- Source: Deploy from branch
- Branch:
main| Folder:/docs - Save — site is live in ~60 seconds
Manas — ML/AI engineer, system design practitioner.
If this helped you, star the repo ⭐ — it helps others find it.