Application Scalability
In this discussion, we can explore the concept of scalability in client-server architecture and delve into why scalability is crucial for application performance. Let’s begin!
To start with, when discussing concurrency in client and server architecture, it’s important to understand the connection between performance and scalability.
We can illustrate concurrency by considering multi-threading, either on a single host or across multiple hosts.
Single Host — Multi Threading Concurrency:
Let’s think about a web application that runs on just one server. There is a process in place to manage the distribution of this web application. In this process, many threads are used to handle each incoming request. So, these threads, all working on the same server, can deal with many requests at the same time. This allows the web server to do different tasks simultaneously for multiple requests, making a setup that supports doing things at the same time, which is called concurrency.
Multi Host — Multi Threading Concurrency:
Let’s consider that there are various processes running on a server. Requests from the client side are directed to the suitable web server by a load balancer (LB). Each web server is operated by diverse processes containing multiple threads. In this situation, the capability to handle identical and numerous requests simultaneously on more than one server is achieved. This implies that, thanks to multiple servers and threads on these servers, the system can manage several requests concurrently. Consequently, it possesses a structure that guarantees the concurrency of multiple servers.
Now that we have a basic understanding of concurrency, let’s delve into the examination of application performance. In essence, performance is about measuring how well a system can process incoming client requests (throughput) and the delay it encounters during these operations (latency). A high-performance system is one that can consistently operate with high throughput and low latency within fixed system capacities.
The relationship between concurrency and system capacity provides us with a prediction for high performance. This prediction is important for a high-performance system, as it involves low delays and high efficiency.
Concurrency refers to the ability to perform multiple tasks simultaneously in a system. Capacity specifies how much processing a system or component can handle within a certain time frame. High concurrency often requires high capacity. Capacity represents the physical and resource-related capabilities needed to process tasks either sequentially or concurrently.
Considering what we’ve discussed, we can define scalability in terms of the relationship between concurrency and capacity in a system, expressing how the system responds to increasing load or demands.
There are two main types of scalability: “Vertical Scalability” and “Horizontal Scalability.” Vertical Scalability occurs by increasing the capacity of a single server, while Horizontal Scalability happens by adding more servers or resources.
If we want to increase the throughput value, an increase in the number of servers will allow the system to handle more requests simultaneously, leading to an increase in concurrency. Therefore, Horizontal Scalability would be more suitable.
If we aim to reduce latency, we can achieve faster processing of requests by increasing the server’s capacity. Therefore, Vertical Scalability would be more appropriate.
However, there is a management cost associated with horizontal growth despite its advantages in terms of redundancy. On the other hand, vertical growth may result in a negative impact on redundancy, and there are limits to capacity.
In this article, I aimed to highlight the significance of horizontal and vertical scalability in scaling applications from the perspective of application performance.
I hope it has been helpful. See you in another story.
To follow me, visit LinkedIn.