A structured collection of popular system design problems with high-level design, architecture diagrams, Go implementations, corner cases, scaling and caching discussions.
Built for interview prep, learning, and reference.
| # | Pattern | Key Concepts |
|---|---|---|
| 01 | URL Shortener | Hashing, redirects, DB choice |
| 02 | Rate Limiter | Token bucket, sliding window |
| 03 | Consistent Hashing | Virtual nodes, ring |
| 04 | LRU Cache | Doubly linked list + hashmap |
| 05 | Message Queue | Kafka-like, pub/sub |
| 06 | Distributed Lock | Redis, TTL, deadlock |
| 07 | Search Autocomplete | Trie, top-k, CDN |
| 08 | Notification System | Fan-out, push/pull |
| 09 | News Feed | Timeline, ranking |
| 10 | Distributed ID Generator | Snowflake, clock skew |
Each pattern follows the same structure:
XX-Pattern-Name/
├── README.md # Problem statement + high level design
├── diagram.md # Architecture diagram
├── main.go # Core logic implemented in Go
└── NOTES.md # Corner cases, scaling, caching discussions
DIR="11-Your-Pattern-Name" && mkdir -p "$DIR" && touch "$DIR/README.md" "$DIR/diagram.md" "$DIR/main.go" "$DIR/NOTES.md" && ls "$DIR"| Section | What's inside |
|---|---|
| High Level Design | Requirements, capacity estimation, API design |
| Architecture Diagram | Component diagram with data flow |
| Go Implementation | Clean working code for the core logic |
| Corner Cases | Edge cases, failure scenarios, race conditions |
| Scaling | Horizontal scaling, sharding, load balancing |
| Caching | What to cache, where (Redis/CDN), TTL strategy |
- Language: Go (Golang)
- Diagrams: Markdown + ASCII / draw.io
- Concepts: Distributed systems, databases, caching, messaging
Contributions are welcome! If you'd like to add a new pattern or improve an existing one:
- Fork the repo
- Create a branch:
git checkout -b add/pattern-name - Add your pattern following the folder structure above
- Open a Pull Request
Avijit Bhattacharjee
IBM Cloud • Backend Engineer • Open Source Contributor
GitHub •