This repository is complementary material for O'Reilly book System Design From Scratch. It contains chapter-wise design & architectural decisions, trade-offs analysis, implementation plan, code and execution details.
As a product grows from a proof of concept to a large-scale distributed system, its design has to evolve with it. System Design from Scratch follows that process, evaluating trade-offs involving scale, cost, expertise, time to market, resilience, and operational overhead at each stage.
Software engineer Mandeep Singh takes an iterative approach to system design, showing you how choices around compute, databases, load balancing, caching, deployment, and software engineering principles change as systems scale. As you follow along, you’ll learn how to weigh technical and operational considerations and make choices that fit your organization’s needs.
- Understand how core system design concepts work together
- Apply a decision framework to evaluate trade-offs involving scale, cost, expertise, time to market, and resilience
- Make technical choices based on your organization’s needs
- Design systems that are practical to run and maintain over time
- Use AI as an assistant in system design or as a component of the system
NOTE: The book is work-in-progress and is being updated frequently. For latest updates, see O'Reilly platform. For questions, errata or suggestions, see Questions/Errata/Feedback section.
Instead of building a new sample system each chapter, the approach taken here is to start with an initial product and iteratively enhance it to incorporate concepts from subsequent chapters. Each feature/architecture decision builds on previous ones. Recommendation is to read the chapters in order, don't jump to random chapters.
This allows for a more practical understanding of how system designs evolve. The system being built is a photo sharing social media platform called PhotoZ.
- The very initial product version is located at chapter01/bses-v0.
- Further iterative product enhancements are included in photoz directory.
Every chapter and photoz/ directory has execution logs with commit history. You can follow this combination to grasp on the incremental implementation and architecture upgrade. Wherever needed, an additional README is included with setup/run instructions and test results/benchmarks.
NOTE: The code in this repository is sample implementation for educational purposes only. Most of the code is AI-generated and only light-weight review is done. If you are using this code for some purpose, please do extensive testing and security review before using it in production.
| Chapter | Description |
|---|---|
| Chapter 1 Product Inception: Launching a Million Dollar Idea | Building MVP, requirements gathering, tech stack decision making |
| Chapter 2 | TBA |
| Chapter 3 Product Goes Viral: System Crashed | Debugging, system scaling, load balancing, Observability, Application Servers Automated Scaling |
| Chapter 4 | TBA |
| Chapter 5 | TBA |
| Chapter 6 | TBA |
| Chapter 7 | TBA |
| Chapter 8 | TBA |
| Chapter 9 | TBA |
| Chapter 10 | TBA |
| Chapter 11 | TBA |
| Chapter 12 | TBA |
- Watch on YouTube - @MsDeepSingh
- Read System Design From Scratch newsletter.
- For conferences, meetups and other updates, follow on LinkedIn
- Feel free to drop questions on Builders Lounge Discord Server.
You can report Errata on official O'Reilly website. For anything specific to code or documentation in GitHub repository, please open a GitHub issue.
