System Design Old

Learn how to design systems at scale and prepare for system design interviews.

Primitives

  • Load balancer
  • Gateway (rate-limiting, authentication)
  • Database
    • SQL vs NoSQL, sharding strategy
    • if SQL, indices
  • Cache (optionally clustered/sharded)
  • Message queue, with workers
  • CDN
  • Lambdas

Checklist

  • Clarify requirements
    • Write QPS, average and peak (peak is 2x average)
    • Read QPS (approximate 10x write QPS)
    • Total storage required
    • Latency requirement
    • Consistency vs Availability
  • High level diagram that matches requirements
  • Deep Dive
    • APIs
    • Database schema
  • Wrap up
    • Error cases
    • Potential bottlenecks
  • Extra credit
    • Cost (development vs ongoing)
    • Logging, metrics, alerts
    • Automation - CI, CD
    • i18n
    • CDN
    • RPC

Brief View

.

Designs

Rate Limiter

.

KV Store

. . .

Tiny URL Mechanism

.

Web Crawler

.

Notification Service

.

News Feed

.

Chat Service

.

Another One:

.

Another Chat Application

.

Permission System

.

References

Get Things Done
Built with Hugo
Theme Stack designed by Jimmy