System Design Basics - rFronteddu/general_wiki GitHub Wiki
Intro
Whenever we are designing a large system, we need to consider a few things:
- What are the different architectural pieces that can be used?
- How do these pieces work with each other?
- Ho can we best utilize these pieces: what are the right tradeoffs?
Key Characteristics of Distributed Systems
Scalability
Capability of a system to process or a network to grow and manage increased demand. Generally the performance of a system, although designed to be scalable, declines with the system size due to the management or environment cost. Things that are hard to share or are inherently atomic are strong limiting factors for scalability.
- Horizontal scaling means to scale by adding more servers
- Easier to scale dynamically
- more coordination
- Vertical scaling means to scale by adding more power (CPU, RAM, Storage, etc)
- less complex
- more expensive to scale
- scaling may bring downtimes
Reliability
Reliability is the probability a system will fail in a given period. A distributed system is considered reliable if it keeps delivering its services even when one or several of its software or hardware components fail.
Availability
Availability is the time a system remains operational to perform its required function in a specific period. Reliability is availability over time considering the full range of possible conditions that can occur.
If a system is reliable, it is available. However, an available system is not necessary reliable. It is possible to achieve high availability even with an unreliable product by minimizing repair time and ensuring that spares are always available when they are needed.
Efficiency
Two standard measures of efficiency are response time (or latency, time to get the first item) and throughput (number of items delivered per time unit)
Serviceability or Manageability
How easy it is to operate and maintain the system. It describes the simplicity and speed with which a system can be repaired or maintained. How easy is to design and fix problems, making updates and so on.