NULLBIT
NULLBIT
Blog
Author: ALFRED

Web App Scalability: How to Build and Test for Growth

Web app scalability explained for business leaders: scaling types, where apps break first, the architecture that holds up, and how to test capacity before launch.

Web App Scalability: How to Build and Test for Growth

Web App Scalability: How to Build and Test for Growth

Sketch of server and database architecture

A scalable web app keeps its speed and reliability as users, traffic and data grow, and it does so without a rebuild each time. In practice that means finding your first bottleneck (usually the database), choosing the right scaling method for it, and proving capacity with load tests before real traffic does it for you. Our engineering team at Nullbit designs web platforms this way, with cloud infrastructure and system engineering planned together from the start.

Nullbit
Build a Web App Ready for Growth
Nullbit develops custom software and scalable digital platforms, helping businesses address operational inefficiency as their needs grow.
Visit

TL;DR

  • Scalability is the ability to handle more work by adding resources, and to give them back when demand drops, without hurting user experience.
  • Scale up (a bigger server) is the quickest first step. Scale out (more servers) gives growth and redundancy but needs stateless, decoupled design.
  • The database is the most common bottleneck. Fix queries, caching and connections before adding hardware.
  • Test with stepped load (1x, 2x, 4x, 8x) and watch latency, throughput, errors and saturation. Sub-linear gains point to a shared-resource bottleneck.
  • Decide on scaling architecture early. It is far cheaper than retrofitting it after a traffic spike.

Table of Contents

What web app scalability actually means

Google Cloud defines scalability as a system’s ability to handle varying amounts of work by adding or removing resources. A scalable app works equally well for one user or many, copes with peaks and dips, and can trim costs when demand falls without hurting performance.

Microsoft gives a useful way to measure it. Its Azure Architecture Center describes scalability as a ratio: ideally, doubling resources doubles throughput. Real systems fall short of that because of bottlenecks or synchronization points, places where requests have to wait for one shared thing.

An academic chapter from the National University of Singapore adds that a scalable system accommodates more usage and a larger data set while staying maintainable with reasonable performance. That last point matters to business owners: a system that scales only because three people hold its quirks in their heads is not scalable in any useful sense.

For a company, the questions are simple. What happens to checkout speed on your busiest day? What does a ten-fold data increase do to reports? How much does it cost to serve the next thousand customers? Scalability is the engineering answer to all three, and why scalability matters for growth is clearest in any business where demand arrives in bursts.

The three ways to scale: up, out and a mix

Most scaling decisions come down to three approaches.

Vertical scaling (scale up) adds CPU, RAM or storage to one server. IBM notes it is often the easiest first move for monolithic apps, though it is limited by what a single machine can hold. Google Cloud adds that it is simpler but leaves a single point of failure and may cause brief downtime during upgrades.

Horizontal scaling (scale out) adds more servers, or nodes, and spreads requests across them. Google Cloud describes it as more complex but typically free of downtime and highly fault tolerant. IBM points out that microservices let you scale only the busy parts of an app, while serverless functions can spin up thousands of instances on demand.

Diagonal scaling combines the two: grow a node until it is cost-efficient to stop, then add more nodes. Google Cloud also describes this hybrid approach.

The three ways to scale: up, out and a mix

A third dimension is geography. Google’s developer guidance notes that distributing services across multiple regions reduces latency for distant users, with data consistency across regions as the key design question.

Which one fits your app

Situation Usual first move Why
Early product, predictable growth, single codebase Scale up Fastest and simplest, no architecture change
Traffic spikes, uptime commitments Scale out behind a load balancer Redundancy and elastic capacity
One module is hot (search, reporting, checkout) Split that service and scale it alone Pay only for the load you have
Users on several continents Add regions and a CDN Lower latency, but plan for data consistency

One rule from a 2026 scaling guide is worth keeping: scaling up removes a resource limit on one node, scaling out removes one node as the capacity or availability boundary, and neither fixes slow queries or inefficient code. Diagnose the wait path first, then pick the method.

Where web apps break first

The NUS chapter calls the database the most common bottleneck in web applications, because most reads and writes land there. The usual suspects, from a 2024 bottleneck guide, are slow queries from missing indexes, lock contention and poor schema design. On the API side: inefficient algorithms, uneven load distribution, memory leaks and network latency.

Two patterns show up again and again in postmortems of growing systems.

  1. Connection exhaustion. Autoscaling adds app instances, and each one opens database connections. A write-up of one scaling project reported that PostgreSQL degrades sharply above roughly 200 active connections, and that putting a connection pooler in front turned 8,000 app-side connections into 150 database connections. Treat those figures as one team’s experience, not a universal limit.
  2. Hot keys and cache stampedes. One engineer’s teardown describes a single popular cache entry expiring during a campaign, sending thousands of simultaneous requests to the database. The fixes were request coalescing, serving stale data while refreshing, and randomized expiry times.

The common thread: at scale, trouble usually sits in a shared, stateful resource, not in raw CPU. That is why adding servers without understanding the bottleneck often just moves the problem.

The architecture that holds up under growth

Google Cloud names three themes for scalable and resilient apps: automation of provisioning, testing and deployment; loose coupling of components; and scaling decisions based on metrics and logs. Here is how they translate into layers.

Keep the app tier stateless

Microsoft warns that session stickiness, where a user is pinned to one instance, limits horizontal scaling because heavy users’ traffic is not spread across instances. Store sessions in a shared store, and any instance can serve any request.

Decouple with queues

The same guidance recommends asynchronous, event-based communication, flow control and message queues to absorb extra work. Anything that does not need an instant answer (emails, report generation, image processing) belongs in a queue, so a spike makes the queue longer instead of making the site slower. A related discipline is protecting your own APIs from overload; our piece on API rate limiting and retry behavior covers it.

Cache, balance and protect

AWS’s hosting whitepaper lists the core building blocks: load balancing to spread requests, a managed cache such as Redis or Memcached to take load off the app and database, and multi-zone managed databases for availability. AWS’s containerized reference architecture adds a content delivery network for static assets, API throttling and monitoring, spread across multiple Availability Zones. The same ideas exist on every major cloud, and the right stack depends on your team and workload. Scalable cloud architecture benefits are easiest to see when these layers are designed together rather than bolted on.

Let the platform autoscale on real signals

Google’s Kubernetes tutorial shows autoscaling driven by CPU and memory or by custom metrics such as requests per second, with a load generator simulating spikes. Microsoft’s reliability guidance goes further: define service-level indicators and objectives, model expected scale, and use autoscaling at every layer, including the database.

Scale the database in a sensible order

One engineering teardown frames the order as simplicity versus capacity: vertical scaling first, then read replicas, connection pooling, and sharding last. Sharding, splitting data across databases, complicates queries, migrations and transactions, and a poor shard key can turn simple reads into queries across every shard. Do it when the data demands it, not as a badge of maturity.

How to test whether your app will scale

Testing turns scalability from an opinion into a number. AWS’s performance testing documentation defines a scalability test as stepped increases of 1x, 2x, 4x and 8x baseline load, held 30 minutes per step, recording throughput, latency and resource use. Linear scaling means throughput rises in proportion while latency stays flat. Sub-linear gains point to a shared-resource bottleneck such as a database lock or a single connection.

A practical test routine

  1. Set pass/fail criteria first. Microsoft’s Well-Architected guidance advises acceptance thresholds for latency, throughput, resource use and error rates, and recording your first run as the baseline for later comparison.
  2. Mirror production. A test on a laptop-sized environment proves nothing about the real one.
  3. Ramp in steps. Use the 1x to 8x pattern above, starting with small traffic percentages and increasing gradually.
  4. Watch the right metrics. Alibaba Cloud’s testing guide groups them into business, resource, application and frontend metrics: concurrent users, success rate, response time, CPU, memory, database connections and page load. It also advises stating whether a threshold applies to the mean, median, p95 or p99.
  5. Change one thing, rerun. After adding a server or upgrading the database, repeat the same profile and see whether capacity grew or the bottleneck simply moved.
  6. Document the envelope. Write down the load at which your app degrades, so product and marketing teams know the ceiling before a campaign.

On percentiles: p95 means 95% of requests were faster than that value, so it exposes the slow experience that averages hide. If you track only four signals, Google’s SRE practice suggests latency, traffic, errors and saturation. Together they show how fast the app feels, how much it handles, what fails and how close it is to its limits.

Also run different test types for different questions. A load test holds expected traffic, a stress test pushes past it to find the breaking point, and a soak test runs for hours to reveal memory leaks and connection exhaustion.

Common scaling mistakes

  • Scaling before measuring. Adding servers to an app with a slow query bills you more for the same slowness.
  • Sharding too early. The extra complexity slows every feature after it.
  • Stateful instances. Local sessions and files make autoscaling unreliable.
  • No cost view. Elastic capacity helps the bill only if scale-down works too. Our cloud cost optimization guide goes deeper on this.
  • Testing once. Every release changes the performance profile, so keep the baseline and rerun it.

Putting it together: a sequence that works

For a growing product, a sensible order looks like this. Measure first, with monitoring on latency, errors, saturation and database time. Fix queries and indexes. Add caching with careful expiry. Scale the app tier up, then out behind a load balancer once it is stateless. Move slow work to queues. Add read replicas and connection pooling. Only then consider splitting services or sharding data.

Ordered steps for scaling a web app

Figma’s growth, as documented in one engineering handbook, followed a similar path: traffic grew roughly 3x a year, and the team moved from a single vertically scaled database to dedicated databases with caches and replicas, and finally horizontal sharding in 2023. They did not start with the hardest option.

If you are choosing what to build in the first place, the trade-offs between a native app, a progressive web app and a web app are laid out in our guide on how product leaders choose between them. If AI features are part of your roadmap, scalable AI solutions for enterprise covers the extra load they bring.

How Nullbit builds for scale

Scalability is cheapest when it is designed in. Our cloud infrastructure services and system engineering services cover architecture and integration, and we work in a technology-agnostic way, so the stack follows your workload rather than a preferred vendor. We focus on measurable business results, transparency and long-term partnerships.

Engagements are priced openly. Proof-of-concept development starts from €5,000 one-off, smaller solutions from €15,000 one-off, fixed-price turnkey projects run €5,000 to €60,000 one-off, and agile time-and-materials engagements run €5,000 to €40,000 per month. See the cooperation models to match one to your project.

Nullbit

If you already have a web app that slows down under load, or a platform you want to grow without a rewrite, talk to Nullbit about a scoped first step.

Our perspective

Most teams we meet ask how to add servers. The better question is what is waiting on what. A web app that struggles under load almost always has one shared resource at the center of the problem, and until you name it, every infrastructure change is a guess.

That is why we treat scalability as part of system engineering, not a hosting setting. Architecture, cloud infrastructure and the application code are decided together, and the plan is tied to business numbers: peak orders per hour, report run time, cost per thousand users.

We also believe in doing the simple thing first and proving it with tests. A bigger instance, a cache and a pooled connection layer carry many products a long way. When it is time to split services or add regions, the baseline you recorded tells you exactly where.

Build for the growth you can see, instrument for the growth you cannot, and keep the option to scale out open from day one.

Matija

FAQ

What makes a web application scalable?

A scalable app handles more users and data by adding resources, with performance staying steady. In practice it has stateless application servers, a load balancer, caching, a database that can be read from replicas, and monitoring that triggers scaling. Loose coupling between components lets each part grow on its own.

What is the scalability problem in a web application?

It is usually a bottleneck: one shared resource that requests queue behind. The database is the most common one, through slow queries, locks or too many connections. Adding servers does not help until that resource is relieved.

How do I test the scalability of a web app?

Run stepped load tests, for example 1x, 2x, 4x and 8x your baseline, holding each step long enough for metrics to settle. Record throughput, latency percentiles, error rate and resource use. If throughput does not rise in proportion while latency stays flat, look for a shared bottleneck and retest after each change.

Should I scale up or scale out first?

For a young product with predictable growth, scaling up is the quickest and simplest move. Once uptime matters or traffic is spiky, design the app to be stateless and scale out behind a load balancer. Many teams combine both over time.

How much does it cost to make a web app scalable?

It depends on how much of the system needs rework. A proof-of-concept at Nullbit starts from €5,000 one-off, and larger engagements are scoped as fixed-price projects or monthly agile work, as described on our cooperation page.

Sources

Tags
web app scalability
Stay ahead of the competition

Exclusive insights that drive change.

Get access to proven methodologies for digital growth, AI tool implementation, and AI product development.

  • Weekly digital strategy analyses
  • Advanced insights into AI trends and technology solutions

Your privacy is a priority. You can unsubscribe at any time.