Grokking the System Design Interview
Vote

0% completed

​

System Design Basics

What Is In Here

If You Only Have Time for a Few

What Is Not In Here

This chapter is a reference, not a reading list.

Everything in it is a building block that shows up inside the designs in the earlier chapters. Think of the load balancer you drew, the index you added, or the replication you promised. Each lesson takes one of those and explains how it actually works, in more depth than a design walkthrough has room for.

You do not need to read it front to back, and most people should not. Come here in one of three situations.

A term in an earlier chapter was unfamiliar. Look it up, read the one lesson, go back. That is the main use.

An interviewer asked about something you had not explained. "You said you would shard. How do you decide which machine a key goes to?" These are the lessons that let you answer that instead of stopping.

You are revising. Late in your preparation, reading the chapter through is worth doing once. The individual pieces stop being separate ideas and start connecting to each other.

What is in this chapter, grouped by the job each piece does
What is in this chapter, grouped by the job each piece does

What Is In Here

The vocabulary. Key Characteristics of Distributed Systems defines scalability, reliability, availability, efficiency and manageability. Worth reading first if you read nothing else here, because every later lesson assumes these words.

Getting requests to your servers. Load Balancing covers what a load balancer does and where it sits. Load Balancing Algorithms covers how it picks a machine, which is a question interviewers ask often. Proxies covers forward and reverse proxies.

Storing the data. SQL vs. NoSQL covers both families, the four kinds of NoSQL store, and how to choose between them. Indexes covers how a lookup avoids reading every row, and what that costs on write. Data Partitioning covers splitting data across machines. Redundancy and Replication covers keeping copies.

Keeping the copies in agreement. This is the hardest group and the one that separates strong candidates. CAP Theorem and PACELC Theorem explain the constraint you are working under. Quorum explains how many nodes must agree before an operation counts. Leader and Follower explains how one writer is chosen. Consistent Hashing explains how to add and remove machines without moving all the data.

Making it fast. Caching covers the types of cache, the read and write strategies, invalidation and eviction.

Smaller building blocks. Bloom Filters for cheap membership checks, and Heartbeat for noticing a dead machine. Checksum for noticing corrupt data, and Long-Polling vs WebSockets vs Server-Sent Events for pushing updates to a client.

If You Only Have Time for a Few

Ranked by how often they come up in an actual interview:

  1. Caching, because almost every design uses one and the write strategies are what follow-up questions ask about.
  2. Data Partitioning, because "how would you shard this?" is asked in most large-scale questions.
  3. CAP Theorem, because interviewers use it to check whether you understand what you gave up.
  4. Load Balancing Algorithms, because it is a concrete question with a concrete answer, which makes it easy to ask.
  5. Indexes, because it is the fastest way to tell whether a candidate has worked with a real database.

What Is Not In Here

Two things live elsewhere, and it is worth knowing which is which.

How to choose between two options is in the System Design Trade-offs chapter. This chapter explains what a cache is; that chapter covers when a write-through cache beats a write-back one. If your question is "which one should I pick", you want that chapter.

Where each piece sits in a whole system is in System Design Master Template. This chapter explains one part at a time; the template shows how the parts fit together.

💡 In the interview: you will not be asked to define these terms, you will be asked to use them and then defend the choice. Nobody says "what is consistent hashing". They say "you have ten shards and you add an eleventh, what happens to the data", and consistent hashing is the answer. Read these lessons for the mechanism rather than the definition, because the mechanism is what lets you answer the follow-up.

Key takeaway: this chapter is reference material covering the individual building blocks that the designs elsewhere in the course are assembled from. Use it when a term is unfamiliar, when an interviewer probes something you skimmed, or as a single pass late in your preparation. Choosing between options is covered in the Trade-offs chapter, and how the pieces fit together is covered in the Master Template. If you are short of time, caching, data partitioning, CAP, load balancing algorithms and indexes are the five that come up most.

Kumar Rishav

Kumar Rishav

· 10 months ago

where will I find the video lectures of the contents of this course ?

Show 1 reply
Lawrence Maripfonde

Lawrence Maripfonde

· 2 years ago

Which tool are you using to design diagrams.

Show 2 replies

Reading Progress

0%


Vote for new content

On This Page

What Is In Here

If You Only Have Time for a Few

What Is Not In Here