Module Review: Final Assessment
You have reached the end of the line. The training wheels are off. This review module consolidates the mindset and strategies you need to crush the 45-minute interview.
1. Interactive Flashcards
Test your reflexes. Can you spot the Red Flag? Can you identify the Pattern?
[!TIP] Try it yourself: Tap the card to flip it. Click “Start Final Exam” to test your knowledge with a random set of 10 questions.
?
!
2. Tech Stack Cheat Sheet
Stuck in an interview? Use this matrix to pick the right tool for the job. Click any item for details.
Capacity Planning Calculator
3. System Design Cheat Sheet
The 45-Minute Protocol
| Phase | Time | Goal | Key Actions |
|---|---|---|---|
| 1. Requirements | 5 min | Scope | Functional, Non-Functional, Math (QPS/Storage). |
| 2. High-Level Design | 10 min | Consensus | API, Schema (SQL vs NoSQL), Diagram (Boxes). |
| 3. Deep Dive | 20 min | Scale | Bottlenecks, Sharding, Caching, Replication. |
| 4. Wrap Up | 5 min | Summarize | Review, Trade-offs, Future Improvements. |
Protocol Comparison
| Feature | REST | gRPC | GraphQL |
|---|---|---|---|
| Format | JSON (Text) | Protobuf (Binary) | JSON (Text) |
| Performance | Slower (Text overhead) | Fastest (Compact) | Variable (Can be slow) |
| Browser Support | Universal | Requires gRPC-Web | Universal |
| Best For | Public APIs, CRUD | Internal Microservices | Complex Frontend Data |
Database Choice Matrix
| Use Case | Recommended DB | Why? |
|---|---|---|
| Banking / Ledger | PostgreSQL / MySQL | ACID transactions, Row Locking. |
| User Profiles | MongoDB / DynamoDB | Flexible schema, simple CRUD. |
| Social Graph | Neo4j / Facebook TAO | Graph traversals (Friends of Friends). |
| High Write Volume (Logs) | Cassandra / HBase | LSM Trees optimized for sequential writes. |
| Search (Text) | Elasticsearch | Inverted Index, Fuzzy Matching. |
| Real-time Leaderboard | Redis (Sorted Set) | In-memory speed, ZRANK operations. |
| Time Series (Metrics) | InfluxDB / Prometheus | Optimized for timestamped data, retention policies. |
Message Queue vs Pub/Sub
| Feature | Kafka | RabbitMQ |
|---|---|---|
| Model | Pull (Consumer polls) | Push (Broker pushes) |
| Storage | Persistent Log (Disk) | Transient (Memory) |
| Ordering | Guaranteed per Partition | Guaranteed per Queue |
| Throughput | Extreme (Millions/sec) | High (Thousands/sec) |
| Use Case | Event Streaming, Logs | Task Processing, Job Queues |
Load Balancing: L4 vs L7
| Layer | L4 (Transport) | L7 (Application) |
|---|---|---|
| Decisions Based On | IP + Port | URL, Headers, Cookies |
| Performance | Very Fast (Packet level) | Slower (Inspects payload) |
| Flexibility | Low (TCP/UDP only) | High (Can route /api to Service A) |
| Encryption | Can pass through (No Term) | Must terminate TLS to inspect |
The “Red Flag” Checklist
Before you say you are done, check for these fatal errors:
- Single Point of Failure (SPOF): Is there one box that kills the whole system if it dies?
- Bottleneck: Did you pipe all 1B users through a single load balancer?
- Magic: Did you say “I’ll use AI” or “I’ll use a Cache” without explaining how?
- Silence: Did you stop talking for more than 1 minute?
[!TIP] You are not expected to know everything. You ARE expected to know how to reason about things you don’t know. “I don’t know exactly how Kafka handles offsets, but I assume it uses a commit log structure…”
4. Quick Revision
- Scope First: Always ask clarifying questions before designing.
- Draw the Happy Path: Client → LB → App → DB.
- Deep Dive: Identify bottlenecks and scale (Sharding, Caching, Replication).
- Acknowledge Flaws: No system is perfect, admit the SPOFs and trade-offs.
5. Next Steps
- Review the System Design Glossary for definitions of key terms.
6. Final Words
You are ready. Trust the process. Focus on the trade-offs.
Good luck.