Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
Introduction to System Design  ›  Lesson

Performance vs Scalability

Performance vs Scalability 12 minA performance problem makes the system slow even for one user; a scalability problem makes it fast for one user but slow under heavy load.

Performance vs Scalability

Hop's users complain that it is "slow". That word hides two very different illnesses, and the cure for one does nothing for the other. Before fixing anything, find out which one you have.

The rule

Slow for one user is performance; slow only for the crowd is scalability.

  • A performance problem shows up with a single user. The request itself does too much work: a missing index, a wasteful loop, a slow external call.
  • A scalability problem shows up only under load. Each request is fine alone, but the system cannot keep up when many arrive together.

A system is scalable when adding resources adds capacity in proportion. Double Hop's servers and it should handle roughly double the clicks. If doubling the servers barely helps, something shared — often the database — is the real limit.

Test yourself with Hop:

Symptom Diagnosis
Redirect takes 3 s at 4 a.m., no one else online Performance
20 ms at night, 4 s during the evening peak Scalability
Twice the servers, same peak slowness Scalability limit in something shared

The shortcut

Ask one question: "Is it slow when it is quiet?" Yes → performance: look inside the request. No → scalability: look at capacity and shared parts.

Diagnosing Hop's evening slowdownStep 1 of 4
  1. Test it quiet

    At 3 a.m. a redirect takes 20 ms. Each request is healthy, so this is not performance.

The common mistake is buying bigger machines for a performance bug. A lookup that scans ten million rows is slow on any hardware; an index fixes it for free.

Drills

Answer fast — trust the rule.

quick drill

A page loads slowly even when only one tester is using the system. What kind of problem is it?

quick drill

Hop answers in 15 ms with 10 users but in 3 seconds with 10,000. What kind of problem is it?

quick drill

What does it mean for a system to be scalable?

quick drill

Hop doubles its servers but peak-time speed does not improve. What is the likely cause?

Remember

  • Slow for one user is performance; slow only for the crowd is scalability.
  • Shortcut: "is it slow when it is quiet?" Yes → look inside the request; no → look at capacity.
  • Trap: bigger hardware for a performance bug, or more servers when a shared part is the limit.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainDiagnose Hop's slowness

Two reports arrive about Hop. Report A: 'A redirect takes 3 seconds even at 4 a.m. when nobody else is using it.' Report B: 'Redirects take 20 ms at night but 4 seconds at the evening peak.' Classify each as a performance or a scalability problem and suggest one sensible first fix for each.