System Design Flashcards
What is Scalability?
The capability of a system to grow and manage increased demand.
Horizontal vs. Vertical Scaling
Horizontal scaling means that you scale by adding more servers into your pool of resources.
Vertical scaling means you add more power (CPU, RAM, storage, etc) to an existing server
What is Reliability?
The probability a system will fail in a given period
What is Availability?
It is a simple measure of the percentage of time that a system, service, or a machine remains operational under normal conditions.
Standard measures of efficiency?
Latency and Bandwidth
What is Latency?
The delay to obtain the first item
What is Bandwidth?
The number of items delivered in a given time unit (e.g., a second)
What is Serviceability/Manageability?
Serviceability or manageability is the simplicity and speed with which a system can be repaired or maintained
What is a Load Balancer?
Helps spread traffic across a cluster of servers to improve responsiveness and availability of applications
Benefits of Load Balancing
- Users experience faster service, single servers have to finish their previous task
- Fewer failed or stressed components, instead of single device performing a lot of work, several devices perform a little work
Benefits of Load Balancing
- Users experience faster service, single servers have to finish their previous task
- Fewer failed or stressed components, instead of single device performing a lot of work, several devices perform a little work
How does the load balancer choose the backend server?
- Ensures that the server they choose is actually responding appropriately to requests
- Use a pre-configured algorithm to select one from the set of healthy servers
What is a health check for?
Load balancers should only forward traffic to “healthy” backend servers
What is data partitioning?
A technique used to break a big database into smaller parts
Motivation for data partitioning?
After a certain scale point, it is cheaper and more feasible to scale horizontally by adding more machines than to grow it vertically
What are Indexes?
Indexes can be created using one or more columns of a database table, providing the basis for both rapid random lookups and efficient access of ordered records.
What are Indexes?
Indexes can be created using one or more columns of a database table, providing the basis for both rapid random lookups and efficient access of ordered records.
What is a proxy server?
Essentially, a proxy server is a piece of software or hardware that facilitates the request for resources from other servers on behalf of clients.
What is Redundancy?
Redundancy is the duplication of critical components or functions of a system with the intention of increasing the reliability of the system, usually in the form of a backup or fail-safe
SQL vs NoSQL: Storage
SQL: SQL stores data in tables where each row represents an entity and each column represents a data point about that entity
NoSQL: NoSQL databases have different data storage models. The main ones are key-value, document, graph, and columnar
SQL vs NoSQL: Schema
SQL: Each record conforms to a fixed schema
NoSQL: Schemas are dynamic
SQL vs NoSQL: Querying
SQL: Uses SQL for manipulating data
NoSQL: Queries are focused on a collection of documents
SQL vs NoSQL: Scalability
SQL: SQL databases are vertically scalable.
NoSQL: NoSQL databases are horizontally scalable
Reasons to use SQL databases
- Your data is structured and unchanging
- If you business is not experiencing massive growth that would require more servers
Reasons to use NoSQL databases
- Storing large volumes of data that often have little to no structure
- Rapid development, it doesn’t need to be prepped ahead of time
What is ingress bandwidth?
Download speed
What is egress bandiwdth?
Upload speed