API latency learning path Level 2 This level · 5 of 7
Medium java backend

How do you make sure an application meets its performance requirements?

The 30 second answer

I start by agreeing on a concrete target as percentiles, for example p99 under a set time at a given request rate. Then I write a load test for that target and run it before each release. In production I watch latency, traffic, errors and saturation with alerts on p99. When we miss the target, I use traces to find where time goes before changing anything.

Could you say this in an interview?

First I agree on a target as percentiles, for example p99 under 300 ms at a given request rate. I write a load test for it, with k6 or JMeter, and I run it in CI or before each release. In production I track latency, traffic, errors and saturation on dashboards, with alerts on p99. If we miss the target, I use traces to find where the time goes before I change anything.

# agree a target: p99 < 200ms at 500 rps for GET /catalog
# load-test that target in CI and before release
# in production, watch the same percentiles and error rate
Sources (3)
  1. Google SRE book: Service Level Objectivessre.google
  2. Google SRE book: The four golden signalssre.google
  3. k6 docs: Thresholdsgrafana.com
Previous
Next