The ABCs of System Design: A Beginner's Guide
Have you ever wondered how complex systems are built in companies like Google, Netflix or Amazon?
The answer is good system design.
System design is both the art and science of creating scalable, reliable and efficient systems that can handle large volumes of users and data.
However, designing a complex system is not easy and requires much knowledge and experience.
In this article, I would like to introduce you to the field of system design and its basic concepts.
Today we will answer the following questions:
- What is system design and why is it important?
- How to become better at system design?
- What are the characteristics of system design?
- What are the steps required in system design?
Without further ado, let's begin.
PS. This is the first in a series of articles about system design. If you are interested feel free to check out the other articles in the series.
What is System Design?
System design is the process of creating a system that meets the specific needs of a business or organization. This involves defining the system's architecture, interfaces, and data while ensuring that it performs well and is reliable.
Once you have your requirements, you can begin the system design process. The design activity may vary depending upon the route you go to:
- Custom Development – You do everything in-house that is tailored to your specific needs. You may get exactly what you want but the cost here is time and money.
- Out of the Box Solutions – General solutions that you can pay for. If your business requirements are straightforward, this route may be suitable. Yet, it's important to note that out-of-the-box solutions may not be able to meet specific business needs. Customizing such solutions to meet specific requirements can be challenging.
In the real world, we most likely will use a combination of the two. For example, you can build your app from scratch, and then host it on AWS. Or, you could start with a general no-code or low-code solution and customize it to suit your specific needs.
How do we become better at system design?
Now that we know what is system design, we can move on to strategies that will us become better at designing systems.
This is a very opinionated point as people learn in all different ways but my preferred method is to separate the learning into 3 phases.
Phase 1: Learn the fundamentals
Before jumping headfirst, you need to make sure you have a solid grasp of design patterns for both architecture and code. If you are gonna work mostly with distributed systems then it would be very beneficial for you to learn their design patterns for code, data flow, architecture and so on.
Phase 2: Learn from real-world examples
The next step would be to do some research, it can be using any kind of content, may it be books, articles, videos, etc... The most important thing is that your trying to figure out how the hell does everything run in companies. Great places to start would be from blogs of tech companies.
Phase 3: Practice, practice, practice
The best way to get good at system design is to practice. Try building your systems and ask some colleague to critique it, or better yet build it yourself and see how it performs. This will help you develop your skills and gain experience.
Characteristics of System Design
Before we get into the steps of system design, let's cover the most common characteristics that are associated with good system design.
Modularity: System design should be modular, which means that the components of the system should be designed to work independently of each other. This makes it easier to maintain, update, and test the system.
- Scalability – The system design should be scalable, which means that it should be able to handle an increasing amount of data or users without a significant loss of performance.
- Robustness – The system should be robust, which means that it should be able to handle unexpected or unusual inputs or conditions without failing.
- Flexibility – The system design should be flexible, which means that it should be able to adapt to changing requirements or needs without requiring significant changes to the system.
- Maintainability – The system should be designed to be easy to maintain, which means that it should be well-documented, have clean and readable code, and be easily testable.
- Performance – The system should be designed to perform well, which means that it should be able to handle the required workload within acceptable response times.
- Security – The system should be designed to be secure, which means that it should be able to prevent unauthorized access, data breaches, and other security threats.
- Usability – The system should be designed to be user-friendly, which means that it should be easy to use and understand for its intended users.
Note that in most cases not all of these characteristics are important. So please keep your specific use case in mind.
System Design Steps
System design is a complex process that may differ from system to system but it can be broken down into some core common steps.
- Gathering Requirements – This step involves understanding the requirements of the system by gathering information from stakeholders, users, and other sources. This may involve creating use cases, user stories, and other documentation to capture the requirements.
- Analysis of Requirements – In this step, the requirements gathered in the previous step are analyzed to identify any conflicts, gaps, or ambiguities. The analysis may involve creating data flow diagrams, process flowcharts, and other visual representations of the system.
- Designing the Data Flow – In this step, the data flow of the system is designed. This may involve creating data models, database schemas, and other components of the system that are necessary to manage data.
- High-Level Component Design – The high-level architecture and components of the system are designed in this step. This may involve creating system diagrams, flowcharts, and other visual representations of the system.
- Detailed Design – Once the high-level components have been designed, the next step is to create a detailed design of each component. This may involve creating detailed specifications, interface definitions, and other technical documentation.
- Identify and Resolve Bottlenecks – In this step, potential bottlenecks in the system are identified and resolved. This may involve optimizing performance, improving scalability, and addressing any other issues that could affect the system's ability to meet its requirements.
There are additional steps for prototyping, testing and deployments but we will leave that for the next article.
Final Thoughts and Recommendations
Phew and that's it. I know it wasn't as comprehensive as you wanted it to be but I saved that for the next articles where we will talk about:
- An in-depth look at the steps in system design.
- How to design a sample live-stream app using the system design method.
In the meantime, if you want to learn more about system design I recommend the following resources.
Thanks for reading.