Back to blog

Application scaling

Application Scaling: Fix the Bottleneck Before Adding More Servers

Learn when to scale an application, how vertical and horizontal scaling differ, and why the real bottleneck should be measured before adding infrastructure.

Application scaling is the work of keeping software responsive as more people, requests and data move through it. The tempting response to a slow application is to buy a larger server or redraw the architecture. Sometimes that is exactly right. Often it simply gives an inefficient process more room to be inefficient.

01

Slow at 9am is a symptom, not a diagnosis

Imagine an installer portal used by office staff, field teams and customers. At 9am, people upload evidence, open dashboards and generate documents at roughly the same time. Pages that felt instant when the system launched now take several seconds. Occasionally, a document request fails altogether.

The business has grown, so the proposed answers arrive quickly. Give the server more memory. Add another server. Move everything into microservices. Put it on a platform that scales automatically.

All four might be technically possible. None identifies the limit.

IBM describes application scaling as adjusting software resources to handle changes in workload. It separates vertical scaling, where one machine gains more capacity, from horizontal scaling, where more machines share the work. That distinction is useful, but it comes after diagnosis.

In the installer portal, the web server may be healthy while one dashboard query exhausts the database connection pool. Document generation may be competing with interactive requests. A third party service may be answering slowly. Adding web servers will not repair any of those problems.

02

What useful scaling should achieve

Scaling is not a competition to create the most impressive infrastructure diagram. It should protect an agreed level of service as demand changes.

That means defining what acceptable looks like. Which user journeys matter most? How quickly should a case open? How many documents must the system process during the morning peak? How long can a background report wait? What happens when a dependency is unavailable?

A useful baseline includes response time for important user actions, completed requests or jobs, errors, CPU and memory, database query time and connections, queue depth and the time spent waiting for external services.

Average response time alone can be flattering. If most requests are quick but a meaningful group of users waits ten seconds, the average hides the operational problem. Percentile measurements, such as the time within which 95 per cent of requests complete, give a more honest view of the slower experiences.

The aim is not to collect every metric available. It is to connect a poor user experience to the resource or dependency that is under pressure.

03

Remove avoidable work before buying capacity

Once the slow path is visible, the cheapest scaling improvement may be to make the application do less work.

For the installer portal, the dashboard might load totals by repeatedly scanning a large activity table. A better query and the right database index could remove most of that work. Values that change once every few minutes might be cached rather than recalculated for every page view. Images could be resized before delivery. A content delivery network could serve static files closer to users.

Some work should not block a person at all. Document generation, bulk emails, data imports and slower integrations can often move into background jobs. The user receives a clear status while workers process those jobs separately. The interactive application stays available, and the worker capacity can be adjusted without scaling everything else.

This is why performance work belongs before infrastructure spending. More capacity can hide a poor query for a while. It does not remove the query, and the bill continues to grow with the workload.

04

Vertical scaling is often a sensible first move

Vertical scaling means giving one server more CPU, memory or storage. It is sometimes dismissed as unsophisticated, but that is a poor reason to avoid it.

For a stable internal application with predictable demand, moving from a small database server to a larger one can be the safest and most economical answer. The application may need no architectural change. Monitoring and recovery arrangements remain understandable. The team avoids introducing a distributed system merely to prove that it can.

Vertical scaling has limits. A machine can only become so large, an upgrade may require a restart, and one instance can remain a single point of failure. It can also become expensive at the upper end. Those constraints matter when demand is large, highly variable or commercially critical.

If memory pressure is the measured limit and the workload remains moderate, more memory is a valid engineering choice, not a failure of imagination.

05

Horizontal scaling changes more than the server count

Horizontal scaling adds application instances and distributes traffic between them, usually through a load balancer. It can improve capacity, availability and flexibility, but only when the application is ready to share the work.

Any instance should be able to handle the next request. User sessions cannot live only in the memory of one server. Uploaded files need shared or object storage. Scheduled work must not run several times by accident. Deployments and configuration must remain consistent. Health checks need to remove a failed instance from service, and the application must shut down cleanly when capacity is reduced.

Microsoft’s architecture guidance makes an important point: scaling out is not magic. If the database is the bottleneck, adding more web servers will not improve the result. In fact, they may create more database connections and make the pressure worse.

Horizontal scaling earns its complexity when several instances genuinely improve throughput or resilience. It should not be the default response to an application that nobody has measured.

06

Scale the workload that is actually under pressure

Many business applications do not need one grand scaling strategy. They need different treatment for different workloads.

The installer portal could keep two web instances for interactive traffic, run a larger pool of document workers during weekday peaks and leave a reporting worker on a slower queue. The database may need an index and more memory, not a cluster. Static assets can sit behind a content delivery network. External API calls can use queues, timeouts and controlled retries.

This separates work with different urgency and resource needs. A customer opening a case should not wait behind 500 certificates being generated. A slow finance integration should not consume every available web worker. One busy component can grow without multiplying the cost of the whole application.

Queues also absorb short bursts. Rather than trying to complete every background task at the exact moment it arrives, the system records the work safely and processes it at a controlled rate. Queue depth then becomes a useful scaling signal. If jobs are arriving faster than they finish, add workers. If the queue is empty, reduce them.

07

The database is often the difficult boundary

Web servers are relatively easy to duplicate. Data is harder because it must remain correct while many requests read and change it.

Before changing database technology, check the ordinary causes of pressure: missing indexes, inefficient joins, repeated queries, large unbounded lists, long transactions, lock contention and reports running against the live workload. Connection pooling and sensible caching may also remove pressure.

When those improvements are not enough, the next options depend on the problem. Read replicas can serve read heavy workloads. Partitioning can keep very large tables manageable. Sharding distributes data between systems, but it also changes how the application finds, joins and moves that data. It is a significant architectural commitment, not a routine performance tweak.

The fashionable answer is sometimes to replace a relational database with a different kind of data store. That can be right for a specific access pattern. It can also trade a familiar problem for consistency, reporting and operational problems the business did not previously have.

08

Autoscaling needs a trustworthy signal

Autoscaling adds or removes capacity automatically. AWS, Azure and Kubernetes all provide mechanisms for it, but automation is only as good as the signal and boundaries supplied.

CPU utilisation is useful for CPU bound work. It is less useful when requests are waiting for a database, a queue or an external API. Request count, queue depth, response time or a business specific measure may describe the workload better.

A controlled policy needs a minimum and maximum capacity, a signal that reflects the real constraint, enough warm up time, health checks, safe scale in behaviour and load tests that prove added capacity increases throughput.

If doubling the instance count barely changes completed work, the system has reached another shared limit. Autoscaling can multiply servers while leaving the customer experience unchanged.

09

When a larger architecture change is justified

Microservices, serverless functions and container orchestration can support large or varied workloads. They can also introduce network failures, deployment coordination, observability needs and more infrastructure to own.

A deeper architecture change becomes reasonable when evidence shows that important parts of the system need genuinely independent scaling, release cycles or reliability boundaries. It may also help when one component repeatedly prevents the rest of the application from changing safely.

Even then, a modular monolith may be enough. Clear internal boundaries can separate web requests, documents, reporting and integrations without immediately turning them into separate networked services. The team gains control of the code and can extract a component later if the measured workload justifies it.

Architecture should follow the shape of the constraint. A global consumer platform and a regional installer portal should not inherit the same answer simply because both became slow on a Monday morning.

10

A measured scaling plan

Return to the installer portal. The team traces the morning slowdown and finds two causes. A dashboard query performs repeated calculations across a large table, while certificate generation shares workers with interactive web requests.

They add the right index, cache the dashboard totals for a short period and move certificates to a separate queue. A load test shows a substantial improvement. The database still approaches its memory limit during the busiest hour, so they move it to a larger instance. They add a second web instance behind a load balancer for availability, then test failover and scale in behaviour.

No dramatic rewrite was required. More importantly, every change answered a measured problem.

That is the useful discipline behind application scaling. Define the service people need, find the constraint, remove avoidable work and increase the smallest part that has genuinely run out of room. Make the system bigger only after making the reason clear.

Useful questions

An application scaling decision checklist

  • Define the user journeys and response times that matter.
  • Measure throughput, errors and the slower user experiences.
  • Trace the request to the constrained resource or dependency.
  • Remove waste through queries, caching and background work.
  • Choose vertical, horizontal or workload specific scaling.
  • Set capacity limits and a signal that reflects real demand.
  • Load test to prove that more capacity increases completed work.
  • Test failure, recovery and safe reduction of capacity.
Explore business software consultancy
Daniel Mills

Written by Daniel Mills

Business understanding and hands-on software delivery.

I help owners and teams improve the software they rely on, replace fragile processes and turn new ideas into practical systems people can actually use.