Quick revision
The short answer
Right now, I would throttle that one client at the edge by lowering its limit or capping its concurrency, so everyone else recovers, and contact the customer at once to explain and find the cause. Then I would change the policy: protect shared resources with per-tenant concurrency limits as well as request rates, set limits from measured capacity and contract terms and review them regularly, add load shedding that drops low-priority traffic first, and agree with product and sales on how limits appear in contracts.
What to remember
In this answer, we handled a tenant whose traffic jumped tenfold. In the moment, we throttled that one client at the edge to near its normal peak and contacted the customer. Then we changed the policy: per-tenant concurrency limits to protect shared resources, limits derived from measured capacity and contracts and reviewed regularly, load shedding that drops low-priority traffic first, and contract terms agreed with product and sales.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
Right now, I would throttle that one client at the edge by lowering its limit or capping its concurrency, so everyone else recovers, and contact the customer at once to explain and find the cause. Then I would change the policy: protect shared resources with per-tenant concurrency limits as well as request rates, set limits from measured capacity and contract terms and review them regularly, add load shedding that drops low-priority traffic first, and agree with product and sales on how limits appear in contracts.
Background to this question
This scenario is a test of judgement under pressure. The platform is degraded for every customer because of one customer, and that customer is probably important, since its traffic is large. We need to stop the harm quickly without treating the customer as an enemy, and then fix the policy that let it happen. In this answer, we will walk through the first hour, understand why limits that existed did not protect us, and then design the policy changes: concurrency limits per tenant, limits based on capacity, priority-based load shedding, and contract terms.
1A Quick Recap: Why the Existing Limits Did Not Help
Rate limits existed, but they were set too high, perhaps copied from a default or chosen to never bother anyone. A limit above what the platform can actually serve is not a limit, it is a number. If the platform can handle 5,000 requests per second in total and the customer's limit was 10,000 per second, the limit could never trigger before the platform itself was overloaded.
There is a second, subtler gap. Request rates do not capture cost. If the customer's integration calls an expensive search endpoint, 2,000 requests per second of that might cost more database time than 20,000 cheap reads. A rate limit counts requests; what we really run out of is threads, connections and database capacity.
2The First Hour: Contain, Then Talk
The first priority is to restore service for everyone else. At the gateway, we lower that client's limit to something close to its usual traffic, for example from 10,000 per second to 1,200, about 20 percent above its normal peak, so its legitimate business continues while the excess is rejected with 429 and Retry-After. If the expensive part is a specific endpoint, we cap that endpoint for that client more tightly. Because limits are configuration, this is a change we can make in minutes, and it is logged as an incident action.
At the same time, the account manager or support lead contacts the customer. Their integration has a problem too, often a retry loop, a deployment bug or a backfill job run at the wrong moment, and they usually want to know. Telling them before they discover 429s in their logs keeps the relationship intact.
- Detect: errors rise for all tenantsdashboards show one key at 10x
- Throttle that key at the edgelimit near normal peak, 429 + Retry-After
- Platform recovering?YesKeep the throttle, watchNoCap expensive endpoints or concurrency too
- Contact the customerexplain, find the cause together
- Remove the temporary throttleonce the cause is fixed
5 steps in order. Play them, or step through them one at a time.
3Policy Change 1: Per-Tenant Concurrency Limits
Rate limits are not enough on their own, so we add concurrency limits per tenant: the number of requests from one tenant that may be in progress at the same time. A tenant allowed 200 concurrent requests cannot occupy more than 200 threads or connections, however slow its requests are or however expensive. This protects shared resources directly. We can apply the same idea deeper in the system, for example a per-tenant cap on database connections used by batch operations, or per-tenant partitions in a work queue so one tenant's backlog cannot delay everyone else's jobs.
Notice that this check costs almost nothing and protects us from the cases rate limits miss, such as slow, expensive requests.
4Policy Change 2: Limits From Measured Capacity and Contracts
Limits should be derived, not guessed. We measure what the platform can serve, from load tests and production data, endpoint by endpoint, and keep headroom for the biggest customers' peaks. Each tier's limit, and each large customer's specific limit, must fit inside that capacity with a margin: no single tenant's limit should be large enough to overload a shared component on its own.
These numbers change as the platform and the customers change, so we review them regularly, for example every quarter, and after every incident like this one. A dashboard showing each large tenant's traffic against its limit and against platform capacity makes the review quick.
5Policy Change 3: Load Shedding by Priority
Even with good limits, overload can happen. Load shedding means that when the platform is near capacity, it deliberately rejects some work early so the rest succeeds. The key is to shed by priority: background syncs, bulk exports and low-priority batch traffic are dropped first, and interactive requests and payments last. Requests can carry a priority class, set at the gateway from the endpoint and the client, and each service rejects lower classes once its concurrency or queue is above a threshold.
| Class | Examples | Shed when load exceeds |
|---|---|---|
| Critical | checkout, payments, login | never shed first |
| Interactive | browsing, search by users | 95% of capacity |
| Integration | partner API reads and writes | 85% of capacity |
| Bulk | exports, backfills, syncs | 70% of capacity |
6Policy Change 4: Limits in Contracts
Finally, limits are a product decision as much as an engineering one. We agree with product and sales on how limits appear in contracts: published limits per plan, the behaviour when exceeded (429 with Retry-After), a process for customers to request higher limits for planned events such as a migration, and pricing for dedicated capacity if a customer needs it. When limits are written down and expected, throttling a customer during an incident is enforcing an agreement, not breaking one.
7Follow-up questions
Would you block the customer completely?
Only if the traffic is clearly abusive or the platform cannot recover otherwise. Throttling to near its normal level keeps its real business working, which is better for the customer and for us. A full block is a last resort, and we tell the customer immediately if we use it.
How do you detect this situation earlier next time?
Alert on any single tenant's traffic rising well above its usual level, for example three times its baseline for five minutes, and on any tenant using more than a set share of a shared resource. That catches the problem before everyone is degraded.
What if the customer's spike was legitimate, such as a big sale?
Then the fix is planning: the customer tells us in advance, we confirm capacity or provision more, and we raise their limit temporarily. The contract process for planned events exists exactly for this.
8Conclusion
In this answer, we handled a tenant whose traffic jumped tenfold. In the moment, we throttled that one client at the edge to near its normal peak and contacted the customer. Then we changed the policy: per-tenant concurrency limits to protect shared resources, limits derived from measured capacity and contracts and reviewed regularly, load shedding that drops low-priority traffic first, and contract terms agreed with product and sales.
Open with
First I would contain it. I would lower that customer's limit at the gateway to roughly its normal peak plus some margin, so its real business keeps working but the excess gets 429 with Retry-After, and if one expensive endpoint is the problem, cap that endpoint for them specifically.
Then, if they want more
That should bring the platform back for everyone else within minutes. At the same time, the account manager or I would contact the customer, because the spike is usually a bug on their side, like a retry loop or a badly timed backfill, and they would rather hear it from us. Then I would fix the policy.
The existing limits were above what the platform can actually serve, so they never triggered. I would add per-tenant concurrency limits, the number of requests in progress per tenant, because request rates do not reflect cost: a few thousand expensive searches can hurt more than many cheap reads.
I would derive limits from measured capacity per endpoint and from contracts, so no single tenant's limit can overload a shared component, and review them quarterly. I would add load shedding by priority, so bulk and integration traffic is dropped before interactive and checkout traffic when we are near capacity.
And I would work with product and sales so limits are published per plan, with a process for customers to request temporary increases for planned events. I would also add an alert when one tenant goes to three times its baseline.
About this answer
- Last updated
- 12 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- Spring Cloud documentation, Resilience4j documentation
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "A large customer's integration starts sending ten times its usual traffic and degrades...": https://scrivio-interview-library.netlify.app/spring-boot/resilience/899c7188eb/