Module 01 Review & Cheat Sheet

Module Mastery Overview

You’ve completed the “Introduction and Mindset” module. This module wasn’t just about definitions; it was about internalizing the Philosophy of Scale.

  • Scale Cube: X (Cloning), Y (Decomposition), Z (Partitioning).
  • PACELC: Consistency or Latency? You have to choose.
  • Estimation: Order of Magnitude math > Exact numbers.
  • PEDALS: The 45-minute roadmap to success.

Interactive: Module 01 Flashcards

Test your recall. Click a card to reveal the “Senior Engineer” answer.

What is the "Z-Axis" of the Scale Cube?
Data Partitioning (Sharding). Routing requests based on an attribute (e.g., UserId).
State the PACELC trade-off during "Normal" operation.
Else (E), Latency (L) vs. Consistency (C). Even without partitions, sync costs time.
How many QPS is 1 Million requests per day?
≈ 12 QPS. (Shortcut: 1M / 86,400).
What is the "D" in PEDALS?
Design Service. Drawing the High-Level architecture diagram.
What is latency of a Disk Seek vs RAM access?
Disk Seek: ~10ms. RAM Access: ~100ns. Disk is 100,000x slower.
Define "SLA".
Service Level Agreement. A legal contract promising a certain level of uptime/performance.
Why must a 12-Factor App be "Stateless"?
To allow Auto-Scaling. If state is in memory, you can't add/remove servers dynamically without losing user data.
Which is more expensive: 1TB S3 or 1TB RAM?
RAM is ~50-100x more expensive. Use RAM for caching (20%), Disk for storage (100%).
Difference between Reliability and Availability?
Availability = Uptime (Can I connect?). Reliability = Correctness (Does it work right?).
QPS vs Concurrent Users?
Concurrent Users = Active Sessions. QPS = Hits per second. 1M Users might only mean 100k QPS if users are slow.
Functional vs Non-Functional Requirements?
Functional = What it does (Features). Non-Functional = How it performs (Quality, Speed, Security).
Why is "CA" impossible in Distributed Systems?
Because networks fail (Partition). You must choose CP (Stop writes) or AP (Accept potentially stale writes).
What is the 8th Fallacy of Distributed Computing?
"The network is homogeneous". Reality: Different hardware, OS, and configurations exist everywhere.

Module Cheat Sheet

1. The Scaling Hierarchy

strategy axis goal
Cloning X Handle traffic volume (Load Balancing).
Microservices Y Handle code complexity (Decomposition).
Sharding Z Handle data volume (Partitioning).

2. Trade-off Cheat Sheet

  • PACELC: If Partitioning, choose Availability or Consistency. Else, choose Latency or Consistency.
  • SLO vs SLA: SLO is your Goal (Internal). SLA is your Contract (Legal).
  • Latency Order: Cache (ns) < RAM (ns) < SSD (μs) < Disk (ms) < Network (ms).

3. Magic Math Rules

  • QPS: 1M/day &approx; 12 QPS. 100M/day &approx; 1200 QPS.
  • Storage: Avg Size &times; QPS &times; Seconds &times; Retention.
  • Memory: If your “Hot Dataset” (20% of total) fits in RAM, your system is 100× faster.
  • Powers of 2: 210 (KB), 220 (MB), 230 (GB), 240 (TB).

4. PEDALS Framework Checkpoints

  1. P: Ask clarifying questions.
  2. E: Do back-of-envelope math.
  3. D: Draw high-level boxes.
  4. A: Define SQL/NoSQL and Schema.
  5. L: Add Cache, Queue, CDN.
  6. S: Solve for sharding and failure.

Next Steps: Module 02

You have the mindset. Now you need the Plumbing. In Module 02: Network Fundamentals, we will dive into:

  • OSI Model: How bits actually travel.
  • TCP vs UDP: Why your streaming app uses different tech than your banking app.
  • HTTP/1.1 vs HTTP/2 vs gRPC: The language of services.

[!TIP] Pro-Tip: Don’t move to Module 02 until you can explain the PACELC Theorem to a 5-year-old. It is the most important trade-off in distributed systems.