Would your app hold at 240 users? Has anyone seen its autoscaling scale?

Customer app on Kubernetes: slow at 60 users with zero errors in a staging load test, and a cluster review found production autoscalers could not scale.
Case study

Would your app hold at 240 users? Has anyone seen its autoscaling scale?

On a staging cluster p95 was 745 ms at 30 users, 2.6 s at 60, with no errors. The database was not the reason.

For CTOs and heads of platform at companies running customer apps on Kubernetes.

If your customer app runs on Kubernetes with autoscalers on its busiest services, has anyone seen them scale? We ran a k6 load test of a resident mobile app on a staging cluster. Each fix exposed the next bottleneck. Reading the cluster, we also found what no functional test could: on the day of the test, production autoscalers had no metrics server to read. In staging, once autoscaling worked, the nodes were nearly full and nothing added more.

  • Property management software
  • Resident mobile app on Kubernetes
  • Clients
  • Money
  • Security
Hands typing on a keyboard in front of a monitor at a BetterQA desk in the Cluj-Napoca office
The numbers
169 msp95 at 240 users after three bottlenecks were cleared
30 to 60users: p95 latency went from 745 ms to 2.6 s
10 to 16 sp95 at 240 users once CPU limits were raised
169 msp95 at 240 users and 200 requests a second after the last fix
0errors in any run
At stake

What was at risk

Clients

Residents waiting on slow screens

The p95 went from 745 ms at 30 users to 2.6 s at 60, with zero errors, so no error monitor would have said anything.

Money

Autoscalers that could not scale

On the day of the test, production had autoscalers on the busiest services, but the cluster had no metrics server, so every target read unknown and none could scale.

Security

A rate limit anyone could skip

The services took the client address from a caller-controlled forwarded header, so a new value on every request skipped every per-IP limit. It was fixed during the engagement.

Rules

Standards and rules in play

  • A safe-by-design load scriptRead-only: ten GET requests per session with four to nine seconds of think time, so it leaves no data behind. Large runs went inside the cluster, with a forwarded address per virtual user.

Context: the rule in play is your own availability target.

Method

How we tested it

Test level
System testing, non-functional, against a staging cluster.
Test types
Performance testing, specifically load testing, with a security observation on the way.
Test basis
A resident's typical session: home, payments, services and community.
  • How we workedLoad testing by iterationRun, clear one bottleneck, run again: CPU limits first, then one permission service, then its replicas.
  • How we workedConfiguration reviewThe missing metrics server and the nodes that could not grow were found by reading the cluster, not by any functional test.

Terms as in the ISTQB CTFL 4.0.1 syllabus and glossary.

Findings

What we found, and what it costs

Found

745 ms at 30 users, 2.6 s at 60, with zero errors

What it costs youSlowness without errors never shows in an error monitor. Two of the busiest services were at their CPU limit.

Found

With limits raised, one permission service became the limit: p95 of 10 to 16 s at 240 users

What it costs youFix one bottleneck and the next appears. The database and the cache were never the constraint.

Critical path

Production autoscalers could not scale: no metrics server

What it costs youThe safety net for a traffic spike was not there. This is the state we found on the day of the test.

Security

A caller-controlled forwarded address skipped every per-IP rate limit

What it costs youFixed during the engagement.

Once autoscaling worked in staging, new pods failed to schedule because the nodes were nearly full and nothing added nodes. Requests from inside the network share one empty address, and so one rate budget.

Outcome

What changed

Two replicas of the permission service and a full core each took 240 users on the staging cluster to about 200 requests a second at a p95 of 169 ms, with zero errors in any run.

What this means for you: Ask whether your autoscaling has ever been seen scaling, and whether anyone has loaded the app from where real traffic comes from.
Check

What to check in your own product

  1. Check the cluster has a metrics server.On the day of the test, production had autoscalers on the busiest services, but the cluster had no metrics server, so every target read unknown and none could scale.
  2. Watch latency as well as errors.Slowness without errors never shows in an error monitor.
  3. Check the nodes can grow when new pods cannot be scheduled.Once autoscaling worked in staging, new pods failed to schedule because the nodes were nearly full and nothing added nodes.

Will your app hold when real traffic arrives?

We load test inside the cluster and follow the chain of bottlenecks to the end. The first month is a trial.

Talk to our team
Share the Post: