The 7 Building Blocks: The Knowledge Behind Every Architecture Call

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

Same seven blocks, real systems: see how Netflix, Instagram, and Uber were built.

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.

The call: when the answer has to come back right now.

Task
Worker

Worker

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

The call: when the work can leave the request and finish on its own.

Storage
Key-Value Store

Key-Value Store

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

The call: when a lookup by key has to be instant.

Storage
File Store

File Store

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

The call: when what you're storing is a whole file, not a record.

Storage
Queue

Queue

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

The call: when the work can wait, but must not be lost.

Storage
Relational Database

Relational Database

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

The call: when the data has to stay correct across relationships.

Storage
Vector Database

Vector Database

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

The call: when "close enough" is the actual answer you need.

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

See It Applied, Then Use It

All 15 case studies, free

Two Free Skills, Same Framework

The seven blocks work before you build and after. Two skills put the same framework to work inside Claude Code, one for designing, one for reviewing.

Design with Blocks

A free, open source skill that designs your application using the seven building blocks: one paragraph in, a labeled architecture and a buildable design doc out, for the moment before you have written a line of code. Built and tested in Claude Code.

Try Design with Blocks →

Review with Blocks

A free, open source skill that reviews your system design against the seven building blocks and the non-functional -ilities: what scales, what breaks, and the questions a senior would ask, for the design you already have before you ship it. Built and tested in Claude Code.

Try Review with Blocks →

The Learning Path

Seven articles, about an hour and seven minutes end to end, and the framework is yours. 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

    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

AI Wrote Your Code, and You Can't Explain Why It Works

Pasting errors back and hoping? A study of 52 developers found AI users understood their own code less, and the ones who asked why kept more. Here is a four-step loop to run by hand or with a plugin.

Reading is free. So is the practice: Scaffold runs this same workflow on your own code. Install Scaffold →

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

The Knowledge Starts Here

You can name all seven building blocks and the three forces that act on them. That's real ground. Most engineers never get this far. The courses are the guided tour from here: the same knowledge, in order, with the reps that turn it into judgment you can defend under real constraints.

Course I teaches the seven blocks themselves, in 8 video lessons. Courses II through IV apply them to real systems: Content Systems (10 lessons, Instagram, Netflix, YouTube), Real-Time Systems (11 lessons, Slack, Discord, WhatsApp), and Business & Transaction Systems (9 lessons, Stripe, Shopify, Salesforce). Every course pairs 2 labs with a 3-part design challenge and feedback on your design decisions. All four together, one bundle: $299.

Free, right now

  • Read the 7 framework articles
  • Watch the full video series
  • Play the building blocks game
  • Design with Blocks: design a system from scratch, inside Claude Code
  • Review with Blocks: review a design that already exists, inside Claude Code
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 →