Lex AIMeridianby Lex AI

System Design – Distributed Systems

This module teaches both the building blocks of systems that scale — scalability, reliability, availability, load balancing, caching, CDNs, CAP, message queues, indexes, cluster scheduling — and the repeatable method for putting them together in an interview or a design review.

The method is the transferable skill: requirements → estimation → API → data model → core problem → scale. The concept lessons give you the parts; the five case studies march that method end to end — a URL shortener, a paste store, a photo feed, feed ranking, and a real-time messenger — each reusing the parts you already built.

Prerequisites

  • You’ve built and shipped software — HTTP, databases, and client/server flow are familiar
  • Comfort with rough back-of-envelope estimation (QPS, bytes, latency)
  • No distributed-systems background assumed — every concept is built from the ground up

How to read this module

Work the concept lessons in order first — each one is a part the case studies reuse. Then the case studies assemble those parts, and each names what breaks and how to fix it. By Messenger you’ll have designed the whole stack from load balancer to object store to real-time delivery.

Course mapHover any lesson to see why it matters

Prerequisites

A working engineer’s fluency

You’ve built and shipped software — HTTP, databases, and basic client/server flow are familiar

Comfort with rough estimation

Back-of-envelope math (QPS, bytes, latency) — no distributed-systems background assumed

Lessons

01Beginner

Scalability

Handle more load — vertical vs horizontal, replication vs sharding

02Beginner

Reliability

Keep working despite failure — redundancy, MTBF/MTTR, RPO/RTO

03Beginner

Availability

The nines — dependency chains, failover, graceful degradation

04Intermediate

Efficiency & Throughput

Latency vs throughput, Little’s Law, utilization and bottlenecks

05Intermediate

Manageability

Operate it — observability, golden signals, deploy safety, incidents

06Intermediate

Load Balancer

Spread load — L4 vs L7, algorithms, health checks, HA pairs

07Intermediate

Caching

Serve from memory — patterns, eviction, TTLs, stampedes

08Intermediate

CDNs

Push content to the edge — push vs pull, immutable content

09Intermediate

Proxies

Forward vs reverse proxy — and what each one buys you

10Intermediate

CAP Theorem

Under partition, choose consistency or availability — CP vs AP

11Intermediate

Message Queues

Decouple with async — delivery guarantees, pub/sub, backpressure

12Intermediate

Database Indexes

B+-trees, leftmost-prefix, covering and composite indexes

13Intermediate

Case I · TinyURL

A URL shortener — the six-step method and base62 key generation

14Intermediate

Case II · Pastebin

Store the content — split metadata from the blob, front it with a CDN

15Advanced

Case III · Instagram

The news feed — fan-out on write vs read vs hybrid for celebrities

16Advanced

Case IV · Feed Ranking

Rank the feed — signals, scoring, candidate generation, latency budget

17Advanced

Case V · Messenger

Real-time chat — WebSockets, connection gateways, presence, delivery

Unlocks

AI-Powered Software Development

Where the latency-budget and failure-mode reasoning gets applied to AI systems

Finished this lesson?

Read through the lesson first (0/20s · scrolled 0% of 70%).