Prod Squad

Scalability basics: vertical vs horizontal scaling, load balancers, stateless services

How systems grow to handle more users, what actually breaks first, and how to partner with engineering when things slow down.

6 min readAll levels#scalability#horizontal scaling#vertical scaling#load balancer
Ask about this lesson
On this page

"Our app is getting slow as we grow" is one of the most common problems PMs face, and a common interview prompt. You don't have to design the architecture, but you do need to know the main levers, what each costs, and how to make scaling a product decision rather than a scramble.

Why interviewers ask this

Scalability questions test whether you understand that growth changes systems, that there are tradeoffs between quick fixes and lasting ones, and that you can prioritise performance work against features. In system design rounds, interviewers expect you to talk about scale (users, requests per second, data volume) and name the basic building blocks.

The framework

1. Measure before fixing

"Slow" needs numbers: which pages or endpoints, p50 and p95 latency, error rates, and how they change with traffic. Often a single slow query or service is the culprit.

2. Vertical scaling (scale up)

Give the server more CPU, memory or faster disks.

  • Pros: simple; no code changes; buys time quickly.
  • Cons: there's a ceiling, it gets expensive, and one big machine is a single point of failure.

3. Horizontal scaling (scale out)

Run many copies of the service behind a load balancer, which spreads requests across them and stops sending traffic to unhealthy copies.

flowchart LR
    U["Users"] --> LB["Load balancer"]
    LB --> A1["App server 1"]
    LB --> A2["App server 2"]
    LB --> A3["App server 3"]
    A1 --> C[("Cache")]
    A2 --> C
    A3 --> C
    C --> DB[("Primary database")]
    DB --> R[("Read replica")]
  • Pros: near-unlimited growth, resilience (one server dying doesn't take you down), and autoscaling with traffic.
  • Cons: needs stateless services and more operational complexity.

4. Stateless services

If a server keeps a user's session in its own memory, that user must always hit the same server, which breaks load balancing. Stateless services store session data in a shared place (a cache or database), so any server can handle any request. That's what makes horizontal scaling work.

5. The database is usually the bottleneck

App servers are easy to multiply; the database isn't. Common steps, roughly in order:

  • Fix slow queries and add indexes.
  • Cache frequent reads.
  • Add read replicas for read-heavy traffic.
  • Move heavy work to background jobs.
  • Shard (split data across machines) only when truly necessary, because it's complex.

6. Make it a product decision

Set performance targets (for example, p95 under 500ms on key flows), link them to business metrics (conversion drops as pages slow down), and reserve capacity for performance work.

Worked example

Question: "Our app is getting slow as users grow. How would you work with engineering to fix it?"

Sample answer:

"I'd treat it as a product problem with a technical solution: measure, find the bottleneck, fix the highest-impact issues, and prevent regressions.

1. Quantify the impact. Which flows are slow, by how much, and for whom? Suppose search and checkout p95 latency went from 600ms to 2.5 seconds over three months, and checkout conversion dipped 4% in the same period. That gives us urgency and a business case.

2. Find the bottleneck with engineering. I'd ask: is it the app servers (CPU maxed out), the database (slow queries, locks), a third party, or the front end (huge bundles, too many requests)? Monitoring dashboards and tracing usually show where time goes.

3. Fix in order of impact and effort. Suppose the database is the bottleneck: search runs an unindexed query and every page load re-fetches the same restaurant menus.

  • Quick wins: add the missing index; cache menus with a short expiry.
  • Medium-term: move order receipts and analytics writes to background jobs; add a read replica for search.
  • Only if needed later: bigger architectural changes.

4. Plan capacity. I'd agree with the team to dedicate, say, 30% of the next two sprints to this, and explain the tradeoff to stakeholders with the conversion data.

5. Prevent regressions. Set a latency budget for key flows, alert when p95 crosses it, and add load testing before big launches."

Common mistakes

  • "Just add more servers" when the database is the bottleneck.
  • No measurement, so the team optimises the wrong thing.
  • Jumping to sharding or microservices before simple fixes.
  • Treating performance as engineering's problem instead of linking it to user and business impact.
  • One-off fixes with no guardrails, so it slowly degrades again.

Interviewer tips

What "great" sounds like:

  • "First, let's measure: which flows, what p95, and is it correlated with traffic?"
  • "App servers scale horizontally if they're stateless; the database is usually the hard part."
  • "I'd start with indexes and caching before anything architectural."
  • "Checkout conversion dropped 4% as latency rose, so this is worth a chunk of roadmap."
  • "Let's set a latency budget so we catch regressions early."

Practice questions

Answer one in a mock interview and get graded instantly.

  1. 1.Our app is getting slow as users grow. How would you work with engineering to fix it?

    Practice this →
  2. 2.Explain the difference between vertical and horizontal scaling to a non-technical stakeholder.

    Practice this →
  3. 3.We're expecting 10x traffic for a big sale next month. How would you prepare?

    Practice this →

Finished reading?