This is how you approach System Design
But aside from the interviews, System Design is a skill one should excel at to become a better engineer.
In this article, I discuss how one can approach System Design.
Understand the problem statement
Collect information about the problem which needs a solution. The following points can be considered while defining the problem:
- Understand the requirements, such as the features, scale of the solution etc.
- Think from the users’ perspective and try to understand their needs.
- Finally, define any constraints or limitations of the system.
For example: There may be compliance requirements based on demographics or the industry for which the solution is being designed.
Identify the scope of the system
Two things need to be defined to identify the scope of the system, what the system will do and what it won’t.
An example of this is: An e-commerce application needs to be built but the payments are to be handled by a third party. The system would be responsible for integrating the third-party payment service, but nothing will be of concern from developing, hosting or managing that service.
Look for existing references
Look at similar systems that have been built in the past and identify what worked well and what didn’t. Use this information to make your design decisions.
Create a high-level design
Outline the main components of the system and how they will interact with each other. This can include a raw diagram of the system’s architecture, or a flowchart outlining the process the system will follow.
Refine the design
Iterations and refinements will always be needed. One should not approach the system design process as a one-off scenario. During the initial design phase, iterate over the design until all requirements are met and there are no loose components.
Once the initial phase is over, further refinements may be needed with growth in the application.
Document the design
Proper documentation is necessary as part of the design process. The following few points can be considered during documentation.
- Document how the data flows between components. This can be in line with the user journeys.
- Document the connectivity between components. Make a note of what all traffic is allowed between components.
- Define the coupling between components.
- Document how error handling is performed. Also, document possible implications and mitigation steps in case a component goes down.
Continuously monitor and improve the system
The system design is not a one-time process, it needs to be continuously monitored and improved to meet the changing requirements.
Robust monitoring and logging are needed for the critical systems. This can include, system resource usage such as CPU, Memory, Disc space etc. Further, metrics in terms of latency, error rate, and response code analysis may also be required.
Consider the cost
One may be tempted to use multiple tools and resources for the points mentioned above and may successfully design robust and functional systems, but it may not be able to justify the cost.
Cost is a big factor for companies and one must be able to efficiently design systems with the minimum resources available at their disposal.
If content like this interests you, consider following me on Medium or hit me up on Twitter(X) here.