Tradeoffs

Trade-off Decision Matrix

⚖️Core System Design Trade-offs

Consistency vs Availability (CAP)

Choose Consistency When:

  • • Financial transactions
  • • Inventory management
  • • User authentication
  • • Booking systems

"Users see stale data = bad"

Choose Availability When:

  • • Social media feeds
  • • Content delivery
  • • View counters
  • • Shopping carts (merge later)

"Downtime = bad, stale is OK"

Latency vs Throughput

Optimize for Latency:

  • • User-facing APIs
  • • Real-time systems
  • • Gaming, trading

Techniques: Caching, CDN, edge computing

Optimize for Throughput:

  • • Batch processing
  • • Data pipelines
  • • Log ingestion

Techniques: Batching, async, parallelism

Read-Heavy vs Write-Heavy

Read-Heavy Systems:

  • • Add read replicas
  • • Heavy caching
  • • CDN for static content
  • • Denormalize data

Examples: News sites, product pages

Write-Heavy Systems:

  • • Write-ahead logs
  • • Async writes (queue)
  • • Sharding
  • • LSM-tree databases

Examples: Logging, metrics, IoT

Quick Reference Matrix

Trade-offOption AOption B
SQL vs NoSQLACID, relations, complex queriesScale, flexibility, speed
Sync vs AsyncSimpler, immediate feedbackResilient, scalable, decoupled
Push vs PullReal-time, server-drivenClient control, cacheable
Normalize vs DenormalizeLess storage, consistencyFaster reads, more storage

How to Discuss Trade-offs

  1. 1. State the trade-off: "This is a trade-off between X and Y"
  2. 2. Explain both sides: "Option A gives us... Option B gives us..."
  3. 3. Connect to requirements: "Given our requirement for X, I'd choose..."
  4. 4. Acknowledge downsides: "The downside is... which we can mitigate by..."