Scaling Your Web Application

Architecture Design For Large-Scale Systems

Harith Javed Bakhrani
8 min readMar 26, 2020

--

Today, the internet is full of resources that teach you how to code, and how to create web applications, but it lacks resources on how to make your web app scalable so that it can accommodate thousands of users without having performance issues and making it fault-tolerant. In this article, I would briefly go through some terms and technologies to give you a glimpse of how you can better design architecture for large-scale systems.

Hosting Web App Without Considering Scalability

Before we begin to expound on how we can make our web app scalable and fault-tolerant, we would look at a typical architecture.

In the above diagram, we can see a very simple web architecture; we have only one server that listens for client requests and communicates with the database. That’s really it, nothing complex to it.

Considering Scalability

Now that we have already looked at how we would host our web app on a simple architecture, we would begin exploring different kinds of issues that we would run into with this kind of architecture and how we would tackle them.

Issue #1: Web Server Overload

As we get more and more concurrent clients connecting to our web server, our web server would eventually run out of resources (like CPU and RAM) and “die”. In this case, we need to increase our web server resources to accommodate more and more clients.

One way to achieve this is via vertically scaling our server. Let us have an in-depth look at what this means;

Vertical Scaling

To vertically scale means to add resources to our existing server or to replace it with another powerful server.

Basically, the architecture remains the same, it’s just that the server has been upgraded to accommodate more clients than before. This would solve our issue temporarily, but it’s not a permanent fix. As more and more people begin to use our web app, the added resources would eventually run out and we would need to keep on vertically scaling our server. We have a better fix for this, which also eliminates a second concern of having a single point of failure.

Issue #2: Single Point Of Failure + Issue #1

--

--

Harith Javed Bakhrani

Muslim DevOps Engineer ready to learn and bring to life new and better ways of automating deployments and keeping them alive!