System Design Interview – An Insider's Guide: Volume 2

by: Alex Xu (0)

System Design Interview - An Insider's Guide (Volume 2)

This book can be seen as a sequel to the book: System Design Interview - An Insider’s Guide. It covers a
different set of system design interview questions and solutions. Although reading Volume 1 is helpful, it is not required. This book should be accessible to readers who have a basic understanding of distributed systems.

This volume provides a reliable strategy and knowledge base for approaching a broad range of system design questions that you may encounter. It will help you feel confident during this important interview. This book provides a step-by-step framework for how to tackle a system design question. It also includes many real-world examples to illustrate a systematic approach, with detailed and well-explained steps you can follow.

What’s inside?
- An insider’s take on what interviewers really look for and why.
- A 4-step framework for solving any system design interview question.
- 13 real system design interview questions with detailed solutions.
- 300+ diagrams to visually explain how different systems work.

Table of Contents
Chapter 1: Proximity Service Chapter 2: Nearby Friends Chapter 3: Google Maps Chapter 4: Distributed Message Queue Chapter 5: Metrics Monitoring Chapter 6: Ad Click Event Aggregation Chapter 7: Hotel Reservation Chapter 8: Distributed Email Service Chapter 9: S3-like Object Storage Chapter 10: Real-time Gaming Leaderboard Chapter 11: Payment System Chapter 12: Digital Wallet Chapter 13: Stock Exchange

The Reviews

I have followed Alex’s Linkedin for a while as he always posts easy-to-digest system design materials so I bought the book immediately after it was released. This book is not only helpful for system design interviews but covers a good breadth and depth of different complex systems, such as stock exchange, payment system, email server, etc. I really enjoyed reading this book.I wish there are more books like this. Besides this book, I recommend the following:- system design primer github by donnemartin- eng blogs: uber, airbnb, discord, facebook, netflix, etc.- some important papers: scaling memcache at facebook, google’s 3 papers in big data,- design data-intensive applications by Martin Kleppmann- system design interview by alex xu, volume 1. This is more basic but it’s still a good read.- youtube channels: system design interview channel, uber engineering, infoq, and hussein nasser.- find mock interview partners. This can be really helpful.

The system design interview series is a great balance between technical depth and practical use. Alex gets to the point quickly for each system design question while at the same time providing deep insights into complex systems.I recommend reading this book, especially if you are pressed for time.

This is the best book I have read about System Design and is useful for every backend engineer - whether they are preparing for an interview or not. This book covers some of the most important topics in today’s software industry and provides cutting-edge designs in a well-defined structure.Being an engineering manager and technical architect, I have interviewed 100+ engineers for many years, and successful candidates nail each individual section as structured in the book - whether it is about asking relevant questions, giving proper back-of-the-envelope estimation, giving high-level design of APIs/databases, detailed design or even identifying bottlenecks and solve for them. Successful candidates discuss multiple relevant solutions before choosing the best and this book provides many such solutions with pros/cons for each approach.Each section is well illustrated with clear and simple diagrams that even a new college graduate can follow. A picture is worth a thousand words and this book has beautifully used illustrations to convey the concepts. Even experienced engineers and architects learn from what they haven’t been working on. For example, an engineer at one company might want to know the challenges involved in building cutting-edge designs for other complex systems like Google maps Or Uber-like systems. This book provides practical, well-thought-through, beautifully written solutions.The links/references at the end I have found super helpful too. You can go to those links, read them if you want to drill even further down on any topic. I have tried a few other books and websites but others are either too theoretical or don’t have the quality content that this book has, having been written by experienced engineers and architects.This is a must-have book for anyone pursuing a backend engineering career, and glad to be owning and reading this book. This will certainly make you stand out in the interview and will make you a better engineer.

Disclaimer - I am neither prepping for an interview nor I myself quiz candidates on such open-ended system design topics. Curious after viewing design diagram for a prototypical "Payment Engine" by the author in LinkedIn, I purchased the book. It proved to be a very good investment of money, time and energy. Just ordered Alex's first book!Contents -SDI-Vol 2 has 13 chapters, on how to design Proximity Service (TenCent influenced), Nearby Friends (Amazon), Distributed Message Queue, Real-time Gaming Leaderboard, Payments Engine, Digital Wallet and a few more. Each spans about 30 pages with clearly drawn workflow diagram, high level design (e.g., API stubs, push vs. pull, choice of data store etc), BOTE calculation to plan throughput/capacity, bullet-pointed wrap up, a one-page mind map of the design and reasonably exhaustive index of useful reference materials.Particularly impressive is the way authors have (a) briefly introduced key, but slightly less mainstream concepts like HdrHistorgram, Hamilton Curve, FIX protocol, Secure-ID etc, and (b) discussed possible alternative solutions (e.g., TC/C vs. Saga for distributed transactions), where applicable. I now work in FinTech and both the "Payment System" (heavily influenced by stripe) and "Digital Wallet" sections are extremely well done, concise and useful abstractions for real enterprise systems.Second-order Applicability -Apart from SDI - and I doubt many companies would ask "Design a service to find nearby friends" to most interviewees - this should be a very useful book for three reasons.One - Flight Simulator mode. If you're familiar with "core concepts" like Nearest-N neighbors, distributed time-series database, different aggregation windows streaming, Hotspot shard, idempotency and immutability in strongly consistent systems, write-ahead log etc but have not used most of them in "real life", this book offers a quick walkthrough of systems where it gets used, and how. Investing time here is like practicing how to land during Category 5 storm in a flight simulator. Even if you may never need to land the plane like that, it is good to at least have an idea how it is done.Two - Scalability-Consistency-Availability Triad. This could be a one- or two- week long crash course in "how to scale system". Especially, early back-of-the-envelope (BOTE) calculations shown here were fundamental arbiter on the final design choice. e.g., Payment Systems do not usually have a problem of scale. They rarely process more than ~10 tps. In such systems, however, each transaction must be "strongly consistent" (no double payment!). Some systems can manage transient loss of availability with minimal operational friction (e.g., blips in a monitoring system are unlikely to cause massive disruption), while some others (e.g., Object Storage) need to build for availability grounds-up. In all real-life systems there are certain "Day Zero Decisions" that can only be done right during design. Going through this book stretches those decision muscles well.Three - Up-leveling (or, clear communication). This is, I guess, where the SDI - or the interview part - comes in to filter out understanding from verbosity. Fundamentally, designing a system is not the most difficult part in engineering software. Decision binding right choice with key players - each with varying ego, objectives and goals - is where effort cycles are spent. This book is a good way to communicate these decisions in a structured, objective and somewhat universal language to both technical and executive leadership. The mind maps accompanying each design were the best parts of the book and they provide a good, repeatable framework to work on similar initiatives. Frameworks rule in complex domain of "system design" as the practitioner has a good starting point with good framework and can then focus on the other unique aspects of the system to be built/managed.Great book. Perhaps the language could have been a tightened a bit here and there with an expert editor. But very very close to 5-stars! Looking forward to a premium publisher doing justice to this series.

This book is well written. It easy to follow while explaining complex topics. I think this volume is much better than the first one. The first one I felt was too shallow (except for the Cassandra chapter), and a rehash of Grokking. Well worth the $35 I spent on this.

This is one of the best collections of system design examples for both the curious learner as well as for the interviewee.

This book provided some helpful tips for how to prepare for my job interview.

As a senior software engineer, I found this book is very helpful for people who have CS background but need to fully understand other systems/infrastructures on which have no opportunities to work on at work. Also a great reference book for interview preparing. definitely 5 stars

Was so much waiting for it!! Great collection for system design interviews.

Good Part:The 2nd volume is written with much better depth and that's really one thing I hated about the Vol 1 which didn't. Overall great content and topics picked are also good.Downsides:The last 3 chapters (Payment System, Digital Wallet & Stock Xchange) they go in great detail on explaining one topic and completely loose the focus from the overall picture of the system.Somethings one will have hard time figuring out,1. What is Payment Gateway or System or are they same?2. Where is money collected for digital wallet? is wallet the bank or does a bank has wallet?3. How does the pricing works in Stock Xchange? How does the ticker's scale? Way too much detail around in-memory architecture and that's important but also the other things.But still better than last vol 1.

Alex Xu’s system design interview prep boos are the best. But i wish i know they have online content earlier, seems to be more user friendly than paperback version.

I was a little bit scared to order considering another review said not for tall people or people with a long torso. I am 5’9 and 143 lbs and these fit like a dream. I did order up because of that review and I’m glad I did. They are not skintight which is how I wanted them and they’re very cute!

I was sad to open my package to see there was a stain on the front, it said new but I don’t think they were I think someone had worn and returned these since there was pink lip stick stains on the front :/

The black one was extremely cheap. The buttons didn’t even reach past my belly button. I had to just throw it away. The other three are great! Would've been 5 stars if it weren't for the toddlers length black one.

I couldn't get over the quality. The material is soft and can either dress up or dress down. Very comfortable and thankful they snap inside of hook! I will be purchasing more, just in a different colors.

Definitely size up! I’m 5’8” 160lbs and the medium was too tight, but the large is great. The tan asymmetric one is my favorite, and the grey definitely fits tighter than the others. Also the black isn’t ribbed like the rest but no big deal. Kinda wish the clasp closures at the bottom were a little less bulky, but I have that issue with all bodysuits. Overall great value for the price - not super high quality but still worth it in my opinion!

These are amazing except the black one! The black one is way too small and isn’t the same ribbed material as the rest of them besides that I absolutely love these!

I literally wear these all the time. Just a heads up the 3 neutral colors are a ribbed stretchy material and the black was more of a cotton traditional tank top (and fit tighter) but didn’t bother me and would buy again knowing this. I find myself reaching for one of these at least once a week

Absolutely loved these bodysuits. The colors work perfect for fall and the fits were great.

Highly recommended

This was perfect...22 gauge, single strand and 6 colors...nice little box to pull the wire through too.

Great for your general wiring needs, highly recommend. 5 stars

Nice little set of wires. Some reviews said it's "pocket sized," how large were they expecting 20ga wire to be?? Nice compact set of rolls, good quality, lit up some auto accessories no problem. Easier to use than braided strands, gave some rigidity but still flexible enough to follow contours in engine bay. Box is about 1.5"x1.5"x6", and wires can feed right through the box no problems. Will be ordering these again once I use all these up!

😎

soldering it and it keeps breaks way to easily

Works fine, but much too expensive. And how come electronic products aren't manufactured in the US anymore? We're going to regret becoming dependent upon China for items such as these.

Great product, Great price

Thin wire, but I'm very happy overall.

Really helpful for preparing interview. A lot of classic system design problems with clear and detailed guidance.

I read Alex’s first book when preparing for my job change and it helped me land a job that I really enjoy. When I heard there was volume 2, I immediately bought it and read it. After doing interviews on both sides as a candidate and an interviewer, I could say these two books are truly useful. This volume 2 book even has broader and deeper technical content than volume 1. I particularly liked the proximity service and hotel reservation chapters.  The proximity service chapter explained some of the most important geospatial algorithms: geohash, quadtree, Google S2, etc. It not only explained how those algorithms work at the high level but also when and why we should use them. Many other resources jump into sharding immediately. This book actually did the math about the memory and storage requirement, and came to the conclusion that sharding may not be required as the memory footprint was usually small for the geospatial index. I really appreciate the book authors doing this as this is exactly what we do in real design. We back our design with napkin math. I also liked the hotel reservation chapter. It defined the problem and scope really well. Not everything needed to be distributed. For a hotel reservation system, the QPS is not high and the challenge of this system lies in handling concurrent requests. This chapter gave a good overview of optimistic locking, pessimistic locking, and caching. I’ve heard about those terms from time to time but never used them in real life. It’s really nice to see how they were actually used in real systems.  Are the books good for interview training and learning some new knowledge? Absolutely yes.  PROs:+ A lot of visuals. There are visuals every 2-3 pages.+ The book is easy to digest despite covering some of the advanced topics such as distributed transactions, S3, stock exchange, etc.+ This book might increase your chance to get into FAANG. CONs:- It doesn’t cover all the system design topics.- It probably will increase your chance to get into FAANG, but you will likely need other resources as well. Other materials for system design:+ For those who like YouTube, the SystemDesignInterview channel is good. It is taught by someone from Amazon(?).+ Uber, Airbnb, Meta eng blogs are pretty awesome. + DDIA book+ Do mock interviews. + Harvard CS75 Lecture 9 Scalability Web Development David Malan. You can find the video on YouTube.+ System Design primer GitHub repository.

I received the item and I love the product. But today Amazon refund this item for no reason. Can someone look into this?

Alex Xu is my godfather and please read this before you go to interview.Promise me please.

The book is just a must have for anyone who is preparing for interview. The book paper quality is super, white and thick pages.

Great read! Interesting characters and world, looking forward to more stories to learn more. You should start following this author.

Difficult to maintain reading continuity due to the excessive number of typographical errors. It's probably an interesting plot, but it was too annoying to slog through all the mistakes in spelling, grammar and syntax. Gave up in disgust at 33%. Hire a proofreader.

This is a fine dark urban fantasy adventure. It is well written and edited. I especially like Rook. I anxiously await the sequel.

This book was sooooo good! Probably my favorite read this year. I just couldn't put it down, managed to read it in two days. That's crazy for me. Every chapter end makes you excited to start the next. Highly recommend this book!

Crown censured sorcerer Ambrose Drake and his partner Rook are going home after fighting a mysterious creature that lives in the basement causing problems for the apartment tenants. After telling the tenants that the work is done, they go home. Upon arriving home Ambrose is surprised to find a person in his home. His name is Janus. He nervously explains why he is there (the Administratum has sent Janus) to report on Ambrose’s work in Australia. Ambrose is then given the gift of having his “censure necklace” removed by Janus, Why? Janus cleans up before going to his next work assignment. There is a being from the Seven Hungers emerging the being is trying to cross into our world. This being has wished to destroy the world. This causes Ambrose with his ex-lover Karen, and sidekicks to fight the being. Will Ambrose succeed in saving the world? Will Ambrose die?The author has written a novel that is an incredible fantasy. I enjoyed Ambrose as he just was amazed by his character. The fast-pace, plot and the detailed world-building made this story an amazing urban fantasy to read. It also includes some horror that only adds to the novel.Disclaimer: I received an arc of this book from the author/publisher from Netgalley. I wasn’t obligated to write a favorable review or any review at all. The opinions expressed are strictly my own.

I received this book free from Goodreads.This is actually a very interesting story. I really liked the characters and their interactions. I like the unpredictable directions the story went in.

I generally don’t request books from authors I’ve not read before because I have so many. However, this one ticked all my favs, so I gave it a chance. I’m so glad I did! While I wasn’t really fond of Drake at first (and TBH that isn’t a deal breaker for any book), I really was fond of him by the book’s end. Add to that the vivid descriptions, great writing, unique characters, and interesting universe, I am now hooked on this series. I can’t wait to see what’s going to happen with Drake, Karen, and the other great side characters that make this such a great book. Full of action, snark, gore, humor, and fun, I want the next book now! Highly recommend. I was provided a complimentary copy which I voluntarily reviewed.

Haven't even finished this one and I love it already, Had a heck of a time putting it down once I started reading. Its wonderfully well developed and the monsters are enough to give you nightmares. Snarky lead with other equally snarky characters. I have no idea where this goes and i really don't care......its that good. I'm gonna be sorry to finish it. Will keep on the lookout for others from this writer...what an imagination!

Love this necklace. I wear it all the time. The wood tones are not overly glossy but also not so light that the wood looks dried out. The turquoise accents really stand out well too and are really the whole reason why I purchased this piece in the 1st place. Definately a long drooping necklace btw- im 5'10 and it hangs down to the vottom.of my ribcage. Be careful with the chord holding it altogether and its just a typical thin black elastic-fabric band and those tend to snap if you're too rough on them or of it gets snagged on something. I wear it with mostly solid color shirts and it tends to make the outfit look more special than it probably is. Will be looking for a braclet of similar design to pair with it.

Feels great, looks a good quality, but most of all seems like attention to customer is superior: a nice styling bag, a card-size semi-transparent Bodhisattvas image included, the beads are comfortable and eye-candy.Thanks!

The necklace arrived on time and in perfect condition. I couldn't be happier with the service provided by all the amazing Amazon employees. Thanks!!!

Don't buy this necklace what ever you do.

Honestly, the necklace could be better. I like the style of the necklace but because the beads are all edged up on the ends it forms the necklace into more of a V shape so I don't get that round necklace shape that I'm looking for when I wear it. If it wasn't for that I would give it a full five stars.

I bought five different sizes of these beads last year. I love them a lot! The wood beads are beautiful with interesting patterns/markings on them, solid, and extremely comforting when touching. They help me calm down and settle into a nice meditative mode. They help me generate a lot of compassion for myself and for others.I especially enjoy the largest beads of 25 mm. I like the stretchy cords too. Each bead on one string has a cute little wood “head”(I don’t know what it is otherwise called) attached that makes that bead stand out and look really sophisticated.

The bead quality is fantastic, the wood grain is visible and attractive, the cord the beads are on is sturdy and flexible, and it comes in a pretty little embroidered drawstring bag with a little plastic art print. got much more than I paid for or expected, impressed

The beads themselves were pretty good but the necklace had the wrong number of beads (111 when there were supposed are supposed to be 108+1, someone was careless with their counting). Also the string was VERY stretchy and it made the necklace not slide around comfortably but rather stretch as you moved, which is not what you want. Ended up re-wiring it myself with some cheap beading string and with the correct count.

Disclaimer - I am neither prepping for an interview nor I myself quiz candidates on such open-ended system design topics. Curious after viewing design diagram for a prototypical "Payment Engine" by the author in LinkedIn, I purchased the book. It proved to be a very good investment of money, time and energy. Just ordered Alex's first book!Contents -SDI-Vol 2 has 13 chapters, on how to design Proximity Service (TenCent influenced), Nearby Friends (Amazon), Distributed Message Queue, Real-time Gaming Leaderboard, Payments Engine, Digital Wallet and a few more. Each spans about 30 pages with clearly drawn workflow diagram, high level design (e.g., API stubs, push vs. pull, choice of data store etc), BOTE calculation to plan throughput/capacity, bullet-pointed wrap up, a one-page mind map of the design and reasonably exhaustive index of useful reference materials.Particularly impressive is the way authors have (a) briefly introduced key, but slightly less mainstream concepts like HdrHistorgram, Hamilton Curve, FIX protocol, Secure-ID etc, and (b) discussed possible alternative solutions (e.g., TC/C vs. Saga for distributed transactions), where applicable. I now work in FinTech and both the "Payment System" (heavily influenced by stripe) and "Digital Wallet" sections are extremely well done, concise and useful abstractions for real enterprise systems.Second-order Applicability -Apart from SDI - and I doubt many companies would ask "Design a service to find nearby friends" to most interviewees - this should be a very useful book for three reasons.One - Flight Simulator mode. If you're familiar with "core concepts" like Nearest-N neighbors, distributed time-series database, different aggregation windows streaming, Hotspot shard, idempotency and immutability in strongly consistent systems, write-ahead log etc but have not used most of them in "real life", this book offers a quick walkthrough of systems where it gets used, and how. Investing time here is like practicing how to land during Category 5 storm in a flight simulator. Even if you may never need to land the plane like that, it is good to at least have an idea how it is done.Two - Scalability-Consistency-Availability Triad. This could be a one- or two- week long crash course in "how to scale system". Especially, early back-of-the-envelope (BOTE) calculations shown here were fundamental arbiter on the final design choice. e.g., Payment Systems do not usually have a problem of scale. They rarely process more than ~10 tps. In such systems, however, each transaction must be "strongly consistent" (no double payment!). Some systems can manage transient loss of availability with minimal operational friction (e.g., blips in a monitoring system are unlikely to cause massive disruption), while some others (e.g., Object Storage) need to build for availability grounds-up. In all real-life systems there are certain "Day Zero Decisions" that can only be done right during design. Going through this book stretches those decision muscles well.Three - Up-leveling (or, clear communication). This is, I guess, where the SDI - or the interview part - comes in to filter out understanding from verbosity. Fundamentally, designing a system is not the most difficult part in engineering software. Decision binding right choice with key players - each with varying ego, objectives and goals - is where effort cycles are spent. This book is a good way to communicate these decisions in a structured, objective and somewhat universal language to both technical and executive leadership. The mind maps accompanying each design were the best parts of the book and they provide a good, repeatable framework to work on similar initiatives. Frameworks rule in complex domain of "system design" as the practitioner has a good starting point with good framework and can then focus on the other unique aspects of the system to be built/managed.Great book. Perhaps the language could have been a tightened a bit here and there with an expert editor. But very very close to 5-stars! Looking forward to a premium publisher doing justice to this series.

System Design Interview – An Insider's Guide: Volume 2
⭐ 4.7 💛 907
paperback: $34.35
Buy the Book