System Design & Scalability
A quick reference guide
Types of Scaling & Load Balancing
HORIZONTAL VS. VERTICAL SCALING
LOAD BALANCING[*]
- Round Robin
- Source IP Hash - a given client IP address will always go to the same server
- Request Hash - a given request type will always go to the same server/cache; avoids cache duplication
- Least Connections
- Least Traffic
- Least Latency
Data Storage Design
DATABASE - Read vs. Write Performance
Normalize vs. Denormalize
- Normalize - ↓duplicate data ⇨ ↑write perf but ↓read perf
- Denormalize - ↑duplicate data ⇨ ↑read perf but ↓write perf
Have your cake and…
- Use an append-only structure for writes; then asynchronously restructure data into a read-optimized format[*]
Complete Slide Deck
Please view the complete slide deck with Google Slides. As always, I would love your feedback. Please comment on this blog or on the slides directly. Thanks!
Maybe the "clunky" #MillenniumFalcon was a poor choice for my System Design slides, but I couldn't resist.