Review & Cheat Sheet

[!IMPORTANT] In this review, you will consolidate:

  1. 🧠 Rapid Recall Flashcards: 12 cards covering Scale Cube, Latency Numbers, PEDALS, and SLI/SLO/SLA.
  2. 📝 Mnemonic Cheat Sheet: All the memory aids from Module 01 in one place — LOST BATH, CARS, I.O.A, L-R-S-N.
  3. 🕵️ Staff Engineer Challenge: A scenario-based question to test your ability to defend trade-offs.

1. 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).
  • Estimation: Order of Magnitude math > Exact numbers.
  • PEDALS: The 45-minute roadmap to success.

2. Interactive: Module 01 Flashcards

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

[!TIP] Try it yourself: Click any card to flip it and reveal the answer.

What is the "Z-Axis" of the Scale Cube?
Data Partitioning. Routing requests based on a shard key (e.g., UserId). Essential when your dataset exceeds a single machine's disk capacity.
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?
Data Model. Defining SQL/NoSQL, schema, and core entities before jumping into architecture.
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).
What is the 8th Fallacy of Distributed Computing?
"The network is homogeneous". Reality: Different hardware, OS, and configurations exist everywhere.

3. 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

  • 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 ≈ 12 QPS. 100M/day ≈ 1200 QPS.
  • Storage: Avg Size × QPS × Seconds × 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: Process Requirements. Ask clarifying questions, establish functional and non-functional requirements.
  2. E: Estimate. Do back-of-envelope math for QPS, storage, and bandwidth.
  3. D: Data Model. Define SQL/NoSQL, schema, and core entities.
  4. A: Architecture. Draw high-level boxes and design core services.
  5. L: Localized Details. Add Cache, Queue, CDN, and optimize specific components.
  6. S: Scale. Solve for sharding, replication, and failure handling.

4. 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 recall all 4 mnemonics below from memory. They form the foundation of every design choice you’ll make.

5. Module 01 Mnemonic Recall

All the memory aids from this module in one place:

Mnemonic Stands For Chapter
CARS Cost, Availability, Reliability, Scalability Ch 01: Trade-off Axes
LOST BATH The 8 Fallacies: Latency, One admin, Secure, Topology, Bandwidth, Always reliable, Transport cost, Homogeneous Ch 01: Distributed Fallacies
I.O.A SLI (Indicator) → SLO (Objective) → SLA (Agreement) Ch 02: Reliability Contracts
L-R-S-N “Lazy Rabbits Seek Naps” — L1 Cache, RAM, SSD, Network (each 1000x slower) Ch 03: Latency Hierarchy
86,400 Seconds in a day — the QPS conversion anchor Ch 03: Estimation Shortcut
PEDALS Process Requirements, Estimate, Data Model, Architecture, Localized Details, Scale Ch 04: Interview Framework

6. Staff Engineer Challenge: The “Scale Pivot”

The Scenario: You have a successful monolithic e-commerce app with 500k DAU. Your CEO just announced a Black Friday sale expected to drive 10x traffic (5M DAU) for 48 hours.

The Question:

  1. Using the 86,400 shortcut, calculate the peak Read QPS if each user makes 20 page views during peak hours (assume 4 hours of concentrated traffic).
  2. Would you vertically scale, horizontally scale, or decompose into microservices? Justify using CARS.
  3. If you choose horizontal scaling, which axis of the Scale Cube is this? What’s the minimum change needed?