Basics of System Designs - Scalability

Kawaldeep Singh
3 min readJul 14, 2021

There are some basic things that we need to understand before designing any new system.

So, what do you mean by System Designs? And what are the factors that we need to keep in our mind while doing it?

Systems design is the process of defining the architecture, product design, modules, interfaces, and data for a system to satisfy specified requirements. It is a technique by which the required amounts of scalability, reliability, performance and consistency are satisfied in real world systems.

So in this we will talk about one of the key of System Designs i.e, Scaling.

In the above picture, we have one Browser from which client is requesting for some data from Web Server and according to the required request, Web Server is performing some Database Queries in order to fetch the required data from Database Server. After that, Web Server is sending the required Data to the Client in the form of response.

Now, in order to run this Web Server, we need some computers. So, there are two ways to do this.

  • Firstly, run this Web Server in your local machine.
  • Secondly, using Cloud. In Short, Cloud is set of computers that somebody provides you in exchange of money(For example — AWS, etc). They basically provides you some computers that where placed somewhere in this world and which will run continuously so that your service will never stop. You can access those computers using remote login id and password.

Now, some of you will think, what is the use of it? Why do we need to purchase a costly environment for running our algorithms?

I will explain you the reason behind this. So, we are using it because -

  • First of all, most of us don’t have a very highly configured machines so that we can keep them powered-on for 24/7.
  • Let suppose, our business requirement is increased. Because of which we see very large number of traffic in our product. So, in order to handle that, we will need Scalability(Defining below). And for implementing scalability, we will have to use Cloud Services.

Now, come to the main section of this blog, how to do Scalability?

The ability to handle more requests by buying bigger machines or buying more machines, is called Scalability. There are two types of Scalability i.e, Vertical and Horizontal.

  • Buying Bigger Machines - When you buy bigger machines, that means that your computers will be larger and process the request faster, so that is called Vertical Scaling.
  • Buying More Machines -When you buy more machines, then the request can fall on any one of the machines and it will be processed accordingly. Assigning request to any machine is random in nature. That is called Horizontal Scaling.

So, these are two options by which you can increase the scalability of your system.

Pros of Vertical Scaling

  • No need of Load Balancing.
  • Communication is fast in the case of Vertical Scaling as we are using Inter Process Communication.
  • Data Consistent.

Cons of Vertical Scaling

  • As we have only one machine, and if it will fail, then it will not redirect the requests to the another one. So, we have only single point of failure.
  • Hardware Limitation is there, as we cannot just make the computer bigger and bigger, and solve the problem.

Pros of Horizontal Scaling

  • It is Resilient in nature. If one machine will fail then it will redirect its requests to another machines.
  • No Hardware Limit. It scales well as Users Increases.

Cons of Horizontal Scaling

  • Load Balancing is needed.
  • Communication is slow. Because we are using Network Calls (Remote Procedure Calls).
  • As we have multiple systems, then we have some sort of lose transaction guarantee issues. Data inconsistency is there.

Now, you will be thinking that which scaling should we have to choose?

According to me, it all depends upon your product requirement. Either you can use Horizontal Scaling or Vertical Scaling or you can make use a mix of both. Like using horizontal scaling of bigger computers.

Thanks for reading.

--

--