Breaking Down System Design: The Four Core Modules

Introduction

Now that we know that the bigger a System becomes, the more Distributed it gets, developers and architects alike must embrace the fun part - the principles of system design, ensuring both scalability and optimal performance in our rapidly evolving digital landscape

The word system design has become more popular in recent years, but it is important to remember that it is a complex and nuanced field. There is no one-size-fits-all approach to system design, and the best approach will vary depending on the specific requirements of the system.

System Design: The blueprinting process of defining architecture, components, and interactions to meet specific requirements, serving as a guide for system construction and behaviour.

System Design Modules

It’s essential to grasp the components that form a system to make more informed decisions in system design. We’ll deconstruct system design into four primary modules and delve into each one. An understanding of these modules, this will enable you to tackle any system design challenge effectively.

The fundamentals of distributed system design

There are some fundamental concepts that any distributed system consists of, such as Network Protocols, Client-Server Models, Storage, Security, etc. These are the building blocks of any complex distributed system that will be present in one form or another.

Any modern system will have a Server which runs on a remote computer or in a cloud computing platform and a Client, which is the user’s computer or mobile device. The client will send a request to the server, and the server will respond. The client and server communicate using a network protocol such as TCP/IP or a secure internet protocol such as HTTPS.

By knowing the basics of these fundamental concepts, you will understand how a system works and how to design a system. For example, if you want to create a system that can handle a lot of traffic, you need to understand how the network works and how to scale your system. To design a system that can store a lot of data, you must understand how storage works and how to scale your system. If you’re going to create a system that can handle a lot of users, you need to understand how security works and how to scale your system.

Key characteristics of distributed system design

Every system you build will have critical characteristics such as Scalability, Consistency, Availability, Throughput, Latency, Reliability, Redundancy, Resilience, etc. These are the terms you will be hearing a lot when you are designing a system. You must understand what they mean and how to trade off between them. You can only guarantee some of them at the same time.

For example, you want to increase the availability of your system. In that case, you need to increase the redundancy of your system and maybe give up on consistency or vice-versa. These are the tradeoffs you need to make. Characteristics sometimes conflict, and you must decide which is more important for your system. This is where gathering all the requirements is essential when approaching a system design problem.

By understanding the characteristics of a system, what each of them means and how they affect the system overall, you can make tradeoffs and justify your choices.

Techniques of distributed system design

Up next, we’ve got some nifty tricks you can use when piecing together your system. Think of options like Load Balancing, Caching, Data Partitioning, Databases, Proxies, Rate Limiting, Queue, Leader Election, and so on. This is where things get a bit wild and a whole lot of fun.

Once you’ve defined your system’s primary functions, selecting the right techniques and tools becomes crucial. Say you want to crank up how fast your system responds. You could use some caching to cache the most common requests so you’re not constantly bugging the database. It speeds things up but might mix up your data consistency. Choices, choices!

By dialling in the right combo of these tricks, you ensure your system works like a champ. Choosing the right techniques and tools can significantly enhance the efficiency and robustness of your system.

Technologies

The final block of system design is the actual technologies you can use to build your system, such as MySQL, Redis, Kafka, AWS, Kubernetes, etc. These are the tools that you can leverage actually to build your system. These are the direct dependencies of your system.

For example, suppose you want to use a database to store your data. You can choose between SQL and NoSQL databases such as MySQL, Postgres or MongoDB and Cassandra, etc. You need to understand the pros and cons of these technologies and choose the one that best fits your system.

Once the system is implemented, you need to operate and maintain the system. This involves monitoring the system, troubleshooting problems, and upgrading the system using technologies like Grafana, Prometheus, ELK, etc.

After all the steps, you need to choose the right technologies to build your systems. You need to understand the pros and cons of each technology and choose the one that best fits your design.

System design process

Now that we have broken down the system design into four main modules, we can approach any system design problem using this framework.

  • Gather requirements: This is the most crucial step in the system design process. You need to understand the system’s requirements in detail to design a system that meets those requirements. It would help if you asked questions to understand the system’s use cases, the expected traffic, the peak traffic, the read/write ratio, the latency requirements, the consistency requirements, etc.
  • Design the architecture: Once you understand the requirements, you can start designing the system’s architecture. This involves creating the components of the system, the interactions between the components, and the overall architecture of the system. It would help to consider scalability, availability, consistency, latency, and security factors when designing the system’s architecture.
  • Choose the technologies: Once you have designed the architecture, you must choose the technologies you will use to implement the system. It would help if you considered the factors such as the cost of the technologies and your team’s expertise when choosing them.
  • Implement the system: Once you have chosen the technologies, you can implement the plan. This involves coding the components of the system, deploying the system, and testing the system.
  • Operate and maintain the system: Once the system is implemented, you need to operate and maintain the system. This involves monitoring the system, troubleshooting problems, and upgrading the system.

Summary

System design isn’t just a buzzword or a mere interview challenge — it’s a dynamic skill that’s pivotal in today’s technology-driven world. As we navigate the vast realm of distributed systems , it becomes evident that Design is as much about understanding fundamental components as it is about making informed choices on technologies and techniques.

Balancing the key characteristics while accommodating real-world constraints makes the task both an art and a science. With the framework of the four primary categories—fundamentals, characteristics, techniques, and technologies—we can approach system design methodically, laying the foundation for robust and efficient systems. Let’s dig into each part as we get better and more badass in this area.