Skip to content
Tech Interview Prep
Technical interview guide

Capacity Planning & Load Testing

Knowing how much traffic a system can take before it does, through modeling and deliberate load testing.

Read
28 min
Practice MCQs
25
Interview Q&A
25
Edition
v4
Editorial status
Reviewed

Scope: Google SRE, Kubernetes, OpenTelemetry, Prometheus, k6, JMeter, PostgreSQL, and IETF guidance current 2026-08-31.

Curated: · Written: · Reviewed:

25 questions

MCQ-4A team writes a k6 script for a checkout flow and runs it with 1 virtual user for 60 seconds against staging. Every request returns 200, the script's checks pass, and its custom metrics appear in the summary. Before scaling the run to 5,000 VUs, what has this run established?
MCQ-1A checkout service's SLO is p99 ≤ 250 ms and error rate ≤ 0.1%, measured over each 20-minute step; the SLO is the acceptance criterion and no extra margin is applied. A capacity ramp on the production fleet (autoscaling max 120 instances, CPU target 60%) gave: | rps | p99 | error rate | fleet CPU | | --- | --- | --- | --- | | 15,000 | 140 ms | 0% | 28% | | 20,000 | 190 ms | 0% | 37% | | 25,000 | 240 ms | 0% | 46% | | 30,000 | 310 ms | 0% | 55% | | 35,000 | 620 ms | 3.1% | 52% | The team must publish one number as the service's sustainable capacity. Which figure should it be?
MCQ-14An engineer load-tests a checkout API, ramping from 200 to 2,000 RPS over 30 minutes. The abort conditions are p99 > 2 s sustained for 60 s, or error rate > 5%. At minute 12 the API reports p99 of 900 ms and a 0.4% error rate, so the run continues. By minute 20 the Postgres replica the analytics team reads from is 40 minutes behind, its dashboards are stale, and the nightly ETL job has failed. Which abort condition would have caught this?
MCQ-22A checkout service's p99 latency jumped from 180 ms to 420 ms on the day a new build shipped. Which comparison would let the team claim the deploy caused the regression?
MCQ-21A team load-tests a product-catalog service before a launch. The run drives 4,000 rps for 45 minutes against a 6-node cluster; the workload is 100% GETs against a 2 GB catalog that fits in each node's page cache. p99 is 100 ms against a 200 ms SLO, error rate is 0.01%, and each node sits at 40% CPU. The launch adds price and stock writes and grows the catalog to 60 GB. Which claim is this run sufficient evidence for?
MCQ-7A single-threaded load generator issues one request every 10 ms for 60 s. The server stalls for 1 s; the generator blocks on its in-flight request, then resumes on schedule. The report shows p99 = 12 ms and max = 1.0 s. What is wrong with this measurement?
MCQ-6A payments API is load-tested with 200 virtual users, each sleeping 500 ms between iterations. At 40 ms p50 the generator offers ~370 req/s; after the service degrades to 400 ms p50 it offers ~222 req/s. The service sits at 60% CPU, the generator at 15% CPU holding 40 sockets, and every request returns 200. The team signs off that the service absorbed the projected 400 req/s peak. Why is that conclusion wrong?
MCQ-17A load test targets 20,000 RPS against a service with a 200 ms p99 SLO. Four generator hosts, 8 vCPUs each, drive the traffic. The run reports 12,000 RPS achieved; the service's p99 is 45 ms and its CPU sits at 30%. All four generator hosts show 98% CPU for the duration. What does this run establish?
MCQ-19A team load-tests an order service on PostgreSQL 16 with a closed-loop driver: 36 clients, each sending its next request only after the previous response returns. The 10-minute run reports 2,400 TPS at p99 = 15 ms and zero errors, so the team ships. In production the same 2,400 req/s arrives from 3,000 users; average latency is 500 ms, p99 is 1.4 s, and pg_stat_activity shows 20 active sessions with about 1,200 requests queued for a pool connection (max_connections = 20). Which change to the load test would have predicted the production latency?
MCQ-5A payments API is load-tested at a steady 400 rps. A 30-minute run holds p99 at 45 ms with RSS flat at 380 MB and an empty internal work queue. The same 400 rps run for 12 hours ends with p99 at 210 ms, RSS at 1.7 GB, heap retained after a full GC up from 120 MB to 900 MB, and a work queue that has grown to 9,000 items and does not drain even after offered load is cut to 200 rps for 10 minutes. No errors and no restarts. Which conclusion do these numbers support?
MCQ-20A payments API is load-tested at 3,000 rps for 30 minutes, 2.5x its 1,200 rps production peak. No request returns a non-2xx status and p99 is 45 ms. The load generator retries once after a 2 s timeout and logs 1,412 timeouts. Reconciling the 5.4M requests afterwards finds 1,412 duplicate ledger rows and no missing ones. What should the team do next?
MCQ-2A payments service runs on a fixed fleet with no autoscaling. One instance sustains 100k requests/hour. Hourly request counts are flat at 250k except 09:00–10:00, which carries 1.2M. A nightly reconciliation batch at 02:00 serves no requests but drives total CPU to the equivalent of 20 instances for 30 minutes. Next quarter's request volume is forecast to grow 30%. How many instances must the fleet have to cover the worst moment?
MCQ-3A payments service runs active-active across three availability zones. Peak demand is 900 rps. Each zone's autoscaling group is sized to serve 400 rps at the 200 ms p99 target, giving the fleet 1200 rps in the normal state. The capacity model has three states (normal, zone-loss (one AZ unavailable), and region-loss) and the team is reviewing the zone-loss result before signing off on the SLO. What does the zone-loss state report, and what does it imply for per-zone sizing?
MCQ-18A stateless API runs on an autoscaling group of 8 instances. Load tests show each instance serves 500 rps while p99 stays under the 200 ms SLO, and that p99 climbs steeply past 500 rps per instance. A newly launched instance takes 8 minutes before it is serving its full 500 rps. During the daily peak, fleet-wide traffic rises at a steady 75 rps per minute. The team wants one fleet-wide request-rate alert, set as late as possible while still leaving enough time to scale out before the SLO is breached. Where should the threshold sit?
MCQ-13A Kubernetes Deployment runs 4 replicas, each container requesting 500m CPU, behind an HPA with target CPU utilization 60%, minReplicas 4 and maxReplicas 8. A load test applies a steady 3200m of CPU demand. The HPA scales to 8 replicas within a minute and then holds there; it reports 80% CPU utilization and p99 latency stays at 900 ms. What does this show?
MCQ-8An 8-pod checkout service runs a fixed pool of 32 worker threads per pod. After a deploy, a load test offers 900 rps but the service completes only 800 rps; p99 latency rose from 60 ms to 900 ms while the mean stayed near 70 ms. Handler work averages 40 ms per request, pod CPU averages 55%, the load balancer reports no 429s or connection resets, and the network RTT between generator and pods is 0.4 ms. Which conclusion do these numbers support?
MCQ-10A payments API runs 16 worker threads; each request holds a worker for 25 ms on a database write. The bounded queue holds 500 requests. Traffic is steady at 800 req/s and clients time out after 500 ms. The queue is full. What should the service do with the next request?
MCQ-9A product page fans out to 20 backend shards in parallel and waits for all of them before rendering. Each shard's latency distribution has p50 = 20 ms, mean = 30 ms, and p99 = 800 ms. The team's dashboard reports only the per-shard mean, which looks healthy. What fraction of page loads take at least 800 ms: a figure the per-shard mean does not reveal?
MCQ-15A multi-tenant service shards by tenant hash across 16 shards and keeps a per-tenant LRU cache of 100 entries. Staging load tests use 1,000 tenants, each with exactly 10,000 rows and keys drawn uniformly at random; p99 is 40 ms and no shard holds more than 7% of the rows. Production has 50,000 tenants, and its top 10 tenants hold 60% of all rows; p99 there is 180 ms. Which change to the staging test data would most likely reproduce the production p99?
MCQ-16A breakpoint test ramps a checkout service from 0 to 2,500 RPS over 30 minutes using the production mix (20% writes). Throughput plateaus at 1,900 RPS: p99 climbs from 110 ms to 3.4 s, the 100-connection DB pool is fully checked out with a growing wait queue, and service CPU sits at 45%. The team re-runs the identical test with an 80% write mix: throughput plateaus at 700 RPS, the pool again saturates first, and the database's own CPU reaches 95% (40% in the first run). The launch will run the 80% write mix at 900 RPS. What does the breakpoint data support?
MCQ-23A service uses a fixed-window counter per API key: 120 requests per 60-second window. At second 52 of the current window, key A has already sent 120 requests. It sends 30 more. The backend is at 35% CPU with p99 latency 70 ms, and no other key is affected. The team is choosing between 429 and 503 for the rejection. Which response should the service return for the 30 requests?
MCQ-11An API gateway fronts an upstream that can serve 1,000 requests/sec. The gateway enforces a single global token bucket of 1,000 tokens/sec, one token per request, admitting in arrival order. Tenant A runs a batch job at 1,200 req/sec and its requests arrive continuously; tenants B and C are interactive APIs at 100 req/sec each. A's traffic keeps the bucket empty, so B and C are almost always rejected. Upstream capacity cannot be increased. Which gateway configuration guarantees B and C are never rejected while letting A use the remaining capacity?
MCQ-12A mobile app's 1,000 clients lose connectivity at the same instant and reconnect together. Each client retries with exponential backoff starting at a 100 ms base delay, and the team measures retry load in 10 ms windows. With no jitter, the first retry lands ~1,000 requests in a single 10 ms window. The team switches to full jitter, drawing each client's first delay uniformly from [0, 100 ms]. What does the first-retry window hold now?
MCQ-24An order service runs 20 workers at steady state, each processing 30 msg/s, against 400 msg/s of arrivals. A 15-minute spike test drives the queue to 240,000 messages and the autoscaler adds workers up to 60. The load generator stops; five minutes later the error rate is 0%, p99 is back to 120 ms, and the autoscaler has scaled in to its minimum of 10 workers, with the queue still at 240,000 messages. What happens to the queue depth next?
MCQ-25A payments service holds a steady 600 requests per second. Unpredictable demand spikes to 1,800 requests per second arrive a few times an hour, each lasting roughly 90 seconds, a few minutes apart. The platform takes 180 seconds from a detected load change to a fully warmed new instance, and clients drop any request that has not returned within 2 seconds. Which capacity policy serves every spike without triggering thrash or cascading failure?