Back to Blog

What is system design? - A guide to building better products

What is system design? - A guide to building better products

Navigating through traffic is the actual battleground where the reward is you reaching the office just five minutes…late! But the real winners are Bangaloreans, pun intended.

What if you have been asked to investigate this traffic congestion and inefficiencies issue? What is the solution?

Of course, before taking any action you’ll develop a plan mentioning all the issues at hand and break it down into small actionable tasks.

So, all the requirements are lined up and one problem at a time has been broken down based on the user requirements, when you are done sorting each issue to smaller tasks, you find a way to integrate them all because for this traffic management system to work efficiently, it is needed to communicate well with each other to serve a particular purpose.

The transformation of a problem statement into a technical solution is system design.

Here, we had a problem statement and we developed solutions from the ground up with technologies that seamlessly interact well with each other to fulfill a particular set of requirements of a certain set of users to build an effective system. This breakdown of the user requirements helps in addressing all the issues to build a cohesive system that is reliable, efficient, and scalable.

As we are clear on the basic understanding of system design with real-life analogies, let’s move on to understanding system design in software development terms.

What is system design?

In software development, system design means defining the architecture, components, modules, interfaces, and data to build a robust and effective system for a specific purpose. The team needs to be clear on the users' requirements to make systems that will meet the consumers' expectations. 

As mentioned architecture, components, modules, and data management are the key components that decide the scope of the system being built.

  • Architecture dictates the overall outlining and organisation of the system like a blueprint for you to assess how the final product will work and communicate with servers and databases.
  • Modules are functional units that work together and make components that interact with each other with the use of APIs.
  • A user interface facilitates seamless interaction between the user and the system which enhances user experience.
  • Data management looks after the storage, retrieval, and manipulation of the data in the system. It influences the performance and reliability of the overall system.

Why is system design important in software development?

  • Building a systematic design plan gives a sure chance of meeting the needs of the users such as performance, reliability, scalability, and maintainability. 
  • With careful planning of the system components, a lot of resources can be optimised.
  • For the software to function well, system designs help in building a communication center and integrating them.

As the system has been built from the ground up, it eliminates the chances of system failures, security breaches, and other issues to arise. Strategies are developed in the early stage itself to prevent such malfunctioning.

All these factors dialed in help in making a well-rounded system that serves a purpose. To prepare this system key components are made to use we can consider them as the building blocks of the system. This will help us understand the role each of these components plays in the system design.

Aspects of system design

Scaling

As the business grows, data grows and simultaneously, the demand has to be met by employing measures to manage the data effectively. This expansion of systems to process large amounts of data leads to scaling.

Real-life analogy: A restaurant has opened up in your neighborhood and serves quality meals. To accommodate the people, the owner needs space. Now, either he can increase the area of his restaurant, vertical scaling or he can go on to buy a new one, horizontal scaling.

Vertical scaling

Upgrading the hardware or software in the existing system is called vertical scaling.

With this kind of scaling, there’s a limit and you won't be able to upgrade anymore.

Also, just one system processing all the data is unreliable as its fault tolerance is zero.

The latency rate can be much higher because of one system existing and that too at one geographic location which might be far away from the client’s location.

Horizontal scaling

Adding more servers and distributing requests within them is called horizontal scaling similar to owning a new restaurant.

It creates a distributed system where a set of computers work together to achieve a common goal. When a request comes to a distributed system, any servers can respond to the request increasing the fault tolerance. It offers low latency that is the time taken from sending a request to receiving a response is much less.

Load balancers

Think of load balancers as virtual assistant who has a list of your workload and knows how to assign tasks. This assistant will perform these three tasks once the task is received -

  • Check if any of the system is online and available at the moment or not. In case any of the servers or the database are unavailable or faulty, it will remove them, or in case the demand increases, it will add more servers.
  • Once a server is available, the load balancer with the help of the IP address will assign the request to it.
  • Executing the logic of assigning servers for which different algorithms are used, round robin, least request and least response time.

In case, the load balancers don’t work, the workload might shift to a single server which can disturb the complete working or in some cases might fail. But our load balancer is smart in that way, it has a passive load balancer that has a complete backup.

Key value stores

It is a key-value database where data is stored as a set of unique identifiers with value. It is known as a key-value pair. The unique identifier is the “key” for an item of data, and a value is either the data being identified or the location of that data

Caching

It is based on the 'locality of the reference' principle. It stores the data that was recently searched or looked for by the client and this data can be asked for again.

The memory which stores the recently requested data is called cache memory, or cache. Cache memory is a type of high-speed random access memory (RAM) and hence it can access data super fast

For example, if a user sends a request the cache will check if this data is in the cache, if yes then it is a cache hit if not then the cache miss. In the event of a cache miss, the requests go to the main database. 

Storage

Data is at the crux of everything. We need established and secure storage units. There are various types of storage techniques depending on the needs in block storage data is broken down into blocks of the same sizes, in file storage data is stored into, files are stored in folders and folders into directories, etc.

API

This is specifically designed for managing and routing the user requests to the appropriate server or database in the system.

Security

To protect the system from any kind of data breach or failure an effective security system that is impervious to attack has to be put into place through continuous testing, authentication safeguards, and adherence to best programming practices.

Message queue

It routes the messages from the sender to their destination or the receiver. It helps modules communicate with each other in the backend while facilitating the primary tasks without any hindrance.

A good system design requires you to think about everything in an infrastructure, from the architecture down to the code structure, as explained below.

Types of system design

High level (conceptual) design

It is the initial phase of development in which the overall architecture of the system is designed and documented. The objective here is to prepare a report on the requirement specifics and how it is going to be implemented. Now, this will direct the team toward the goal. HLD is also called the system or macro-level design of a system.

To build high-quality products, we will be focusing on the 5 main objectives of HLD let's take an example of building an ecommerce website for a business.

Architectural overview

First, we’ll look after the essential elements of the website like the user interface, product catalog, shopping cart, payment gateway, and order processing system. It will define the intricate components, showcasing seamless interaction and collaboration.

Functional specifications

Once we have decided on the elements, we will outline the vital functionalities of each component, ensuring a seamless user experience.
Picture this: the user interface will empower users to effortlessly browse products and swiftly search for their desired items. Meanwhile, in the product catalog, a master will diligently organise and manage the product data and will keep a watchful eye on the inventory levels. The shopping cart will assist the users to add or remove items with a touch. Lastly, the payment gateway will handle all transactions, ensuring that each one is as safe as can be.

System interactions

The components need to function well and interact with each other to offer a well-rounded system that will be defined by HLD.
For instance, when a customer adds items to the shopping cart, the cart should communicate with the product catalog to update the inventory status.

Performance considerations

Architects would evaluate performance requirements, such as expected user load, response times, and the need for scalability to accommodate potential growth.

Technology stack selection

Selection of the technology stack is a necessary step for the development team to start working on the product that includes programming languages, frameworks, and databases, chosen based on factors like scalability, security, and development team expertise.

Low level (logical) design 

This is the second stage in which a much more detailed version of the HLD is documented. This document includes all the nitty-gritty details of the system at a technical level. LLD is also known as macro-level design. Now, the development team can move ahead and start working on modules to implement the low-level design. Let’s further understand it with the ecommerce website’s example.

Detailed component specifications

As with HLD components that have already been defined, the specifics needed to be outlined such as layout, color scheme, and interactions. For the product catalog, LLD would detail the database schema, the data retrieval algorithms, and how the inventory is managed.

Interface definitions

Here LLD will define the APIs and data formats for communication between the components.
For example, the shopping cart and product catalog modules will have well-defined interfaces for adding/removing items and updating inventory.

Resource allocation

To make the resource allocation efficient, the memory usage and database will be optimised.

Error handling and recovery

LLD will address issues such as failed payments or out-of-stock items, defining how the system should handle and recover from such errors.

Security considerations

The transactions and the customer’s personal information will be secured by ensuring the protection in the system.

Code structure

Developers will skillfully organise the codebase while adhering to design patterns and best practices. This is done to protect the principles of maintainability and modularity. 

What is the significance of high-level and low-level design in building scalable products?

Clear goals and communication

To have the right expectations the stakeholders need to have an outline of the system along with the technical details for the development team to work on.

Prediction of errors and handling them

When planning a roadmap to achieve the purpose of the system, every team member specialising in a particular area can share their input regarding the system, what hurdles they might face ahead of the road, and how they can overcome them. Once the errors are outlined, they can be eliminated.

Collaboration opportunities

This brings the team and the stakeholders on the same page and for everyone to have the right expectations from the system.

Fundamentals of system design

Micro services

Micro services loosely couple the services to structure an application hence, a large application will be divided into small collections of services that can be independently developed. Micro services help with building scalable applications as they are customisable.

Proxy servers

The purpose of the proxy server is to act as a route between a user and the internet. Other than forwarding the user's requests, they help in improving security and privacy, controlling the internet usage of employees and children, and caching data to speed up requests.

CAP theorem

This theorem explains that a distributed system can only provide two of the three properties of consistency, availability, and partition tolerance. The theorem formalises the tradeoff between consistency and availability when there’s a partition.

Redundancy and Replication

Redundancy means duplicating the vital components within a system to boost reliability and overall performance. It is a backup plan in case something unforeseen happens.
Replication is the sharing of information among redundant resources to ensure they're all on the same page.

System design process

The system design process is a development stage in software development or when building a robust system. Below are all the activities mentioned that play a critical role in the development of a system design that contains all the necessary functionalities and meets the user expectations.

Gathering requirements

Objective - To build a successful project, it is crucial to understand and record the needs and expectations of both users and stakeholders.
Activities

  • Engage in meaningful conversations with the individuals who have shown interest in the project.
  • Gather any relevant materials that already exist, such as reports, surveys, or previous project documentation.
  • Clearly outline the specific functionalities and features that the end-users and stakeholders expect from the project.
  • Additionally, identify any non-functional requirements, such as performance or security criteria, that need to be met. Prioritize requirements based on business goals and constraints.

System analysis

Objective - To break down the individual components of the system and understand how each component interacts with other components.
Activities

  • Firstly, we need to break down those high-level requirements into more detailed sub-requirements. This will give a clear picture to the development team.
  • Next, we should identify the various data entities involved and define their relationships.
  • Now, we will look after the system's behavior and interactions to help us understand how everything will work together.
  • To ensure our project's feasibility and minimise risks, we should conduct thorough feasibility studies and risk analyses.
  • Lastly, it's important to produce comprehensive documentation. This includes creating use cases, data flow diagrams, and process models. These documents will serve as valuable references throughout the project's lifecycle.

System architecture

Objective - To define all the components and overall structure of the system.
Activities

  • Identify the major system modules and how they interact with each other.
  • Choose the most suitable architectural styles, such as client-server or microservices.
  • Define the mechanisms for storing and retrieving data. Also, take into account aspects like scalability, performance, and security.

Detailed system design

Objective - To create complete specifications for every component identified in the system architecture.
Activities

  • To accomplish our objectives, it is critical to specify the data structures and algorithms that will be utilised.
  • We must devote attention to designing a user interface that not only meets the functional requirements but also provides an exceptional user experience.
  • To facilitate seamless integration with other systems, it is crucial to define the input and output formats precisely.
  • To provide a comprehensive understanding of the system's components, it is essential to create detailed module specifications.
  • We must consider potential errors and devise appropriate strategies for handling and recovering from them.
  • We must prioritise the security of our system by addressing potential vulnerabilities at a granular level. 

System design strategies

In software engineering, a system design strategy involves using methods to meet the software requirements. A solid system design strategy recognises these requirements as challenges and offers the best possible solutions.
There are three main strategies for system design. Now, let's delve into these three system design strategies.

Top-Down Design

The top-down design strategy involves dividing a system into subsystems and components, starting with conceptualising the whole system and then breaking it down. The subsystems are considered separate entities, and the components are organised in a hierarchical structure.

Bottom-Up Design

This system design strategy is more efficient when it comes to the construction of larger components and subsystems as it focuses on designing the smallest components and subsystems. This approach reduces time wasted on troubleshooting and allows for reusability of generic solutions. However, it may not be suitable for constructing high-quality solutions and can lead to the use of unnecessary functions due to its high level of abstraction

Hybrid Design

Hybrid design strategies combine the high-quality aspects of top-down design with the reusability and well-organised structures of bottom-up design. They are the most effective strategy for most systems.

Tools and techniques for system design

Data flow diagrams

The flow between processes, entities, data stores, and transformations is shown with the help of Data flow diagrams (DFDs). DFDs can be used for understanding system workings, identifying issues, and visualising connections. In system development, DFDs are particularly valuable for analysing and designing. They provide a clear view of data processing and support informed decision-making.

Architecture Diagrams

Architecture diagrams are important when designing a system to showcase the organisation and structure of the entire system. These diagrams will help in communicating with the various stakeholders, those who construct it, and the rest of the team. By providing a clear and concise overview, they facilitate understanding and collaboration among team members.

Data Dictionaries

A data dictionary is like a book that tells you all about the different pieces of information in a computer system. It explains the meaning, relation, and usage of each piece of information. With this document, the team members are on. the same page in regards to the use of information. In the data dictionary, you can find things like the names of the different pieces of information, what type of information they are, how long they can be, and what their default values are.

Decision Trees

With decision trees, you can provide a clear explanation to the team and the stakeholders regarding the decision-making and how you came to the decision that was made. For example, we have several different choices and we have to figure out all the possible outcomes based on certain conditions, decision trees will come in handy in selecting the best option.

Decision Tables

Decision tables show how decisions work. They tell you the conditions, what to do, and what happens as a result. In simple words, these tables make sense of the complicated decision ruled by organising them in order to not miss any condition. You can use decision tables when you're designing a system to set up the business rules, make sure requirements are met, and document how decisions will be made. It's helpful for putting everything in order before putting it into action.

Pseudo code

Pseudo code is basically a simpler way to explain programming code using regular words and programming bits. It's like a rough draft of the algorithm or logic for a part of a system, without worrying about the exact programming language. People commonly use pseudo code when designing a system to share general ideas and have meaningful conversations with teammates.

Unified Modelling Language (UML)

Unified Modelling Language helps with modeling and documenting software systems. It's like a visual language that has all the graphics to show different parts of the system design, like how it's set up, how it acts, and how everything interacts. Class diagrams, sequence diagrams, and use case diagrams are just a few examples. Basically, UML makes sure everyone on the team is on the same page and understands the system design. It helps to communicate better among the team and the stakeholders.

APIs and Contracts

APIs and contracts are important when it comes to designing systems. They basically lay out how different parts of the software should talk and work with each other. They act as the middleman, making sure everything runs smoothly and reliably. APIs are like a set of rules and tools that instruct the software components how to interact. They give developers a standardised way to access the features of a module or system, without getting into the nitty-gritty of how it actually works behind the scenes. These APIs can be used to connect within a single application, between different apps, or even across different platforms and devices. Contracts, on the other hand, are formal and precise guidelines for software components, including those APIs. They define what these components should do and what they need from others. Contracts play a huge role in keeping everything consistent and making sure developers are on the same page. This collaboration leads to more sturdy and reliable systems.

The only way to test all these tools and techniques along with whatever we learned above is by putting them to work in the real world. Now, let's check out a case study where these methods worked and made a huge difference in a complex system project. By diving into real-life examples, we can connect the dots of actual problem-solving, and see how these tools boost teams to conquer obstacles and bring out solutions.

Case studies

Amazon web services

Background

AWS offers a whole bunch of services like computing power, storage, and databases that can be used to scale their businesses. With AWS, companies can think outside the box, grow big, and make their operations run like a well-oiled machine. 

System design selection

Modularity and Scalability

AWS is set up with a modular architecture. It means that users get to handpick which services they want to use, giving them the option of flexibility and the ability to scale up as much as they need.

Global Data Centers

AWS has data centers all over the world, so wherever you are, you'll get high-quality performance and reliability. There's no lag and the overall experience is just way better.

Result
  • AWS's modular design lets businesses scale their infrastructure up or down as needed. That's why AWS is very common among startups and big companies.
  • With AWS's data centers all around the world, you can count on their services being available and reliable, no matter where you're located.
  • AWS offers a bunch of different services to meet all sorts of needs.

Tesla Electric Vehicles

Background

Tesla electric cars are famous for their performance, range, and advanced technology features.

System design selection

Over-the-Air (OTA) Updates

Tesla lets you update your car's software remotely, without even having to go to a service center. It's convenient for improving performance, safety features, and the overall user experience.

Battery Technology Integration

The battery technology in Tesla is seamlessly integrated with the software, so it's efficient and maximises the range of the vehicle.

Autonomous Driving Capabilities

Teslas are equipped with hardware that supports autonomous driving features.

Result
  • Being able to operate the system remotely has made Tesla customers happy and built a loyal customer base because it means their cars keep getting better even after they buy them.
  • The feature of combining battery technology with software has increased the longevity of the Tesla cars and saves on fuel as well.

The above-mentioned case studies show how system design played a crucial role in the success of both products. The products were accessible worldwide and could be improved through software updates.
To build such an advanced product you need a team that thinks out of the box and luckily we specialize here, we’ll hear out your ideas and will help you turn them into innovations.

Grorapid labs
Contact us

Let’s build together

Get a detailed breakdown with cost & time estimations for any of your idea or project in 4 hours

Your message has been submitted.
We will get back to you within 24-48 hours.
Feel free to reachout on hello@grorapid.com or +918287977394 for quick turnaround.
Oops! Something went wrong.

Ready to start working together with us?

Contact Us | Grorapid Labs

Send us a message!

We build user - centric software products that helps businesses grow at massive scale. Let's build together!

Contact us
Grorapid Labs Packages

Browser our store

Check out our carefully curated packages to build a high-quality product and get unparalleled support. Click on the button and find your match.

Explore our store
Request a call back