Operations 34 min read

How to Build Highly Scalable Applications: From Vertical to Horizontal Scaling

This article explains why scalability is a crucial non‑functional requirement, describes vertical (scale‑up) and horizontal (scale‑out) approaches, introduces the AKF model’s X/Y/Z axes, and provides practical guidance for scaling services, databases, caching, and deployment to achieve robust, high‑throughput applications.

ITPUB
ITPUB
ITPUB
How to Build Highly Scalable Applications: From Vertical to Horizontal Scaling

Why Scalability Matters

When an application attracts many users, it can suffer from slow response times, frequent outages, and an inability to meet market demand, leading to lost business opportunities. These problems stem from non‑functional requirements such as high availability, scalability, maintainability, and testability.

What Is Scalability?

Scalability is the ability of an application to increase its processing capacity easily as load grows. If adding more memory or an extra service instance improves performance without rewriting the whole system, the application is considered highly scalable.

Vertical vs. Horizontal Scaling

Two main ways to increase capacity are:

Vertical scaling (Scale‑Up) : Enhance a single instance’s resources, e.g., adding RAM to a database server. This reduces disk I/O by keeping hot data in memory.

Horizontal scaling (Scale‑Out) : Deploy multiple service instances behind a load balancer to share the load.

Vertical scaling can be limited by hardware cost and diminishing returns, as illustrated by the performance‑cost curve.

Horizontal scaling becomes necessary when a single instance reaches its performance ceiling.

AKF Expansion Model

The AKF model defines three axes for horizontal scaling:

X‑axis : Adding more identical service instances (classic scale‑out).

Y‑axis : Splitting functionality into micro‑services based on business logic or data type.

Z‑axis : Partitioning requests by user characteristics, often using DNS‑based load balancing.

Scaling Services

Service scaling involves both vertical and horizontal techniques. For vertical improvements, use multi‑threaded algorithms to utilize all CPU cores. For horizontal scaling, deploy additional instances and use load balancers to distribute traffic.

Non‑blocking I/O can dramatically increase throughput under high load. In Tomcat, enabling NIO reduces thread count while handling thousands of concurrent requests.

<Connector connectionTimeout="20000" maxThreads="1000" port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol" redirectPort="8443"/>

Database Scalability

Database scaling is more complex due to the CAP theorem (Consistency, Availability, Partition tolerance). Relational databases typically prioritize consistency and availability, making horizontal scaling challenging.

Vertical scaling for databases starts with adding memory and optimizing indexes (clustered vs. non‑clustered). Proper fill factor settings reduce page splits and improve write performance.

When vertical limits are reached, horizontal techniques such as replication and partitioning (sharding) are used.

Replication (X‑axis) : Master‑Slave or multi‑Master setups copy data across instances, distributing read load.

Partition (Y/Z‑axis) : Split tables or rows across multiple instances based on data type or user attributes.

Additional Techniques

Server‑side caching reduces load on services and databases, while CDNs offload static content delivery. Both improve perceived performance and lower backend pressure.

Conclusion

Achieving high scalability requires a balanced mix of vertical upgrades, horizontal expansion across the AKF axes, careful database design, and supporting technologies such as non‑blocking I/O, caching, and CDNs. The right combination depends on the specific workload, growth rate, and budget constraints.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

ScalabilityDatabase Replicationhorizontal scalingVertical ScalingAKF model
ITPUB
Written by

ITPUB

Official ITPUB account sharing technical insights, community news, and exciting events.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.