Goal: Time to practice real system design questions — the ones actually asked in interviews. This week you stop learning theory and start designing systems end-to-end.
Topics
| Day | Focus | Topics |
|---|---|---|
| Mon | HLD — URL Shortener & Rate Limiter | Design a URL Shortener · Design a Rate Limiter |
| Tue | HLD — Chat & Social Feed | Design a Chat System · Design a Social Media Feed |
| Wed | Redis & Caching | Redis Persistence · Caching Patterns |
| Thu | DBMS Scaling & DSA | Replication · Sharding · Interval and String DP |
| Fri | DSA & Python | DP on Trees and Graphs · Context Managers · Pythonic Code and PEP 8 |
Key Concepts
- URL shortener — base62 encoding, read-heavy workload (~100:1 read-to-write), key generation service
- Rate limiter — token bucket vs sliding window log vs sliding window counter, where to place it
- Chat system — WebSocket for real-time, message queue for reliability, presence/online status
- Social media feed — fan-out on write (push) vs fan-out on read (pull), celebrity problem
- Cache-aside vs write-through vs write-behind — pick the right pattern for your access profile
- RDB vs AOF persistence — RDB for snapshots (faster recovery), AOF for durability (less data loss)
- Leader-follower replication — read replicas, replication lag, and failover promotion
- Sharding strategies — hash-based vs range-based, resharding pain, consistent hashing
- Python context managers —
withstatement,__enter__/__exit__,contextlibshortcuts - PEP 8 essentials — naming conventions, line length, imports order, and when to break the rules
Practice
- Whiteboard a full URL shortener design in 30 minutes — requirements, API, storage, and scale estimates
- Explain the cache-aside pattern with code — show the read and write paths clearly
- Write a Python context manager for database connections (both class-based and
@contextmanager) - Solve a longest common subsequence problem using interval DP
~12 topics · ~1.5-2 hrs/day · Focus: read the linked notes, then code each concept