Course contentsShow
← System Design
Lesson 35 of 1,9191. System Design Mindset and First PrinciplesFree lesson

Iterate Based on Constraints

How to identify bottlenecks and scale points to guide each design iteration systematically.

Iterate Based on Constraints

What you'll learn: How to systematically evolve your design by identifying bottlenecks and scaling points at each iteration.

The Core Idea

You've started with a simple design. Now what? Don't randomly add components—let the constraints guide you. Look at your non-functional requirements (scalability, latency, availability) and ask: "Where will this design break first?"

Think of it like planning a road trip. You don't upgrade to a truck immediately. You check: Will my sedan hold all the luggage? Will it handle mountain roads? Do I need more fuel range? Each constraint tells you what to improve next.

How It Works

  1. Identify the bottleneck: Review your QPS estimate, storage growth, or latency targets. Which component can't handle the load?

    • Database overloaded at 10K QPS? That's your bottleneck.
    • Single server can't provide 99.9% availability? There's your constraint.
  2. Propose a targeted solution: Address only that constraint.

    • Add a cache to reduce database reads.
    • Add load balancers and replicas for availability.
  3. Re-evaluate: Check if new bottlenecks emerged.

    • Cache helps reads, but what about writes?
    • Replicas help availability, but how do they stay consistent?
  4. Repeat: Each iteration solves one major constraint, revealing the next challenge.

This systematic approach prevents over-engineering (adding features you don't need) and under-engineering (missing critical requirements).

Key Takeaway: Let your estimated numbers and prioritized requirements reveal bottlenecks one at a time—each constraint you address guides the next design iteration, building complexity only where needed.