![]() |
VOOZH | about |
High-level design or HLD is an initial step in the development of applications where the overall structure of a system is planned. Mainly focuses on how different components of the system work together without getting to know about internal coding and implementation.
The common request flow most applications follow from user to data and back.
Understanding the components of high-level design is very important for creating effective systems that meet user needs and technical requirements. Below are the main components of high-level design:
The HLD document consists of data flows, flowcharts, and data structures to help developers understand and implement how the current system is being designed intentionally to function.
HLD provides a structured technical view by translating functional requirements into an overall system design model, helping visualize how components interact and how data flows.
High-level design, or HLD, is a general system design where we do tradeoffs between different frameworks, components, and different databases, and we choose the best considering what the business needs and how the system should work.
Whereas LLD (low-level design) translates the HLD into smaller and more specific details, it includes class diagrams, methods, data structures, and algorithms, focusing on how each part will be implemented.
Further Read: Differences between High-Level Design (HLD) and Low-Level Design (LLD)
After having an adequate understanding of HLD and how it is different from LLD. Let us now discuss the HLD roadmap, which is shown below as an infographic:
Now, in order to design any high-level system, certain terms are listed in a sequential manner so as to connect the dots in order to understand. Roadmaps are very important for working professionals because these help us to get a complete, binding understanding of how services in real-time are getting scaled at a high level.
Capacity estimation in system design involves predicting the resources (such as processing power, memory, and bandwidth) required to meet the expected workload. It ensures that a system can handle current and future demands efficiently, helping in the proper allocation of resources and preventing performance bottlenecks.
Example: Twitter, which is recently in newsfeeds these days, here at high-level designing, we need to make sure tweets of popular influencers are reaching out to millions of people, so how do we need to scale our system so service should not be hampered?
We have also shown below the characteristic behavior of a server, which is measured across throughput and latency within the system.
HTTP (HyperText Transfer Protocol) is used to transfer the data over the web, which enables the communication between clients and servers that helps users to request resources like HTML pages, messages, videos, or images, while HTTPS (HyperText Transfer Protocol Secure) is an extension of HTTP that adds an extra layer of security through SSL/TLS encryption. Methods of HTTP include GET, PUT, and POST.
Tip: These are also important as per interview perspective as constraint bounds in interviews in API over when to use what is very important.
Tip: There are many ways to send data from server to client some are:
- Using Websockets
- Using Polling
There are two ways to send data from server to clients, which are websockets and polling. In a client-server architecture, we are sending a request to the server, and the server sends it back, and so in this way communication takes place. But in designing the system, the biggest problem we face is whether we can implement the client-server model or peer-to-peer model.
Another way of sending and receiving data from a server, just like we do with the above case of web sockets, is polling. There are mainly 2 types of polling:
Tip: Long polling is preferredover short polling because lesser number of requests are sent in a system.
It is purposely built as one-way communication from servers to clients in specific design systems. SSE is a technology that helps to push real-time updates from the server to the clients over HTTP connections. SSE enables the server to send data automatically as it becomes available.
Examples of SSE include real-time streaming.
A rate limiter restricts the number of events that can be done in a timeframe by restricting the number of requests a sender can send in a given period of time. Here, once the threshold limit is reached, it now further blocks the incoming requests, as can be seen below in the media as follows:
No matter how great a system we design, there is always a chance of faults and failure, which could be because of hardware issues or software issues (such as running low on memory), or there can be some human error. In such cases we need to provide resiliency through replication, redundancy, and availability.
Note: System design interviews start with open-ended designing of a specific system, which later is bounded with constraints at multiple levels. In order to clear dealing with these bounds, in layman's language, it is known as resiliency via implementing common tradeoffs in the system. Hence, providing resiliency is very crucial in designing complex system designs and also in clearing interviews.
Paging in high-level design (HLD) refers to the method of dividing large datasets or content into smaller, manageable pages. This approach improves user experience by allowing users to load data incrementally, reducing initial load times and enhancing performance.
A log file records events in an application, including details like transactions, service actions, and system flow. Logging is essential for monitoring behavior, tracking system health and performance, and debugging issues in distributed systems.