Table of contents
TogglePreface
System components are the basic building blocks of system design. They can be combined to construct complex software systems. Here we will also review the basic concepts of system design. System design is an important link in software engineering, which involves the overall architecture and design of the software system. A good system design can make software systems more reliable, scalable and easy to maintain.
Of course, if you want to use these components to design a system, you must first understand what design components there are? What does each design element represent? This article will introduce each system component, and the following chapters will explain the details and applications of each component in detail.
Why use system components?
Usually system design issues will have some similarities, but the details are often different. Therefore, we use system components to deal with the similarities between these cross-system design issues. For example, a load balancer is a common system component. If you encounter a situation where load balancing is required, just use this component directly.
The reason for separating system components through modularization is because "we only need to discuss their functions and do not need to discuss their implementation." This is also the concept of "abstraction" mentioned in the previous chapter. This also has another advantage. When the interviewer wants us to optimize a certain part, we only need to explain how to optimize specific system components without considering other system components.
Common system components in system design can also be used in well-known public cloud services, such as Amazon Web Services (AWS), Azure and Google Cloud Platform (GCP). The above-mentioned well-known cloud services usually provide corresponding system components for users to use.
System Design Component Building Block
In system design, system components are very important. In addition to estimating the resources and performance required for system design, the most important thing in a system design process is how to construct a software system through existing system design components. An introduction to various system components is also listed here. In future articles, these system components will be introduced in detail.
Domain Name System (DNS)
The Domain Name System (DNS) system component focuses on how to design a hierarchical and decentralized naming system for computers connected to the Internet through different Internet protocols. We also need to use DNS to help us deal with IP and domain name issues.
Load Balancers
Load Balancers are system components that are mainly used to distribute server-side service requests to incoming client requests. They can also reduce the load and bypass failed servers. To put it bluntly, we need to balance the requests going back and forth between the server and the client to prevent a particular server from being paralyzed by a large number of requests.
Databases
Databases are system components that are relational databases that enable us to store, search, modify, and delete data. In the following chapters, when explaining the database, I will also explain in detail the situations in which SQL is suitable and the situations in which NoSQL is suitable. I will also spend some space explaining how to optimize and back up.
Key-Value Store
Key-Value Store is a non-associative database that stores data in the form of key values. When explaining this database, we will also explain the design of the key-value store and the important concepts of achieving scalability, persistence and configurability...etc.
Content Delivery Network (CDN)
A content delivery network (CDN) is a network of interconnected servers that speeds up the loading of web pages for data-intensive applications. When a user visits a website, data from the website's server must be transmitted to the user's computer through the Internet. If users are located further away from the server, loading large files (such as videos or website images) can take a long time. In contrast, website content hosted on a CDN server is geographically close to users and reaches their computers faster. Using a CDN can effectively deliver content to end users while reducing latency and server load.
Sequencer
Among the sequencer system components, the main focus is on how to generate generators with unique IDs, and some space will be spent explaining the principles of these generators. So what is an ID generator? Take the user number as an example: when any user registers, we will give him a corresponding user number. This user number will hope that he is unique. The user number will not be repeated, so it cannot be generated randomly and needs to be transparent. It can only be produced after special processing.
Service Monitoring
Monitoring systems are very useful in decentralized systems because monitoring systems can help analyze the system and notify engineers, project managers, and customers when problems arise. Monitoring is usually used for early warning, so that system administrators can take action in advance before encountering problems again to prevent upcoming small problems from turning into big problems. Remember, no system in the world is error-free, so we need service monitoring to help us report problems.
Distributed Caching
The so-called cache optimizes performance by temporarily storing data. In a decentralized cache system, there will be multiple cache servers cooperating with various types of storage mechanisms to return frequently searched data to optimize the system.
Distributed Messaging Queue
A distributed system queue is a queue design composed of multiple servers, which allows different parts of the system to communicate and process operations in an asynchronous manner, achieving software system scalability and improving reliability.
Publish-Subscribe System
Publish and subscribe are just like the literal meaning. A publisher will publish the message, and other message receivers are called subscribers. Under this publish-subscribe specification, the publisher does not need to worry about who the subscribers are, as long as they are in charge of publishing, and the subscribers only need to be in charge of subscribing.
Rate Limiter
The rate limiter is mainly used to limit the incoming requests of the service. If a large flow of requests comes into the system, we can use this system component to limit the flow and slowly handle the requests to avoid system paralysis. We also usually use rate limiters as a defense layer for system services to avoid intentional or unintentional high-traffic access.
Blob Store
"Blob" is the abbreviation of binary large object. It is a large amount of data in binary form and does not necessarily conform to any file format. Blob storage stores these massive amounts of data in non-hierarchical storage areas called "data lakes." In vernacular, this component focuses on the storage method of unstructured data, such as multimedia files and binary executable files.
Distributed Search
The search system takes the query string from the user and returns relevant content in seconds or less. How to effectively and quickly return thousands of data to users is what this system component is doing.
Distributed Logging
Logging is an I/O-intensive operation that is time-consuming and slow. The main job of this component is to allow distributed system services to effectively record the execution records of their programs. If an error is encountered and needs to be corrected, we also need to use this recording component to trace back the process of the problem.
Distributed Task Scheduling
Distributed task scheduling is mainly used for coordination between tasks and resources. It efficiently allocates resources to tasks to meet task-level and system-level requirements. In short, through this system component, the system can effectively schedule and schedule resources and tasks.
Sharded Counters
As the name suggests, counters are used to count quantities, such as the number of views, comments, and likes by users. If it is a small-scale system, it can be completed with a simple program, but if it is a large-scale system, we need an efficient distributed counting system to handle millions of requests.
Conclusion
This article was written in March 2024, so the system components written in this article are based on what is currently known. The next few articles will also introduce these system components.
Hope you all like this content!
Quote
related articles
Back-of-the-envelope calculation – System Design 04
Non-functional features of software design – System Design 03
Application of abstraction in system design – System Design 02