The 7 Building Blocks Behind Every System

An open source framework for understanding system design. Used at UC Berkeley.

Why This Matters Now

AI can write code faster than any human. But it cannot decide what to build. The engineers who thrive in the AI era are the ones who understand the architectural patterns behind every system. This framework gives you that understanding.

AI writes code, you design systems

AI tools generate implementation. You provide the architecture. Knowing which building blocks to compose and why is the skill that matters most.

Same patterns everywhere

Instagram, Netflix, Uber, Slack, Stripe. Different products, same 7 building blocks. Learn the pattern once, apply it to any system.

Free and open source

The framework is free. Read the articles, try the challenges, use it in your work and interviews. No account required.

The 7 Building Blocks

Every software system is composed from these 7 universal building blocks. Two handle tasks, five handle storage. Together they can model any system.

Task
Service

Service

Receives a request, does work, sends a response. The backbone of every API.

Task
Worker

Worker

Picks up tasks from a queue and processes them in the background, at its own pace.

Storage
Key-Value Store

Key-Value Store

Lightning-fast lookups by key. Caching, sessions, feature flags.

Storage
File Store

File Store

Stores large blobs: images, videos, PDFs. Optimized for size, not queries.

Storage
Queue

Queue

Decouples producers from consumers. Makes systems resilient to spikes and failures.

Storage
Relational Database

Relational Database

Structured data with relationships. Transactions, constraints, complex queries.

Storage
Vector Database

Vector Database

Similarity search for AI. Find content by meaning, not exact match.

Task blocks (do work) Storage blocks (hold data)

The Learning Path

Ten articles that take you from zero to fluent in the building blocks framework. Read them in order, or jump to what interests you.

    The 7 Building Blocks Behind Every System

    The big picture. Why 7 blocks are enough to model Instagram, Netflix, and every system you use daily.

    10 min read

    Services and Workers: The Two Task Blocks

    One waits for requests. The other pulls work from a queue. Learn when to use each.

    9 min read

    The 3 Storage Extremes: How to Pick the Right Database

    Speed, size, or structure. Every storage decision is a tradeoff between these three extremes.

    11 min read

    Queues: The Building Block That Makes Systems Resilient

    The secret weapon of reliable systems. How decoupling producers and consumers changes everything.

    10 min read

    External Entities: The 3 Forces That Shape Every System

    Users, external services, and time. The three forces outside your system that drive every design decision.

    8 min read

    How Netflix Actually Works: A Building Blocks Breakdown

    Apply the framework to a real system. Map Netflix from upload to playback using all 7 blocks.

    12 min read

    How Instagram Actually Works: A Building Blocks Breakdown

    A billion posts that load in under a second. Trace posting, the feed, Stories, and likes through the blocks.

    9 min read

    How Does Uber Work? A System Design Breakdown

    Tap a button and a driver appears. Trace matching, real-time tracking, surge pricing, and payment — and see what makes a real-time system different.

    11 min read

    What Is a Vector Database? A Plain Explanation

    The block the AI era made essential. What it is, how it works without the math, and when the job actually needs one.

    9 min read

    The Building Blocks Decision Framework

    A systematic approach to choosing the right building blocks for any system design challenge.

    10 min read

Now Put It Into Practice

You can't read your way to judgment — you have to build. Design Instagram, Netflix, and Uber from the blocks up. Each challenge hands you real requirements and asks you to pick the right blocks and compose them into a working system.

Play the Building Blocks Game

Leading a team? Run this as a free 90-minute team workshop →

You know the blocks. Now build the judgment.

You can name all 7 building blocks and the 3 forces that act on them. That's the vocabulary — and it's further than most engineers ever get. But it isn't judgment yet. Knowing what a queue is won't tell you whether this system needs one, or what breaks when traffic spikes at 3am.

That instinct forms two ways: by studying how real systems were solved, and by designing your own under real constraints and getting told where your reasoning held and where it didn't. That's what the courses are — not more to read, but reps that turn what you just learned into judgment you own.

What you just did — free

The knowledge
  • Read the 7 framework articles
  • Watch the full video series
  • Play the building blocks game
  • Try Design with Blocks on your own app
Want a mentor on your own code — free? Scaffold (beta) coaches you through real tasks in your repo and reports your growth on every commit — the fastest way to start building judgment on code you already care about. Try Scaffold →
Build the judgment → Start Course I
Kay Ashaolu
Kay Ashaolu

Continuing Lecturer at UC Berkeley School of Information. Software engineer and engineering manager with 15+ years building systems at leading technology companies, including AncestryDNA and Morgan Stanley. Teaching engineers to think in systems.

Learn more →

More from the Newsletter

Read additional essays on system design, software architecture, and thinking in systems.

Browse all essays →