System Design
System Design
A topic that I wanted to research and discuss is system design. The design of a system in software development is vital to create reliable, scalable, and software with high performance. System design is the process of designing the architecture of software that models and blueprints the entire system with all working components and how they will interact to complete the functionality.
A high level example of a system can be an e-commerce platform which involves multiple components in order to be well rounded and function properly. These components for this example would include: user interface, payment processing platform, product search, and inventory management. These components need to meet the functional requirement of the software which may be: search functionality, product catalog, payment processing, account management. The design of the system has to ensure that these parts can function together with high reliability, low latency, and being scalable for millions of users. A key example of this is Amazon which has around 300 million active users worldwide.
Importance of System Design:
1. Scalability:
The application should be able to properly handle user growth along with data growth of any expected speed at any given time. This would include aspects such as users signing up, data being processed, data being uploaded, data being displayed, all the while maintaining a smooth flow and low latency.
2. Reliability:
A system should be able to function properly even under intense duress such as high traffic or failures in parts of the hardware in the system. Important examples of such is payment processing, it is vital that there is no interruption in the transaction processing during important times. It is less harmful if the system has parts nonfunctioning in aspects such as searching or displaying data as compared to important aspects such as during transactions.
3. Performance:
The system has to be created to be efficient, both through performance and cost optimization. A system has to be optimized and not have any bottlenecks in any components and modules. This is particularly the case for systems such as video games, and notoriously for high frequency trading systems where low latency is a must, usually done with c++. Cost is another aspect that has to be considered, since things such as FPGAs can be used for these extremely low latency systems, however they cost much more.
Components of System Design:
Some components of system design includes-
1. Load Balancers:
The purpose of load balancing is to distribute traffic on the system across multiple servers to spread resource usage in order to prevent overloading of certain servers which creates bottlenecks and poor resource allocation.
Certain load balancers include: layer 4 in the network layer, layer 7 for HTTP or URL application layer, global load balancers for distributed systems, application load balancers for HTTP or HTTPs created for specific applications.
2. Databases:
The databases are optimized to store and retrieve data in an efficient manner. Different types of databases can be used for specific reasons. i) Relational databases using structured SQL statements with specific schemas created for the exact application (e.g. MySQL, PostgreSQL). ii) Non relational databases/NoSQL databases are non structured and more flexible (e.g. MongoDB)
Specific types of databases can be used for specific use cases. A common example can be a platform using SQL databases for user credentials, and NoSQL databases for comments or likes.
3. Caching:
Caching is for temporarily storing data that does not need to be permanently saved for multiple reasons. First it allows for reduced load on databases, which in turn improves performance. Second, cached data is able to be retrieved faster if it is stored in memory. This overall increases responsiveness and interactions for users in certain aspects that can be cached, instead of having all data in databases.
4. Content Delivery Network (CDN)
This is an important aspect for companies such as Netflix as discussed in a previous post. CDNs can be utilized to preload assets or content on servers in specific geographical locations in order to minimize latency and load times.
5. Application Program Interfaces (APIs)
APIs can be used to communicate between different components of a system. They are entry points for the system to access backend services.
i) Routing- request routing is done when an application needs information from different services, the API can serve as a unit to compile all the information into one request to be sent out.
ii) Load management- gateway can help to control traffic and requests, similar to load balancers above.
iii) Security and authentication- Handles security features such as authentication, uses mechanisms such as OAuth and API keys. Allows for rate limiting for single clients to prevent spam requests. Important for payment gateways to facilitate smooth and secure transactions.
https://www.geeksforgeeks.org/what-are-the-components-of-system-design/#
Comments
Post a Comment