System Design Resources
System Design Resources
Important Books :
1. Amazon.com: System Design Interview – An Insider's Guide eBook: Xu, Alex: Kindle
Store
2. Amazon.com: Operating Systems: Three Easy Pieces eBook: Arpaci-Dusseau, Remzi,
Arpaci-Dusseau, Andrea: Kindle Store
3. Web Scalability for Startup Engineers: Ejsmont, Artur: 9780071843652:
Amazon.com: Books
4. Understanding Distributed Systems: What every developer should know about large
distributed applications: Vitillo, Roberto: 9781838430207: Amazon.com: Books
5. Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and
Maintainable Systems: Kleppmann, Martin: 9781449373320: Amazon.com: Books
6. Kafka: The Definitive Guide: Real-Time Data and Stream Processing at Scale:
9781491936160: Computer Science Books @ Amazon.com
7. Buy Distributed Algorithms – An Intuitive Approach 2e (The MIT Press) Book Online
at Low Prices in India | Distributed Algorithms – An Intuitive Approach 2e (The MIT
Press) Reviews & Ratings - Amazon.in
8. Elasticsearch: The Definitive Guide: A Distributed Real-Time Search and Analytics
Engine eBook: Gormley, Clinton, Tong, Zachary: Amazon.in: Kindle Store
9. Buy Cassandra – The Definitive Guide, 3e: Distributed Data at Web Scale Book Online
at Low Prices in India | Cassandra – The Definitive Guide, 3e: Distributed Data at
Web Scale Reviews & Ratings - Amazon.in
Imp keywords
1. Write ahead logging
2. SSL passthrough / termination on load balancers
3. Clock vectors
4. Hinted handoff
5. Bloom filters
6. Gossip protocols
7. Merkle trees
8. Two phase commit
9. Two phase locking
10. Consistent hashing
11. Data replication
12. Total order broadcast
13. Isolation levels (read uncomitted, read comitted, repeatable read, serializable)
14. Quad trees (GeoHashin)
15. Inverse indexing - Google search/any search indexing
16. Gaming ranking - rank players based on score and faster.
17. Word search in trie - auto suggestions system design
18. Sort 5gb data in 1gb memory - merge sort
19. Paxos algo
20. Merkle Tree
21. Backpressure
22. Circuit breaker
23. Raft
24. Service discovery
25. Saga
26. Hyperloglog
Important algorithms
https://github.com/resumejob/system-design-algorithms
● Frugal Streaming
● Geohash / S2 Geometry
● Leaky bucket / Token bucket
● Loosy Counting
● Operational transformation
● Quadtree / Rtree
● Ray casting
● Reverse index
● Rsync algorithm
● Trie algorithm
● Consistent Hashing
● Count-Min Sketch
● Bloom Filters
● HyperLogLog
● Skip Lists
● LRU
● B tree
● Hierarchical Timing Wheels https://blog.acolyer.org/2015/11/23/hashed-and-hierarchical-
timing-wheels/
● Merkle trees
● Fenwick Tree
- http://citeseerx.ist.psu.edu/viewdoc/download;jsessionid=2FDD6F53D3DC3BB91FA42E
7277B6765B?doi=10.1.1.14.8917&rep=rep1&type=pdf
● AMS (Alon Matias Szegedy) algorithm
https://docs.microsoft.com/en-us/azure/architecture/patterns/index-patterns
Cloud arch pattern
Ambassador Create helper services that send network requests Design and
on behalf of a consumer service or application. Implementation,
Operational
Excellence
Operational
Excellence
Cache-Aside Load data on demand into a cache from a data store Data
Management,
Performance
Efficiency
Choreography Let each service decide when and how a business Messaging,
operation is processed, instead of depending on a
central orchestrator. Performance
Efficiency
Circuit Breaker Handle faults that might take a variable amount of Reliability
time to fix when connecting to a remote service or
resource.
Claim Check Split a large message into a claim check and a Messaging
payload to avoid overwhelming a message bus.
Performance
Efficiency
Event Sourcing Use an append-only store to record the full series of Data
events that describe actions taken on data in a Management,
domain.
Performance
Efficiency
Operational
Excellence
Operational
Excellence
Gateway Routing Route requests to multiple services using a single Design and
endpoint. Implementation,
Operational
Excellence
Index Table Create indexes over the fields in data stores that are Data
frequently referenced by queries. Management,
Performance
Efficiency
Materialized View Generate prepopulated views over the data in one Data
or more data stores when the data isn't ideally Management,
formatted for required query operations.
Operational
Excellence
Pipes and Filters Break down a task that performs complex Design and
processing into a series of separate elements that Implementation,
can be reused.
Messaging
Queue-Based Load Use a queue that acts as a buffer between a task Reliability,
Leveling and a service that it invokes in order to smooth
intermittent heavy loads. Messaging,
Resiliency,
Performance
Efficiency
Performance
Efficiency
Data
Management,
Performance
Efficiency
Valet Key Use a token or key that provides clients with Data
restricted direct access to a specific resource or Management,
service.
Security
CQRS Segregate operations that read data from operations that update data by
using separate interfaces.
Event Sourcing Use an append-only store to record the full series of events that describe
actions taken on data in a domain.
Index Table Create indexes over the fields in data stores that are frequently referenced
by queries.
Materialized Generate prepopulated views over the data in one or more data stores
View when the data isn't ideally formatted for required query operations.
Static Content Deploy static content to a cloud-based storage service that can deliver
Hosting them directly to the client.
Valet Key Use a token or key that provides clients with restricted direct access to a
specific resource or service.
DATA MANAGEMENT PATTERNS
CQRS Segregate operations that read data from operations that update data by
using separate interfaces.
Pipes and Filters Break down a task that performs complex processing into a series of
separate elements that can be reused.
Static Content Deploy static content to a cloud-based storage service that can deliver
Hosting them directly to the client.
Messaging patterns
+4
The distributed nature of cloud applications requires a messaging infrastructure
that connects the components and services, ideally in a loosely coupled manner
in order to maximize scalability. Asynchronous messaging is widely used, and
provides many benefits, but also brings challenges such as the ordering of
messages, poison message management, idempotency, and more.
Pattern Summary
Claim Check Split a large message into a claim check and a payload to avoid
overwhelming a message bus.
Pipes and Filters Break down a task that performs complex processing into a series of
separate elements that can be reused.
Priority Queue Prioritize requests sent to services so that requests with a higher priority
are received and processed more quickly than those with a lower
priority.
Queue-Based Use a queue that acts as a buffer between a task and a service that it
Load Leveling invokes in order to smooth intermittent heavy loads.
Scheduler Agent Coordinate a set of actions across a distributed set of services and other
Supervisor remote resources.
Book https://learning.oreilly.com/library/view/cloud-architecture-patterns/9781449357979/
https://leetcode.com/discuss/interview-question/system-design/943886/Facebook-Product-Design-
Questions
https://github.com/checkcheckzz/system-design-interview
GitHub - donnemartin/system-design-primer: Learn how to design large-scale systems. Prep for the
system design interview. Includes Anki flashcards.
Drawing tool
https://leetcode.com/discuss/interview-question/system-design/758105/Remote-system-design-
diagram-drawing-tool
Product Design
The product design interview at Facebook will involve designing a product or API to support an end-user
experience. Here's a list of concepts that Facebook recommends you review before your interview:
-Scalability
-Design patterns
-Data ownership
-Protocols
-Data formats
-Client-server design
-Designing for long term vs. complexity
-Accommodating possible product changes
Some example questions involve designing a product API or an email server.
System Design
The system design interview at Facebook will ask you to weigh design considerations for complex
problems. Here's a list of concepts that Facebook recommends you review before your interview:
-Concurrency (threads, deadlock, starvation, consistency, coherence)
-Caching
-Database partitioning, replication, sharding, CAP Theorem
-Networking (IPC, TCP/IP)
Real-world performance (relative performance RAM, disk, your network, SSD)
-Availability and reliability (types of failures, failure units, how failures may manifest, mitigations, etc.)
-Data storage and data aggregation
-QPS capacity/machine estimation (back of the envelope estimates), byte size estimation
Some example questions involve architecting a video distribution system or designing a mobile image
search client.