Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
553 views
6 pages
System Design Cheat Sheet
System Design Cheat Sheet
Uploaded by
nivas.p5555
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save System Design Cheat Sheet For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
553 views
6 pages
System Design Cheat Sheet
System Design Cheat Sheet
Uploaded by
nivas.p5555
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save System Design Cheat Sheet For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save System Design Cheat Sheet For Later
You are on page 1
/ 6
Search
Fullscreen
Instantly share code, notes, and snippets. vasanthk / System Design.md Last active 9 hours ago YY star <> Code -ORevisions 41 Y¥Stars 5,000+ — PForks 2,376 System Design Cheatsheet, B)systen vesign.nd System Design Cheatsheet Picking the right architecture = Picking the right battles + Managing trade-offs Basic Steps 1. Clarify and agree on the scope of the system * User cases (description of sequences of events that, taken together, lead to a system doing something useful) © Whois going to use it? © Howare they going to use it? * Constraints © Mainly identify traffic and data handling constraints at scale © Scale of the system such as requests per second, requests types, data written per second, data read per second) © Special system requirements such as multi-threading, read or write oriented 2. High level architecture design (Abstract design) * Sketch the important components and connections between them, but don't go into some details © Application service layer (serves the requests) © List different services required © Data Storage layer © eg, Usually a scalable system includes webserver (load balancer), service (service partition), database (master/slave database cluster) and caching systems. 3. Component Design* Component + specific APIs required for each of them. © Object oriented design for functionalities. © Map features to modules: One scenario for one module. © Consider the relationships among modules: ™ Certain functions must have unique instance (Singletons) = Core object can be made up of many other objects (composition). = One object is another object (inheritance) * Database schema design. 4, Understanding Bottlenecks * Perhaps your system needs a load balancer and many machines behind it to handle the user requests. * Or maybe the data is so huge that you need to distribute your database on multiple machines. What are some of the downsides that occur from doing that? * Is the database too slow and does it need some in-memory caching? 5. Scaling your abstract design Vertical scaling © You scale by adding more power (CPU, RAM) to your existing machine. Horizontal scaling © You scale by adding more machines into your pool of resources Caching © Load balancing helps you scale horizontally across an ever-increasing number of servers, but caching will enable you to make vastly better use of the resources you already have, as well as making otherwise unattainable product requirements feasible. © Application caching requires explicit integration in the application code itself. Usually it will check if a value is in the cache; if not, retrieve the value from the database. © Database caching tends to be “free”. When you flip your database on, you're going to get some level of default configuration which will provide some degree of caching and performance. Those initial settings will be optimized for a generic usecase, and by tweaking them to your system's access patterns you can generally squeeze a great deal of performance improvement. © In-memory caches are most potent in terms of raw performance. This is because they store their entire set of data in memory and accesses to RAM are orders of magnitude faster than those to disk. eg. Memcached or Redis. © eg. Precalculating results (e.g. the number of visits from each referring domain for the previous day), © eg. Pre-generating expensive indexes (e.g. suggested stories based on a user's click history) © eg. Storing copies of frequently accessed data in a faster backend (e.g. Memcache instead of PostgreSQL. * Load balancing © Public servers of a scalable web service are hidden behind a load balancer. This load balancer evenly distributes load (requests from your users) onto your group/cluster ofapplication servers. © Types: Smart client (hard to get it perfect), Hardware load balancers ($$$ but reliable), Software load balancers (hybrid - works for most systems) — — Load i ~~ a ‘Web Server © Database replication © Database replication is the frequent electronic copying data from a database in one computer or server to a database in another so that all users share the same level of information. The result is a distributed database in which users can access data relevant to their tasks without interfering with the work of others. The implementation of database replication for the purpose of eliminating data ambiguity or inconsistency among users is known as normalization. © Database partitioning © Partitioning of relational data usually refers to decomposing your tables either row-wise (horizontally) or column-wise (vertically). © Map-Reduce © For sufficiently small systems you can often get away with adhoc queries on a SQL database, but that approach may not scale up trivially once the quantity of data stored or write-load requires sharding your database, and will usually require dedicated slaves for the purpose of performing these queries (at which point, maybe you'd rather use a system designed for analyzing large quantities of data, rather than fighting your database). © Adding a map-reduce layer makes it possible to perform data and/or processing intensive operations in a reasonable amount of time. You might use it for calculating suggested users in a social graph, or for generating analytics reports. eg. Hadoop, and maybe Hive or HBase. © Platform Layer (Services) © Separating the platform and web application allow you to scale the pieces independently. Ifyou add a new API, you can add platform servers without adding unnecessary capacity for your web application tier. © Adding a platform layer can be a way to reuse your infrastructure for multiple products or interfaces (a web application, an API, an iPhone app, etc) without writing too much redundant boilerplate code for dealing with caches, databases, etc.Sot Ng (eet : Key topics for designing a system 1. Concurrency * Do you understand threads, deadlock, and starvation? Do you know how to parallelize algorithms? Do you understand consistency and coherence? 2. Networking * Do you roughly understand IPC and TCP/IP? Do you know the difference between throughput and latency, and when each is the relevant factor? 3. Abstraction * You should understand the systems you're building upon. Do you know roughly how an OS, file system, and database work? Do you know about the various levels of caching in a modern os? 4, Real-World Performance * You should be familiar with the speed of everything your computer can do, including the relative performance of RAM, disk, SSD and your network. 5. Estimation * Estimation, especially in the form of a back-of-the-envelope calculation, is important because it helps you narrow down the list of possible solutions to only the ones that are feasible, Then you have only a few prototypes or micro-benchmarks to write. 6. Availability & Reliability * Are you thinking about how things can fail, especially in a distributed environment? Do know how to design a system to cope with network failures? Do you understand durability? Web App System design considerations: * Security (CORS) * Using CDN © Acontent delivery network (CDN) is a system of distributed servers (network) that deliver webpages and other Web content to a user based on the geographic locations of theuser, the origin of the webpage and a content delivery server. © This service is effective in speeding the delivery of content of websites with high traffic and websites that have global reach. The closer the CDN server is to the user geographically, the faster the content will be delivered to the user. © CDNs also provide protection from large surges in traffic. Full Text Search © Using Sphinx/Lucene/Solr - which achieve fast search responses because, instead of searching the text directly, it searches an index instead. Offline support/Progressive enhancement © Service Workers Web Workers Server Side rendering Asynchronous loading of assets (Lazy load items) Minimizing network requests (Http2 + bundling/sprites ete) Developer productivity/Tooling Acces lity Internationalization Responsive design Browser compatibility Working Components of Front-end Architecture Code HTMLS/WAI-ARIA. CSS/Sass Code standards and organization ° ° ° Object-Oriented approach (how do objects break down and get put together) ° JS frameworks/organization/performance optimization techniques ° Asset Delivery - Front-end Ops Documentation © Onboarding Docs © Styleguide/Pattern Library © Architecture Diagrams (code flow, tool chain) Testing © Performance Testing ° Visual Regression ° Unit Testing End-to-End Testing ° Process © Git Workflow © Dependency Management (npm, Bundler, Bower) © Build Systems (Grunt/Gulp)© Deploy Process © Continuous Integration (Travis Cl, Jenkins) Links System Design Interviewing Scalability for Dummies Introduction to Architecting Systems for Scale Scalable System Design Patterns Scalable Web Architecture and Distributed Systems What is the best way to design a web site to be highly scalable? How web works? Load earlier comments... muwickram commented on Oct 22, 2019 1.1n which CS course/s, you learn System Design? 2. Can you recommend few MOOC courses mtskillman commented on Jan 8, 2020 Line 107, typo: Minimizing netwrok requests (Http2 + bundling/sprites ete) tishion commented on Jan 17, 2020 Good resource for preparation. Thanks. Filsolu93 commented on Feb 22, 2020 Good information for preparation arjunbm13 commented on Feb 27, 2020 wow... lot of information about systems design... thanks for all the maintainers of this. rashrayhan commented on Mar 20, 2020 Thank you for the information
You might also like
React Snippets Cheat Sheet
PDF
No ratings yet
React Snippets Cheat Sheet
12 pages
90-Day High-Paying Job Prep Planner On Steroids
PDF
No ratings yet
90-Day High-Paying Job Prep Planner On Steroids
20 pages
Scale From Zero To Millions of Users
PDF
No ratings yet
Scale From Zero To Millions of Users
40 pages
System Design Interview - An Insider's Guide
PDF
90% (10)
System Design Interview - An Insider's Guide
103 pages
100 Question To Master DSA
PDF
No ratings yet
100 Question To Master DSA
54 pages
Python Data Types
PDF
No ratings yet
Python Data Types
23 pages
Pen SDK Programming Guide
PDF
No ratings yet
Pen SDK Programming Guide
256 pages
C++ Rvalue References Explained PDF
PDF
No ratings yet
C++ Rvalue References Explained PDF
16 pages
System Design Cheat Sheet
PDF
No ratings yet
System Design Cheat Sheet
1 page
System Design
PDF
100% (1)
System Design
12 pages
C++ Interview Questions All Together by CMK
PDF
100% (1)
C++ Interview Questions All Together by CMK
176 pages
BCA Android Notes U3
PDF
No ratings yet
BCA Android Notes U3
94 pages
Saga Pattern and Event Sourcing With Kafka: @rafabene
PDF
No ratings yet
Saga Pattern and Event Sourcing With Kafka: @rafabene
50 pages
DSA DSA: Questions For MAANG Interviews Questions For MAANG Interviews
PDF
No ratings yet
DSA DSA: Questions For MAANG Interviews Questions For MAANG Interviews
21 pages
SDM Sunbeam Notes Vvimp
PDF
No ratings yet
SDM Sunbeam Notes Vvimp
316 pages
Microservices, Container Docker and Kubernetes
PDF
No ratings yet
Microservices, Container Docker and Kubernetes
26 pages
C++ and Node - Js Integration by Scott Frees, PHD
PDF
No ratings yet
C++ and Node - Js Integration by Scott Frees, PHD
227 pages
Google
PDF
No ratings yet
Google
88 pages
5 Class Diagram - Grokking The Object Oriented Design Interview
PDF
No ratings yet
5 Class Diagram - Grokking The Object Oriented Design Interview
5 pages
Sonar Qube
PDF
No ratings yet
Sonar Qube
46 pages
Full Stack Developer Test
PDF
No ratings yet
Full Stack Developer Test
2 pages
NPM Commands - Cheatsheet
PDF
No ratings yet
NPM Commands - Cheatsheet
7 pages
Dsa Notes
PDF
No ratings yet
Dsa Notes
98 pages
ESP32 WebSocket Camera.
PDF
No ratings yet
ESP32 WebSocket Camera.
7 pages
An Overview of C++11 and C++14 - Leor Zolman - CppCon 2014
PDF
100% (2)
An Overview of C++11 and C++14 - Leor Zolman - CppCon 2014
55 pages
Linklist Love Babbar
PDF
No ratings yet
Linklist Love Babbar
43 pages
Stacks and Queue
PDF
No ratings yet
Stacks and Queue
17 pages
Java Notes
PDF
No ratings yet
Java Notes
14 pages
Vi Cheat Sheet
PDF
No ratings yet
Vi Cheat Sheet
10 pages
.. Continued - Java Multithreading For Senior Engineering Interviews
PDF
No ratings yet
.. Continued - Java Multithreading For Senior Engineering Interviews
8 pages
What Is Object-Oriented Programming - OOP Explained in Depth
PDF
100% (1)
What Is Object-Oriented Programming - OOP Explained in Depth
23 pages
Frontend Masters Hard Parts Ui
PDF
No ratings yet
Frontend Masters Hard Parts Ui
53 pages
Google - LeetCode
PDF
100% (1)
Google - LeetCode
43 pages
Denis Kalinin - Modern Web Development With Scala 142 (2017, Leanpub) - Libgen - Li
PDF
No ratings yet
Denis Kalinin - Modern Web Development With Scala 142 (2017, Leanpub) - Libgen - Li
147 pages
DSA by Shradha Didi & Aman Bhaiya
PDF
No ratings yet
DSA by Shradha Didi & Aman Bhaiya
7 pages
Case Study Based On: Cloud Deployment and Service Delivery Models
PDF
No ratings yet
Case Study Based On: Cloud Deployment and Service Delivery Models
10 pages
Codility - How To Get Ascender Element in A Array - Stack Overflow - HTM
PDF
No ratings yet
Codility - How To Get Ascender Element in A Array - Stack Overflow - HTM
38 pages
JS Short Hand
PDF
No ratings yet
JS Short Hand
7 pages
Educative System Design Part3
PDF
No ratings yet
Educative System Design Part3
51 pages
Designing Twitter - Grokking The System Design Interview
PDF
No ratings yet
Designing Twitter - Grokking The System Design Interview
14 pages
10 Steps To Learn Your Next Programming Language
PDF
100% (2)
10 Steps To Learn Your Next Programming Language
16 pages
C++ Interview Questions
PDF
100% (3)
C++ Interview Questions
11 pages
Designing Twitter Search - Grokking The System Design Interview
PDF
No ratings yet
Designing Twitter Search - Grokking The System Design Interview
9 pages
End To End Guide On Getting A Job in Tech Industry
PDF
100% (1)
End To End Guide On Getting A Job in Tech Industry
11 pages
Designing A URL Shortening Service Like TinyURL - Grokking The System Design Interview
PDF
No ratings yet
Designing A URL Shortening Service Like TinyURL - Grokking The System Design Interview
19 pages
Frontend Cheatsheet
PDF
No ratings yet
Frontend Cheatsheet
2 pages
Big o Cheat Sheet
PDF
No ratings yet
Big o Cheat Sheet
6 pages
Core Web Programming - Chapter 23: Document Object Model DOM
PDF
No ratings yet
Core Web Programming - Chapter 23: Document Object Model DOM
34 pages
Cheat Sheet: Eclipse Vert.x: 4. Timer and Periodic Tasks 5. HTTP
PDF
No ratings yet
Cheat Sheet: Eclipse Vert.x: 4. Timer and Periodic Tasks 5. HTTP
12 pages
Data Structures and Algorithms Made Easy: Narasimha Karumanchi
PDF
No ratings yet
Data Structures and Algorithms Made Easy: Narasimha Karumanchi
12 pages
How To Prepare For Success - Grokking Modern System Design Interview For Engineers & Managers
PDF
0% (1)
How To Prepare For Success - Grokking Modern System Design Interview For Engineers & Managers
6 pages
Language Fundamentals Java Identifiers
PDF
No ratings yet
Language Fundamentals Java Identifiers
5 pages
Java Programming Assignment 13
PDF
No ratings yet
Java Programming Assignment 13
2 pages
ACID Properties in DBMS.8
PDF
No ratings yet
ACID Properties in DBMS.8
4 pages
Data Structures - Reference Book
PDF
No ratings yet
Data Structures - Reference Book
11 pages
Sde Problems
PDF
No ratings yet
Sde Problems
8 pages
Kotlin Cheat Sheet
PDF
No ratings yet
Kotlin Cheat Sheet
3 pages
Caching: Application Server Cache
PDF
No ratings yet
Caching: Application Server Cache
4 pages
For HR Rounds, They Will Test Your Analytical Skills and How You Approach Towards A
PDF
No ratings yet
For HR Rounds, They Will Test Your Analytical Skills and How You Approach Towards A
3 pages
MOO Programming Cheat Sheet
PDF
No ratings yet
MOO Programming Cheat Sheet
9 pages