New Relic Reliability Engineer study materials
New Relic Reliability Engineer study resources

Checkout Latency After the Bulk Endpoint Release

New Relic Reliability Engineer · Put your knowledge to work in context.

All case studies

Checkout Latency After the Bulk Endpoint Release

NorthPeak Payments runs a Java 17 checkout API on 24 pods behind a load balancer, handling 3,200 requests per minute at peak. After release 4.18 shipped on Tuesday, APM shows p95 response time climbing from 210 ms to 1.6 s between 11:00 and 13:00 UTC, while error rate stays flat at 0.2% and throughput is unchanged. The response-time breakdown attributes 78% of the added latency to a single outbound call to the ledger service, whose own APM reports p99 of 90 ms for the same window. Traces show the outbound client span starting late relative to the request start, and a thread profiler snapshot taken during the spike shows 140 of 200 request threads waiting to borrow from a connection pool of 40. The release added a bulk statement endpoint that opens a transaction before acquiring the ledger connection and holds it across formatting work. Only 6% of requests hit the new endpoint.

1. Using the evidence in the setup, where is the added latency actually being spent, and which APM artifacts would you pull to prove it is not the ledger service?

Read the worked answer

The wait is inside checkout, not inside ledger. Three signals triangulate it:

  • The outbound client span starts late relative to the parent request span. If it begins 1.2 s into a 1.6 s request, the time was consumed before the call was ever made, so the downstream service cannot own it.
  • 140 of 200 request threads blocked borrowing from a 40-connection pool is queue time, and queue time is attributed to the caller, not the callee.
  • Ledger's server-side p99 of 90 ms is exactly what a fast server behind a saturated client pool looks like.

Artifacts to pull: the self-time calculation for the slowest traces (checkout span duration minus the sum of its child spans); the client-span versus server-span duration delta for the same trace IDs; pool metrics of active, idle, wait time and pending borrowers graphed against p95 latency; and a span count for the bulk endpoint to compute concurrency multiplied by connection hold time against pool size. If 6% of 3,200 rpm is roughly 192 requests per minute and each holds a connection for several seconds, the arithmetic alone explains starvation. Bring that arithmetic to the ledger team rather than an opinion.

2. Recommend a remediation sequence and the guardrail that would have caught this earlier. Explain why enlarging the connection pool is not the first move.

Read the worked answer

Fix transaction scope, then isolate, then resize. Move the connection borrow to the point of use so a connection is held only for the statements that must be atomic, and move statement formatting outside the transaction. Then give bulk work a dedicated bounded pool or worker tier so a low-volume endpoint cannot starve interactive checkout traffic.

Enlarging the pool is the wrong first move because the pool is a symptom boundary, not the cause. More connections shift contention to the database: higher connection count, more memory per session, longer tail under the same burst, and a failure mode that is harder to see. It converts a sharp, well-localized slowdown into a diffuse one.

Guardrail: alert on p95 pool wait time and pending borrowers rather than on utilization percentage, because 100% active connections are healthy when wait time is near zero. Pair it with a synthetic that calls the bulk endpoint at production weight and asserts p95 checkout latency, plus an alert on the ratio of self-time to child-span time for the checkout span.

3. A full rollback takes about 40 minutes and one customer is committed to using the bulk endpoint today. What do you do, and how do you set severity?

Read the worked answer

Disable the endpoint, not the release, if the switch is available. The defect is scoped to one code path, so a feature flag or configuration toggle that removes the bulk endpoint restores checkout within minutes while keeping the rest of 4.18 live. A 40-minute full rollback also discards unrelated fixes and re-introduces whatever 4.18 corrected.

Severity reasoning: errors are flat at 0.2%, so payments are not failing outright, but p95 at 1.6 s during an 11:00-13:00 peak is squarely in the window where users abandon. Estimate harmed sessions from the fraction of requests above the latency SLO rather than from the 6% endpoint share, because the endpoint degrades everyone sharing the pool. That number, not the endpoint's own traffic share, sets severity and the communication to the committed customer.

If no flag exists, roll back and ship the endpoint later behind a flag. Record the missing flag as a release-process finding: any endpoint that opens a transaction before acquiring a pooled resource should require one.