← Home
🏗Crack System Design with DSA AnimatorSystem DesignNEW
🏗 System Design›Architecture Styles

⚖️Trade-offs in System Design

Every architecture choice optimizes something and gives up something else.

📌 Key IdeaA trade-off is choosing one benefit at the cost of another (latency vs consistency, speed vs cost, simplicity vs flexibility). Handle trade-offs by defining goals, constraints, measurable SLOs, and explicit “why now” decisions.
📖

Definition

In engineering, trade-off means you cannot maximize all qualities simultaneously. Good design is not “best technology”; it is context-fit technology chosen against business priorities and operational constraints.

✨

Why It Matters

  • Prevents over-engineering and premature complexity.
  • Improves communication with product/stakeholders using explicit decision rationale.
  • Reduces rework because assumptions and constraints are documented early.
✅

When to Use

  • Any architecture decision involving competing goals.
  • Interview/system design rounds where no perfect solution exists.
  • Migration planning (monolith -> microservices, sync -> async, etc.).
🚫

When NOT to Use

  • Do not over-analyze trivial low-impact choices.
  • Avoid abstract debates without SLOs, load assumptions, or business constraints.
💻

Code Variations

1️⃣ Example: cache consistency trade-offtext
Scenario: Product details API (high read traffic)

Option A: cache-aside with TTL 5 mins
  + very fast reads, lower DB load
  - possible stale data for 5 mins

Option B: read directly from DB
  + freshest data
  - higher latency/cost under load

Decision:
Use Option A + explicit cache invalidation on critical price updates.
2️⃣ Example: retry trade-offtext
Scenario: payment gateway transient failures

Option A: aggressive retries (5 attempts)
  + may recover more transient failures
  - can amplify outage and increase latency

Option B: bounded retries (2 attempts + breaker)
  + protects system under outage
  - some requests fail faster

Decision:
Option B with idempotency key + fallback queue for manual recovery.
3️⃣ Example: relational DB vs CQRS splittext
Scenario: dashboard reads are 50x writes

Option A: single normalized DB model
  + simple operations
  - read queries become expensive

Option B: CQRS (write model + read projection)
  + fast read paths, scalable dashboards
  - eventual consistency + operational complexity

Decision:
Adopt CQRS only for high-traffic report endpoints first.
📊

Common trade-offs you must reason about

AspectOption AOption B
Consistency vs AvailabilityStrong consistency (fewer stale reads)Higher availability under partitions (eventual consistency)
Latency vs CostLow latency via caching/replicas/provisioningLower infra cost with fewer resources
Simplicity vs FlexibilitySimple architecture, faster deliveryMore extensible but higher complexity
Throughput vs OrderingHigh parallelism, possible reorderStrict ordering with lower parallel throughput
Write optimization vs Read optimizationNormalized writes, strong integrityDenormalized reads, faster queries
🔀

Common Confusions Cleared Up

Trade-off vs compromise

Trade-off is intentional optimization against objective metrics. Compromise is often unstructured middle-ground without clear success criteria.

Short-term win vs long-term cost

Quick solutions can be valid if time-to-market is primary goal, but record debt and define future refactor triggers.

🧪

Variations / Implementations

How to handle trade-offs (practical framework)

1) Define primary goal (p99 latency? consistency? cost?). 2) List constraints (traffic, team, deadline, compliance). 3) Propose 2–3 options. 4) Score options against SLOs. 5) Choose now + document revisit trigger.

Decision record mindset

Write short ADR-style notes: context, options considered, chosen option, consequences, rollback path, and conditions under which you will re-evaluate.

Evolve architecture, do not front-load everything

Start with the simplest design that meets current SLOs. Add complexity only when metrics show clear pressure (latency, error rate, cost, throughput).

⚠️

Common Mistakes / Anti-Patterns

  • Choosing tech by trend without workload fit.
  • Ignoring operational cost/complexity in design decision.
  • No measurable success criteria for chosen architecture.
  • One-way decisions with no rollback/revisit plan.
🎤

Interview Q&A

🧾

Quick Cheat Sheet

Step 1Clarify priority metric (latency, consistency, cost, speed).
Step 2List constraints (traffic, team, deadline, compliance).
Step 3Compare 2–3 options with explicit pros/cons.
Step 4Pick one + define monitoring + revisit trigger.
🔗

Related Topics