𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

System Design Guide for Software Professionals: Build scalable solutions – from fundamental concepts

✍ Scribed by Dhirendra Sinha
, Tejas Chopra


Publisher
Packt Publishing Pvt Ltd
Year
2024
Tongue
English
Leaves
507
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Enhance your system design skills to build scalable and efficient systems by working through real-world case studies and expert strategies to excel in interviews

Key Features
Comprehensive coverage of distributed systems concepts and practical system design techniques.
Insider tips and proven strategies from engineering leaders at top tech companies.
Detailed case studies of widely used applications and their system architectures.

Book Description
Building scalable software systems is more critical than ever. Yet, many software professionals struggle to navigate the complexities of system design, especially when aiming for positions at top tech companies. Written by Dhirendra Sinha, a seasoned Engineering Leader at Google with a blend of experience working at large companies such as Cisco, Oracle, and Yahoo, and Tejas Chopra, a Senior Software Engineer at Netflix, a TEDx speaker, and a Co-Founder of GoEB1, this comprehensive and authoritative resource on system design offers invaluable insights and strategies to help you excel in interviews with all major tech companies.

This guide covers the basics of system design, including the principles and techniques of distributed systems, and delves into core building blocks such as distributed system theorems, attributes, and the design and implementation of system components. Following examples of popular applications such as Uber, Twitter, Instagram, Google Docs, and Netflix, you’ll learn how to apply concepts to real-world scenarios. The book offers expert advice and strategies for preparing and acing system design interviews, along with a mind map/cheat sheet summarizing the key takeaways.

By the end of this book, you’ll be equipped with unique techniques and the confidence to solve any coding interview question.

What you will learn
Design for scalability and efficiency with expert insights
Apply distributed system theorems and attributes
Implement DNS, databases, caches, queues, and APIs
Analyze case studies of real-world systems
Discover tips to excel in system design interviews with confidence
Apply industry-standard methodologies for system design and evaluation
Explore the architecture and operation of cloud-based systems

Who this book is for
This book is a must-have resource for experienced software professionals, particularly those with 5-15 years of experience in building scalable distributed systems, web applications, and backend microservices. Whether you're a seasoned developer or an architect looking to deepen your expertise in system design, this book provides the insights and practical knowledge you need to excel in tech interviews and advance your career. A solid foundation in distributed systems, data structures/algorithms, and web development will help you get the most out of this comprehensive guide.

✦ Table of Contents


System Design Guide for Software Professionals
Contributors
About the authors
About the reviewers
Preface
Who this book is for
What this book covers
To get the most out of this book
Conventions used
Get in touch
Share Your Thoughts
Download a free PDF copy of this book
Part 1: Foundations of System Design
1
Basics of System Design
What is system design?
Software system
Distributed software system
Understanding system design
What are the types of system design?
High-level system design
System architecture
Data flow
Scalability
Fault tolerance
Low-level system design
Algorithms
Data structures
APIs
Code optimization
Importance of system design in the industry
Practical examples of the importance of system design
Summary
2
Distributed System Attributes
A hotel room booking example
Consistency
Strong consistency
Eventual consistency
Availability
Understanding partition tolerance
Network partition
Partition tolerance
Latency
Durability
Reliability
Fault tolerance
Scalability
Vertical scaling
Horizontal scaling
Summary
3
Distributed Systems Theorems and Data Structures
CAP theorem
PACELC theorem
Paxos
Raft
BGP
The Byzantine fault
Byzantine fault tolerance
Modern BFT
FLP impossibility theorem
Consistent hashing
Bloom filters
Count-min sketch
HyperLogLog
Summary
Part 2: Core Components of Distributed Systems
4
Distributed Systems Building Blocks: DNS, Load Balancers, and Application Gateways
Exploring DNS
DNS querying
Scalability, reliability, and consistency in DNS
Scalability
Reliability
Consistency
Load balancers
Placing load balancers
Advantages of load balancers
Global and local load balancing
DNS and GSLB
Load balancer algorithms
Load balancing at different layers of the Open Systems Interconnection (OSI) model
Deployment of load balancers
Implementing load balancers
Application gateways
Features and capabilities
Microservices architectures
Cloud-native implementations
On-premises options
Summary
5
Design and Implementation of System Components –Databases and Storage
Databases
Types of databases
Relational databases
NoSQL databases
The advantages and disadvantages of relational and NoSQL databases
NoSQL databases
Key-value stores
What is a key-value store?
Use in distributed systems
Designing a key-value store
Enhancing scalability and data replication
Boosting scalability
Consistent hashing
Virtual nodes
Data duplication strategies
Implementing get and put functions
Implementing get and put operations
Using r and w
Ensuring fault tolerance and identifying failures in a key-value store
Managing temporary failures
Addressing permanent failures
Ring membership promotion for failure detection
A system design interview – key value store design questions and strategies
DynamoDB
No fixed schema
API functions
Partitioning data in DynamoDB
Throughput optimizations in DynamoDB
High availability in DynamoDB
Column-family databases
HBase
HBase details
Graph-based databases
The Neo4j graph database
Neo4j details
Relational modeling versus graph modeling
Graph modeling
Adding a new node to an existing graph
Summary
References
6
Distributed Cache
What is caching?
What is distributed caching?
How is it different from regular caching?
Use cases
Benefits of using a distributed cache
Challenges of using distributed caching
Designing a distributed cache
Requirements
Design journey
Popular distributed cache solutions
Redis
Memcached
How to choose between Redis and Memcached
Summary
7
Pub/Sub and Distributed Queues
The evolution of distributed systems
Designing a distributed queue
Designing a pub/sub system
Key characteristics of pub/sub systems
Pub/sub system design considerations
Kafka
The importance of Kafka in distributed systems
Kafka Streams
Kinesis
Summary
Part 3: System Design in Practice
8
Design and Implementation of System Components: API, Security, and Metrics
REST APIs
Design principles of REST APIs
Use cases for REST APIs
Strengths and weaknesses
gRPC APIs
Design principles of gRPC APIs
Use cases for gRPC APIs
Strengths and weaknesses
Comparing REST and gRPC
API security
Authentication
Authorization
Secure communication of APIs
Rate limiting
Distributed systems logging
Centralized logging
Best practices for implementing distributed logging
Metrics in a distributed system
Types of metrics
Open source tools for metrics
Best practices for implementing metrics
Alerting in a distributed system
Designing effective alerts
Open-source tools for alerting
Best practices for implementing alerting
Tracing in a distributed system
Distributed tracing
Open-source tools for distributed tracing
Best practices for implementing tracing
Best practices
Summary
9
System Design – URL Shortener
Real-world use cases
Functional requirements
Non-functional requirements
Client APIs needed
Estimates and calculations
System design
Core challenge
Choice of database
High-level solution architecture
Requirements verification
Summary
10
System Design – Proximity Service
Real-world use cases
Functional requirements
Non-functional requirements
Client APIs needed
Estimates and calculations
System design
High-level system design
Core challenge
Final high-level solution architecture
Requirements verification
Summary
11
Designing a Service Like Twitter
Functional requirements
Non-functional requirements
Data model
Scale calculations
Exploring high-level design
Microservices architecture
Designing Tweet Service
Data storage
Tweet creation flow
Tweet retrieval flow
Caching
Designing User Service
Data storage
User registration flow
User authentication flow
Follow/unfollow flow
Retrieving followers/followees
Low-level design – Timeline Service
Data flow
Timeline retrieval flow
Push-based updates
Designing Search Service
Data flow and indexing
Search query processing
Relevance scoring and ranking
Additional considerations
Summary
12
Designing a Service Like Instagram
Functional requirements
Non-functional requirements
Designing the data model
Scale calculations
High-level design
Components and modules in the high-level architecture
Low-level design
Designing the Photo Upload Service
News Feed Service
User Service
Additional considerations
Summary
13
Designing a Service Like Google Docs
Functional requirements
Non-functional requirements
Data model
Relationships
Scale calculations
Assumptions
Storage requirements
Bandwidth considerations
Processing requirements
High-level design
Software components and modules of high-level design
Low-level design
Designing the document service
Designing the Collaboration Service
Designing the Access Control Service
Additional considerations and best practices
Summary
14
Designing a Service Like Netflix
Functional requirements
Non-functional requirements
Designing the data model
Relationships
Scale calculations
Assumptions
Storage estimation
Bandwidth estimation
Processing estimation
High-level design
Low-level system design
Video Service
Video upload and storage
Video encoding and transcoding
Video streaming
Caching and content delivery
User Service
User authentication and authorization
User profile management
Database and caching
Recommendation Service
The CDN
CDN architecture and content distribution
Request routing and video streaming
Adaptive bitrate streaming
Content security and DRM
Summary
15
Tips for Interviewees
Tips for preparation for system design interviews
Understanding the fundamentals
Studying common system design patterns
Practicing designing systems
Learning from online resources
Honing your communication skills
Reviewing and reflecting
Tips for the interview session
Understanding the problem statement
Breaking down the problem
Key steps to follow
Communicating your solution effectively
Summary
16
System Design Cheat Sheet
Which data store should we use for a use case?
Which data structures should we use for a use case?
Which components should we use for which use case?
What protocol should we use for which use case?
Which solution should we use for which core challenge?
Summary
Index
Why subscribe?
Share Your Thoughts
Download a free PDF copy of this book


πŸ“œ SIMILAR VOLUMES


Professional Node.js: Building Javascrip
✍ Pedro Teixeira πŸ“‚ Library πŸ“… 2012 πŸ› Wrox 🌐 English

<b>Learn to build fast and scalable software in JavaScript with Node.js</b><p>Node.js is a powerful and popular new framework for writing scalable network programs using JavaScript. This no nonsense book begins with an overview of Node.js and then quickly dives into the code, core concepts, and APIs

Professional Node.js: Building Javascrip
✍ Pedro Teixeira πŸ“‚ Library πŸ“… 2012 πŸ› Wrox 🌐 English

<b>Learn to build fast and scalable software in JavaScript with Node.js</b><p>Node.js is a powerful and popular new framework for writing scalable network programs using JavaScript. This no nonsense book begins with an overview of Node.js and then quickly dives into the code, core concepts, and APIs

Professional Node.js: Building Javascrip
✍ Pedro Teixeira πŸ“‚ Library πŸ“… 2012 πŸ› Wrox 🌐 English

<b>Learn to build fast and scalable software in JavaScript with Node.js</b><p>Node.js is a powerful and popular new framework for writing scalable network programs using JavaScript. This no nonsense book begins with an overview of Node.js and then quickly dives into the code, core concepts, and APIs

Professional node.js: building JavaScrip
✍ Teixeira, Pedro πŸ“‚ Library πŸ“… 2013;2012 πŸ› John Wiley & Sons, Inc 🌐 English

Learn to build fast and scalable software in JavaScript with Node.js Node.js is a powerful and popular new framework for writing scalable network programs using JavaScript. This no nonsense book begins with an overview of Node.js and then quickly dives into the code, core concepts, and APIs. In-dept

Professional node.js: building JavaScrip
✍ Teixeira, Pedro πŸ“‚ Library πŸ“… 2013 πŸ› John Wiley & Sons, Inc 🌐 English

Learn to build fast and scalable software in JavaScript with Node.js Node.js is a powerful and popular new framework for writing scalable network programs using JavaScript. This no nonsense book begins with an overview of Node.js and then quickly dives into the code, core concepts, and APIs. In-dept