Skip to content
Get App

Give Me 16 Minutes, I'll Give You 1000+ Hours of System Design Knowledge

Learn 11 core system design concepts in 20 minutes: the basic request-response diagram, reliability, scalability, failure modes, safe deployment, caching, and SQL vs NoSQL databases, drawn from Design

Key Takeaways

  • Every system design starts from the same basic request-response picture, and complexity is added by layering caches, queues, and search on top.
  • Each design decision should be evaluated against reliability, scalability, and maintainability, since improving one often hurts another.
  • Deploy changes gradually and test in staging, because most outages come from changes and misconfigurations rather than hardware failures alone.

What the video covers

  • AI can write most application code, but it cannot yet make key system design decisions such as database choice, caching, architecture style, and service communication.
  • Real outages like the 2023 FAA groundstop, the 2024 CrowdStrike update, and the October 2025 AWS DNS failure were caused by design and operational decisions, not coding alone.
  • Every system starts from one basic picture: a user request hits an app server, which queries a database and returns the response, with caches, search engines, and message queues added as needed.
  • System design evaluates three goals: reliability (works when things go wrong), scalability (handles growing load), and maintainability (easy to change, including for AI agents).
  • Systems break from hardware failures, software bugs such as race conditions, and human mistakes like config errors, which are a leading cause of outages.
  • Safe shipping practices include staging environments and gradual rollouts that expose changes to 5%, then 20%, then 50% of users while monitoring each step.
  • Horizontal scaling with load balancers spreads traffic across servers, and read replicas handle read-heavy database workloads.
  • Choose SQL for relational data and strict correctness such as transactions, and NoSQL for self-contained records that need to scale.
  • ACID properties (atomicity, consistency, isolation, durability) keep transactions correct under concurrent use.
  • Indexes speed up lookups, and LSM-tree storage writes sorted data in memory then flushes and merges files in the background.

Answers

Questions about this video

What is the basic diagram every system design starts from?

A user sends a request to an app server that exposes the API, the server queries a database for or stores the data, and the response returns to the user. Caches, search engines, and message queues are then added as needed.

What are the three goals the video says every system should aim for?

Reliability, meaning it keeps working when something fails; scalability, meaning it handles growth from a few users to millions; and maintainability, meaning it is easy to change, including for new engineers and AI agents.

Why does the video recommend starting with a monolith?

For most new apps, a single monolithic application is the right starting point. Microservices and message queues add complexity and should be introduced only when there is a clear need.

Full Transcript — Download SRT & Markdown

00:00
Speaker A
Okay, so AI can write pretty much all of your code now. You can open cloud code, say build me a Facebook style feed, and it'll just go, but at some point it stops and asks you stuff like Postgress
00:12
Speaker A
or Dynamo DB, one server or a load balancer in front of three. Should we cach this in Reddus, one big app, or a bunch of microservices? Should the services call each other directly or go through a message queue? Or worse, it
00:25
Speaker A
doesn't ask. It just picks for you. And that's the part AI can't really do for you yet because those calls decide whether your app survives real users.
00:33
Speaker A
[music] Like in January 2023, a few deleted files grounded every domestic flight in the US for a morning, the first nationwide groundtop since 9/11.
00:43
Speaker A
In 2024, one bad update from Crowdstrike crashed about 8 1/2 million Windows machines. And in October 2025, one bug inside AWS took down a huge chunk of the internet for most of a day. and down detector logged over 11 million problem
00:58
Speaker A
reports. None of that was about writing code. Those were design calls. That's system design. And the good news is most of it comes from a handful of ideas. A lot of them come from one book, Designing Data Inensive Applications by
01:11
Speaker A
Martin Kleman, which pretty much every back-end engineer ends up reading. So, in this video, I'm going to give you the 11 concepts that matter most in about [music] 20 minutes. We'll start with the one picture every system has. Then why
01:23
Speaker A
systems break and how to ship without breaking them. Then how to scale. Then how databases actually work. And finally, how your services talk to each other. And it goes from simple to advanced. So whether you're prepping for an interview or building your own
01:36
Speaker A
product with AI, you'll get something out of this. And it all starts with one simple picture. Now before we continue, I recently launched our school community. We're helping to master AI agents, automations, and building real AI products. This is coming from someone
01:50
Speaker A
who used to work as a senior AI software engineer at companies like Amazon and Microsoft. And in this community, you are going to get full AI builder road map where you're going to start with any automations then later on moving into AI
02:02
Speaker A
agents, research systems, SAS buildings, and eventually how to productize and market your AI skills. You're going to get the templates, workflows, weekly live calls, and direct community supports. So when you get stuck, you can ask questions and get help right away.
02:16
Speaker A
And the goal here is not just to watch more videos. It's actually build, post your progress, get feedback, and start to level up. So, if you're interested, make sure to jump right in, start the first course, and I'll see you in a
02:27
Speaker A
community. All right, so first thing first, lesson one, every system is the same diagram. When people hear system design, they picture some giant scary chart, but at the start, it's always this. A user sends a request. That request hits your app server, which is
02:43
Speaker A
the thing that exposes your API. The server talks to a database. The database stores or finds the data and the answer goes back to the user. That's it.
02:52
Speaker A
Whether you're designing Facebook, Uber, a bank, or your own SAS, it starts exactly like that. Then you add pieces as you need them. A cache like Reddus so you're not hitting the database for the same thing over and over. A search
03:04
Speaker A
engine like Elastic Search for when people search. A message cue like Kafka for work that can happen in the background. And really, system design is just three things on top of that picture. the data, how it flows, and
03:16
Speaker A
what happens when something fails. [music] Learn the basic picture well, and every new problem is just a few of those pieces moved around. And this is also how most interviews actually go.
03:26
Speaker A
You draw that picture and then they poke at it. What happens if this server dies?
03:30
Speaker A
What's another way you could design this? And how does that piece actually work? That's pretty much it. So, if you can draw the diagram and answer those three questions for each box, you're already ahead of most people walking in.
03:43
Speaker A
Lesson two, every system is trying to hit three goals. And Kleman's book opens with exactly these: reliable, scalable, and maintainable. Reliable means it keeps working even when something goes wrong. Scalable means when you go from a 100 users to 10 million, it can still
03:59
Speaker A
handle the load. And maintainable means it's easy to change. How fast can a new engineer get going in this codebase? And these days, how easy is it for an AI agent to work in it? If your code is a
04:10
Speaker A
mess, claude code is going to struggle in it just like a new hire would. And these three pull against each other all the time. Adding 10 more servers helps you scale. But now there's more stuff that can break and more stuff to
04:21
Speaker A
maintain. So when you're making any design call, just ask which of these three does this help and which one does it hurt? Before we jump into the next part, I want to show you something I've been using recently. So, if you build
04:33
Speaker A
with AI, you probably have a file like this, a spec.md full of rough notes, and you clean it up by hand before you can write a prompt. That's basically the gap voice OS is trying to solve. Voice OS is
04:45
Speaker A
a desktop voice app for Mac and Windows that understands what you're looking at and what you actually want done. So, I circle this paragraph here and ask it out loud. Make this shorter and turn it into three clear tasks. And you can see
04:58
Speaker A
voice OS light up at the top. And now the paragraph is three clean tasks. And you can circle anything on your screen and tell it what to do. Now there's two different modes here. Dictation mode just types whatever I say into any app,
05:10
Speaker A
like this Slack message here. Agent mode is different. I hold the key, ask for one task, and it actually does it. So I hold the key and say, "Have Claude Code build the first task from spec.md." Voice OS plugs into Claude Code through
05:24
Speaker A
MCP. So the task goes straight over. No typing a prompt. Give it a minute. Okay, it's done. Refresh the page here and you can see the first task is working. It works in over a 100 languages and in
05:36
Speaker A
apps like Gmail or Slack, it shows you first before it sends anything. And you can build your own MCPS for it. This part of the video is sponsored by VoiceOS. So, grab it from the link at the top of the description and in the
05:48
Speaker A
pinned comment. All right, let's get back into it. Lesson three, why systems break. And there are really three reasons. The first is hardware. Discs die, machines lose power, cables get unplugged, and this one's real. Sharks have actually bitten undersea internet
06:04
Speaker A
cables, and Google has wrapped its newer cables in extra armor, partly because of it. The second is software, a bug that was always sitting in the code waiting for the one input nobody tested. That's basically what happened to AWS in
06:17
Speaker A
October 2025. A hidden race condition, which is when two processes step on each other's toes, wiped out the DNS record for Dynamo DB in its biggest region. And because so much of AWS leans on Dynamo DB, it all fell over together for around
06:32
Speaker A
15 hours. And the third one is people. Somebody makes one typo in a config file and pushes it out. That FAA outage. The FAA said contractors unintentionally deleted files while trying to fix a sync between the main database and the
06:45
Speaker A
backup. And one well-known study of big internet services found that people making mistakes, mostly config changes, were the top cause of outages. [music] And now you can add one more. AI written code that looks right but isn't. So if
06:59
Speaker A
things are always going to break, lesson four is how you ship without breaking production. Number one, use a staging environment. That's a copy of production where you test first. So if someone pushes the wrong config, you catch it
07:12
Speaker A
there instead of in front of real users. Number two, gradual rollouts. Instead of sending a change to everyone, you send it to 5% of users, then 20, then 50, and you watch what happens at each step.
07:24
Speaker A
[music] CrowdStrike pushed its bad update to everyone at basically the same time and afterwards they literally said they'd start rolling updates out in stages starting with a small test group. Number three, fast roll backs. So if something does go wrong, one button puts the old
07:39
Speaker A
version back. And number four, good monitoring, which just means your servers keep sending out logs and numbers so you can see a problem before your users tell you about it. And honestly, this is also how I'd set up
07:50
Speaker A
anything Claude Code ships for you. Let it build, but make it go through the same gates. Lesson five, scale out, not up. When your app gets more traffic, the first thing you'll want to do is just buy a bigger server, more memory, more
08:04
Speaker A
CPU. That's called scaling up. And it works for a while, but one machine always hits a ceiling. So instead, you scale out. You run lots of smaller servers, and you put a load balancer in front, which is basically a traffic cop
08:17
Speaker A
that spreads the requests across all of them. And the big win is if one server dies, the others keep going. Then you do the same thing for the database. You add read replicas, which are copies of your database that only handle reads, [music]
08:30
Speaker A
so the main one can focus on writes. When the data gets too big for one machine, you shard it, which means you split it up, like users A to M on one database and N to Z on another, and you
08:41
Speaker A
add a cache for the stuff everyone keeps asking for. But here's the catch. One computer is simple. [music] 50 computers have to coordinate. What if one is getting way more traffic than the others? What if one is up but kind of
08:53
Speaker A
broken? That's the real cost of scaling. So in an interview, think of it as levels. Level one is the basic diagram.
09:01
Speaker A
Level two, you add a load balancer and more servers. Level three, you scale the database with replicas and shards and then caching and cues on top. Don't jump to level three for an app with a 100 users. Start simple and add each level
09:15
Speaker A
when the traffic actually asks for it. [music] Lesson six, SQL or NoSQL, which is probably the most common question in any system design interview. Let's say you're building a profile page. Anna has a name, a city, and where she works. In
09:29
Speaker A
a NoSQL database like Dynamo DB or MongoDB, you can just store all of that as one document, kind of like a JSON object. You ask for Anna, you get Anna.
09:39
Speaker A
Simple, fast, and it scales really well. But now Anna has a 100 friends, and you want to show their names on her page. If you copy each friend's info into Anna's document, then the moment one friend changes their name, you've got to go
09:51
Speaker A
update that name everywhere it was copied. With a relational database like Postgress, you store each person once, give them an ID, and keep a separate table that just says who's friends with who. Then a query called a join pulls it
10:04
Speaker A
all together. Change a name once and it's updated everywhere. So my rule of thumb is just count the [music] joins.
10:11
Speaker A
If your data is full of relationships or you need things like money or tickets to always be exactly right, go SQL. If it's mostly self-contained records that need to scale, no SQL is great. And when you're working with AI, say this out
10:24
Speaker A
loud in your prompt because otherwise it's just guessing. Also, really quickly before we move on to the next section, I'm really curious what you think about this one. When you start a brand new project, what's your default database?
10:36
Speaker A
Postgress every time or no SQL until you actually need joins. Tell me which one and why. Comment down below. I read every single comment. Lesson seven, transactions. Here's the classic example. Someone's at an ATM and their bank balance says $1,500. At the same
10:53
Speaker A
time, someone else on the same account opens the banking app on their phone and it also says $1,500. [music] The person at the ATM takes out 200. So, the real balance is now 1,300. but the person on the phone is still looking at 1,500 and
11:07
Speaker A
they hit withdraw all of it. Depending on your database and how it's set up, that can actually go through and now the account is in the negative. That's a really bad bug and it's exactly the kind of bug that only shows up with real
11:19
Speaker A
users at the same time. This is what asset is about. Atomicity means it all happens or none of it happens. No half a withdrawal. [music] Consistency means your rules always hold like a balance can't go below zero. Isolation means two
11:33
Speaker A
transactions running at the same time don't step on each other. And durability means once it says saved, it stays saved even if the server crashes a second later. Relational databases are built around this. And a lot of NoSQL
11:46
Speaker A
databases have added transactions, too. Just know which one you're getting. And if you're having AI build anything with money, tickets, or inventory in it, tell it to wrap those updates in a transaction and then actually test two of them at the same time because that
11:59
Speaker A
bug won't show up when you're the only one clicking around. Lesson eight, indexes. [music] To get why they matter, imagine the simplest database ever, just a text file. Every time you save something, you add a line to the end.
12:12
Speaker A
Writing is super fast, but now you want Jessica's info, and you have no idea where it is. So, you have to read the whole file from the top. With a million users, that's way too slow. So, you add
12:23
Speaker A
an index. It's basically a little lookup table that says Jessica's data starts right here. So, you jump straight to it instead of reading everything. And this is exactly what you do in a real database. If your app keeps looking
12:35
Speaker A
people up by email, you add an index on the email column, and that lookup goes from checking every single row to almost instant. [music] But here's the trade-off, and it's the one interviewers want to hear. An index takes extra space. And every time you
12:48
Speaker A
write, the database has to update the index, too. So, indexes make reads faster and writes a little slower. Don't index everything. Index the things you actually search by. And here's a quick tip. When a page in your app gets slow,
13:01
Speaker A
a missing index is one of the first things to check. You can literally ask Cloud Code to look at your slowest queries and tell you which columns need an index. Lesson nine, and this is where you start to sound like you really know
13:14
Speaker A
your stuff. Under the hood, most databases are built on one of two designs. The first is called an LSM tree, which is what Cassandra uses.
13:22
Speaker A
[music] New writes go into a sorted list in memory. When that fills up, it gets written to disk as a sorted file. And in the background, the database keeps merging those files together because it never edits old files and just keeps
13:34
Speaker A
adding new ones. Writes are really fast. The downside is a read might have to check a few different files to find the newest version. The second is a B tree, which is what Postgress and SQL light use. It keeps your data on disk in
13:46
Speaker A
fixed-sized pages organized like a tree. So finding any key is just a short walk from the top of the tree down to the right page. When a page gets full, it splits in two. Reads are fast and predictable, but every write has to go
13:58
Speaker A
update a page in place. And both use something called a write ahead log. Before changing anything, the database writes down what it's about to do. So if the server crashes halfway, it just replays that log and picks up where it
14:10
Speaker A
left off. So the takeaway is pretty simple. Is your app writeheavy like logging tons of events? [music] Lean LSM. Read heavy like a store where people browse all day? Lean Bree. And really quickly before we wrap up, I
14:24
Speaker A
really want to hear from you on this one. Picture the app you're building right now. Is it right heavy or read heavy? And did you pick your database because of that or just because it was the default? Be honest. Comment down
14:35
Speaker A
below. I read every single comment. Lesson 10. Sometimes the answer is a totally different kind of database. If people need to search text, you use something like Elastic Search. [music] Instead of storing each document with its words, it flips it around and stores
14:50
Speaker A
each word with a list of documents it shows up in. So searching for cat is one lookup instead of reading every document. If you're tracking things over time, like CPU usage on your servers or sensor data from cars, a time series
15:03
Speaker A
database like influx DB is built for questions like what happened in the last 5 minutes? And for analytics like how many customers have more than $500, a column based database like ClickHouse stores each column together. So that question only reads the one column it
15:19
Speaker A
needs, not every row. You don't need these on day one, but when a question keeps getting slow, this is usually the answer. And lesson 11, how your services talk to each other. But quick thing first, should it even be more than one
15:32
Speaker A
service? For most new apps, one big app, a monolith, is the right place to start.
15:37
Speaker A
You split a piece out into its own micros service when it really needs to scale on its own or a separate team owns it. And once you've got more than one, they have to talk. Whenever one service sends data to another, say a Python app
15:49
Speaker A
sending a user profile to a Java service, it has to turn that data into bytes. That's called encoding. Most of the time that's JSON. And JSON is great because you can read it. But it has some catches. It's big. In Kleman's example,
16:03
Speaker A
the same record takes 81 bytes as JSON, 33 with protocol buffers, and 32 with Avro. Very large numbers can lose precision when JavaScript reads them, which is literally why Twitter started sending its IDs as text. And JSON can't
16:17
Speaker A
hold raw binary, so images have to be converted into text first, which makes them [music] bigger. The other thing is versions. You can never update every server and every app at the same exact moment. So for a while, old code and new
16:30
Speaker A
code are running side by side and they both have to understand the same messages. That's backward compatibility and formats like protocol buffers and AVO are built with that in mind. Then how you send it. REST over HTTP is the
16:43
Speaker A
default and it's perfect for public APIs. GRRPC sends compact binary and is usually used between your own internal services when speed matters and a message Q like Kafka sits in the middle as a buffer. If the service on the other
16:56
Speaker A
end is down or just overloaded, the messages wait in line until it's ready instead of getting lost. That's also why cues are great for slow work like sending emails or processing uploads.
17:06
Speaker A
Your app drops a message in the queue, answers the user right away, and a worker picks it up in the background.
17:12
Speaker A
So, pretty much that's system design in about 20 minutes. Every system starts as the same picture. You plan for things breaking before they do, and you pick your database by how your app actually reads and writes. [music] Let me know in
17:24
Speaker A
the comments which lesson clicked for you and which one you want a full deep dive on next. And if this helped, make sure to subscribe. I'll see you in the next one. [music] [music]
Topics:system designscalabilityreliabilitySQL vs NoSQLdatabase indexingload balancingcachingmicroservicesACID transactionsAI software engineering

Get More with the SozAI App

Transcribe recordings, audio files, and YouTube videos — with AI summaries and speaker detection. 30 minutes free.

Or transcribe another YouTube video here →