Skip to content

Ali-Meh619/System_Design_ML_Principles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

49 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


⚑ System Design & Machine Learning Playbook

An interactive reference guide for engineers preparing for System Design, Cloud, and ML interviews.



Stars Forks PRs Welcome License: MIT Topics Interactive


🌐 Open Interactive Site Β Β·Β  πŸ“š Browse All Topics Β Β·Β  🎯 Start Here Β Β·Β  🀝 Contribute



✨ How To Use This Repo

Most interview resources are either too scattered or too theoretical. This repo is organized around three practical tracks:

Track Best for Start here
Core System Design Distributed systems, cloud/platform, APIs, storage, scaling docs/
AI & Machine Learning ML system design, agents, classic ML, deep learning, LLMs docs/machine-learning/README.md
Reference & Practice Appendix Templates, cheat sheets, LeetCode patterns, LLD docs/reference/README.md

Use the interactive site when you want navigation, quiz mode, and progress tracking. Use the Markdown docs when you want dense references you can skim before an interview.

πŸš€ What Makes It Useful

Feature Description
🎯 48 interview-ready topics Core system design, cloud/platform, AI/ML, security, and interview reference material
πŸŒ™ Dark / Light mode Persisted preference, instant toggle with d
βœ… Progress tracking Mark topics as read. Your progress saves locally.
πŸ”– Bookmarks Save topics to revisit. Accessible from any page.
πŸƒ Quiz / Flashcard mode Randomized flashcard review across all 48 topics
πŸ“– Inline reader Read every topic without leaving the page β€” with prev/next navigation
⌨️ Keyboard-first / search, q quiz, b bookmarks, ? shortcuts
πŸ“Š Visual progress bar See your overall completion at a glance
πŸ—ΊοΈ 3 learning paths Beginner, Mid-Level, and Advanced tracks
πŸ” Live search Searches title, category, summary, and tags
🎨 Category color coding Every domain has its own visual identity
πŸš€ Zero setup Open in browser. No install. No build step.

πŸ—‚οΈ Topic Coverage (48 Topics)

🟠 Foundation (4)
🟣 Data Storage (5)
  • πŸ—„οΈ Database Selection Guide β€” SQL vs NoSQL tension, 7 database types with when-to-use decision matrix
  • ⚑ Caching Deep Dive β€” 5 cache layers, read/write patterns, eviction, cache invalidation strategies
  • πŸ“¨ Message Queues & Event Streaming β€” Queue vs Kafka event log, delivery guarantees, DLQ, outbox pattern
  • 🌐 Storage & CDN β€” Object/block/file storage, CDN pull vs push, cache invalidation
  • πŸ”© Database Internals β€” B-tree vs LSM, indexes, replication, CDC, sharding, ACID vs BASE, isolation levels
πŸ”΅ API & Networking (4)
☁️ Cloud & Platform (5)
🟒 Distributed Systems (5)
  • 🌐 Distributed System Fundamentals β€” CAP, consistency models, consistent hashing, Saga vs 2PC, quorum, vector clocks
  • πŸ”„ Core Design Patterns β€” Fan-out (social feed), CQRS, event sourcing, outbox pattern, inventory contention
  • 🧱 Microservices vs Monolith β€” When to decompose, service discovery, sync vs async communication
  • πŸ›‘οΈ Resilience Patterns β€” Timeouts, retries + jitter, circuit breaker, fallbacks, backpressure, load shedding
  • πŸ”’ Distributed Locking β€” Why local locks fail, Redis Redlock, fencing tokens
🟑 Search & Analytics (4)
🟩 Scale & Reliability (6)
πŸ”΄ Security (4)
🩷 AI & Machine Learning (5)
  • πŸ€– Machine Learning in System Design β€” feature store, recommendation and ranking systems, rollout strategy, drift, serving latency, rollback
  • 🧠 AI Agent System Design β€” planner/reactor loops, function calling, retrieval, observability, agent benchmarks, model routing, budgets, safety
  • πŸ“ˆ Classic Machine Learning β€” Bias-variance, Naive Bayes, KNN, bagging vs boosting, SHAP/LIME, calibration, XGBoost, SVM, PCA
  • πŸ”¬ Deep Learning β€” Weight init, backprop, CNNs, LSTMs, full Transformer deep-dive, GANs, VAEs, diffusion, distillation, GQA/MQA
  • πŸ’¬ LLM Interview Questions β€” Tokenization, RAG, LoRA/QLoRA, RLHF/DPO, scaling laws, MoE, multi-modal models, KV cache, CoT
🩡 Specialized Systems (2)
🟦 Reference (4)
  • 🎯 Common Scenarios & Solutions β€” 17 scenario cheat sheets covering classic patterns plus multi-tenant SaaS, webhooks, recommendation/ranking, and multi-region reliability
  • πŸ“‹ Reusable Design Templates β€” 12 full blueprints with architecture diagrams: YouTube, Twitter, WhatsApp, Uber, TinyURL, Rate Limiter, Metrics, TicketMaster, AI Agent, Typeahead, Google Docs, LeetCode
  • 🧩 LeetCode Question Patterns β€” 21 algorithm patterns with code templates: arrays, two pointers, sliding window, trees, graphs, DP, backtracking, tries, segment tree, and more
  • πŸ—οΈ Low-Level System Design (LLD) β€” SOLID principles, 10 design patterns with code, 11 classic LLD questions (LRU Cache, Parking Lot, Elevator, Rate Limiter, ATM, Tic-Tac-Toe, Logger, Library)

πŸ›€οΈ Learning Paths

Pick a path based on your experience level, then use the interactive site to track your progress.

🌱 Beginner β€” Build your foundation (6 topics)

Interview Framework β†’ Numbers to Know β†’ Database Selection β†’ Caching Deep Dive β†’ API Design & Gateway β†’ Rate Limiting

πŸš€ Mid-Level β€” Master distributed systems and platform basics (9 topics)

Distributed Fundamentals β†’ Cloud Fundamentals β†’ Compute & Deployment β†’ Resilience Patterns β†’ Observability β†’ High Availability β†’ Microservices β†’ Notifications β†’ Authorization / MFA

πŸ† Advanced β€” Push beyond the standard interview (8 topics)

AI Agent System Design β†’ ML System Design β†’ Cloud Networking β†’ IAM / Governance β†’ Reliability, Observability & Cost β†’ Real-time Collaboration β†’ Probabilistic DS β†’ DB Internals

⌨️ Keyboard Shortcuts

Open the interactive site and press ? to see all shortcuts:

Key Action
/ Focus search
d Toggle dark mode
q Start quiz / flashcard mode
b Toggle bookmarks panel
? Show all keyboard shortcuts
Esc Close reader / clear search / close panel
Space Reveal quiz answer
β†’ / ← Next / previous quiz card or topic


πŸš€ Quick Start

Option A β€” Interactive site (recommended)

Open the full Interactive Website here 🌐

No install. Works offline after first load. Progress saves to your browser. Includes an inline reader, quiz/flashcard mode, dark mode, and bookmarks.

Option B β€” Run locally

git clone https://github.com/Ali-Meh619/System_Design_ML_Principles.git
cd System_Design_ML_Principles
# Open site/index.html in your browser β€” no server needed

Option C β€” Read on GitHub

Navigate to docs/ and click any topic. GitHub renders Markdown natively.


πŸ“ Repository Structure

System_Design_ML_Principles/
β”œβ”€β”€ site/                       # Interactive web app (no build step)
β”‚   β”œβ”€β”€ index.html              # Main SPA β€” dark mode, quiz, bookmarks, inline reader
β”‚   β”œβ”€β”€ styles.css              # Full design system with dark/light mode
β”‚   β”œβ”€β”€ app.js                  # All interactive features
β”‚   └── topics.js               # Topic registry with icons, difficulty, tags, paths
β”œβ”€β”€ docs/                       # 48 topic documents
β”‚   β”œβ”€β”€ foundation/             # Interview framework, estimation, I/O, networking
β”‚   β”œβ”€β”€ api-networking/         # APIs, load balancing, rate limiting, realtime
β”‚   β”œβ”€β”€ cloud-platform/         # Cloud foundations, deployment, networking, IAM, reliability
β”‚   β”œβ”€β”€ data/                   # Databases, caching, queues, internals
β”‚   β”œβ”€β”€ distributed/            # CAP, consistency, microservices, resilience, patterns
β”‚   β”œβ”€β”€ search/                 # Full-text search, typeahead, geo, stream processing
β”‚   β”œβ”€β”€ scale/                  # Observability, HA, ID gen, pagination, notifications
β”‚   β”œβ”€β”€ security/               # Auth, AuthZ, privacy, secrets, threat modeling
β”‚   β”œβ”€β”€ machine-learning/       # ML systems, agents, Classic ML, DL, LLMs
β”‚   β”œβ”€β”€ specialized/            # Collaboration and webhook-heavy systems
β”‚   └── reference/              # Templates, cheat sheets, LeetCode, LLD
└── assets/                     # Architecture diagram images

πŸ“– Recommended Topic Structure

The strongest docs in this repo use a consistent interview-prep structure. Not every legacy page is identical yet, but new and upgraded docs aim to follow this pattern:

## Problem
What are we solving? When does this come up in an interview?

## Options
What are the main approaches? (with trade-off table)

## Recommended Default
What to pick and why, with the specific caveats.

## Failure Modes
What breaks? How do you detect and recover?

## Metrics
What do you measure to know it's working?

## Interview Answer Sketch
The concise 2-minute answer you'd give under time pressure.

🀝 Contributing

Contributions make this better for everyone:

  1. Fork the repo and create a branch: git checkout -b feat/your-topic
  2. Follow the recommended topic structure above β€” especially defaults, trade-offs, failure modes, and metrics
  3. Add the topic to site/topics.js with an icon, difficulty, and tags
  4. Open a PR using the provided template

Every substantial addition should include:

  • βœ… When to use
  • ❌ When NOT to use
  • πŸ’₯ Common failure modes
  • πŸ“Š Measurable success metrics

See CONTRIBUTING.md for the full guide.


⭐ If this helped you

  • Star the repo β€” it helps others discover it
  • Share it with your team or study group
  • Open issues for topics you'd like to see covered
  • Submit PRs to improve existing content

πŸ“„ License

MIT Β© 2026. Free to use, share, and build on.


Built with ❀️ for engineers who take system design seriously.

⭐ Star on GitHub Β Β·Β  🌐 Open Interactive Site Β Β·Β  πŸ› Report Issue

About

An interactive reference guide for software engineers cracking System Design & ML interviews. Covers 43 topics from foundational distributed systems to modern LLM architectures.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors