Scrivio Interview library
LeadershipAdvanced6 min read · updated 12 November 2026

Internal services in your organisation regularly overload each other with batch jobs and traffic spikes. How would you introduce rate limiting and quotas between internal services?

I would make quotas an agreement between teams: each client of a shared service gets a per-client quota that the owner and the client agree on. Enforcement lives in a gateway or service mesh rather than in each service, interactive and batch traffic get separate limits or priorities, and usage and throttling are visible to both sides. Quotas are reviewed whenever capacity or demand changes.

Why this question is asked

Inside a company, services usually trust each other completely: any service can call any other as fast as it likes. That works until a nightly batch job sends 30,000 requests per second to the customer service and checkout starts timing out. The technical tools for limits are well known; the hard part is introducing them across many teams without blocking work or starting turf wars. Interviewers ask this leadership question to see how we combine the mechanism with agreements, visibility and review. In this answer, we will see why internal overload happens, how to agree quotas, where to enforce them, how to treat batch traffic differently, how to make throttling visible and how to keep quotas current.

1Why Internal Services Overload Each Other

A shared service, such as a customer profile service, has many clients: checkout, the mobile backend, recommendations, a marketing export job. Each team sizes its own traffic without knowing what the others do. A batch job is written to finish quickly, so it uses 64 threads and calls the profile service as fast as possible. A new feature launches and doubles calls from the mobile backend. Nobody did anything wrong in isolation, but the profile service has capacity for, say, 20,000 requests per second and now receives 35,000.

Without limits, the shared service degrades for everyone at once, and the most important client, checkout, suffers as much as the least important. The problem is really missing information and missing agreements, so the solution has to provide both, not only a throttle.

2Agreeing Per-Client Quotas

I would start with the most contended shared services, not all of them. For each, the owning team publishes its tested capacity, for example 20,000 requests per second at p99 under 50 ms, and each client team states its expected normal and peak demand. Together they agree a quota per client, with some headroom kept unallocated, for example 20 percent, for growth and surprises. The result is a small table that both sides can read: checkout 6,000, mobile backend 5,000, recommendations 3,000, batch exports 2,000.

The agreement matters more than the numbers. When a client team needs more, it asks, and the owner either grants it from headroom or plans capacity, rather than discovering the problem in an incident. I would keep the table in a versioned configuration repository that both teams can propose changes to, so the quota is code, reviewed like code.

Example quotas for the profile service
ClientQuota (req/s)Traffic classWhen over quota
checkout6,000interactive, high429 after a short burst
mobile-backend5,000interactive429 after a short burst
recommendations3,000interactive, low429, falls back to defaults
batch-exports2,000batchqueued or slowed, never 503s
unallocated headroom4,000-kept for growth and spikes
Capacity 20,000 req/s, of which 20 percent stays unallocated.

3Enforcing in the Gateway or Mesh

If every service team builds its own rate limiter, we get twenty implementations with twenty bugs, and the most overloaded services are often the ones with the least time to build one. So enforcement belongs in shared infrastructure: an internal API gateway, or the sidecar proxies of a service mesh such as Istio or Linkerd, using Envoy's local or global rate limiting. The caller is identified by its workload identity, for example its mTLS certificate or service account, so limits apply per client service, not per IP address.

Configuration comes from the same quota repository, so changing a quota is a pull request, not a code change in the service. Services that are not in the mesh can use the shared client library's limiter as a fallback. The owning team still keeps its own last line of defence, load shedding when total load exceeds capacity, because quotas protect against known clients while shedding protects against everything else.

4Separating Interactive and Batch Traffic

A request from checkout has a user waiting; a request from a nightly export does not. Treating them the same means the export, which can always go faster, crowds out the user. So I would separate the classes. Batch jobs get their own quotas, often lower during business hours and higher at night, and they should handle 429 by slowing down rather than retrying hard. Better still, the batch path can use a separate endpoint, a read replica or a bulk API that returns 1,000 records per call instead of one, which serves the same need at a fraction of the cost.

Where the infrastructure supports it, requests carry a priority header and the service sheds low-priority requests first when it is near capacity. Then a spike in batch traffic delays the export by a few minutes and never affects checkout.

5Making Usage and Throttling Visible

Throttling that nobody can see feels like an outage to the client team. Every throttled request is counted per client and per service, and both the client team and the owning team see it on a shared dashboard: current usage against quota, throttled requests, and trends. Client teams get an alert when they reach 80 percent of their quota, before they are throttled, and responses carry headers with the remaining allowance.

Visibility also changes behaviour. When the marketing team sees that their export uses 40 percent of the profile service's capacity for a report run once a week, they are usually happy to move it to a replica. Data starts the conversation that a policy never would.

Step throughRolling out internal quotas
  1. Pick the most contended shared servicesstart with two or three
  2. Measure usage per clientdashboards before any limit
  3. Agree quotas and traffic classesowner and client teams, versioned config
  4. Enforce in report-only modelog what would be throttled for two weeks
  5. Turn on enforcementgateway or mesh, alerts at 80 percent
  6. Review quarterly or on changecapacity, launches, new clients

6 steps in order. Play them, or step through them one at a time.

6Rolling Out and Reviewing

I would roll out in stages to avoid surprising anyone. First measure: dashboards of per-client usage for the chosen services. Then agree quotas. Then enforce in report-only mode for a couple of weeks, logging what would have been throttled, so teams can fix their clients before any request fails. Only then turn on enforcement, starting with batch clients, which are the main cause and the least sensitive to throttling.

Quotas age quickly. Capacity changes when the owner optimises or scales the service, and demand changes with launches, new clients and seasonal peaks. So I would review the table every quarter and whenever a launch or capacity change is planned, as part of the normal launch checklist. A quota that nobody has reviewed for a year is either blocking someone or protecting nothing.

7Follow-up questions

What if a team needs more than its quota for a launch next week?

They request a temporary increase through the same configuration repository, with an end date. If the headroom covers it, the owner approves it quickly. If not, the two teams decide together whether to add capacity, reduce the launch's load with caching or batching, or stage the launch. The point of the process is that this conversation happens a week before, not during an incident.

Should quotas be enforced strictly at exactly the agreed number?

Usually with a small burst allowance, because real traffic is uneven and strict limits at 6,000 per second would reject harmless spikes. A token bucket with a capacity of a few seconds' worth of quota handles that. What matters is that sustained overuse is stopped, and that the total of all quotas plus headroom matches what the service can really serve.

8Conclusion

In this answer, we saw that internal overload comes from missing agreements and missing information as much as from missing throttles. We agreed per-client quotas between owner and client teams, enforced them in a gateway or service mesh rather than in each service, separated interactive and batch traffic, made usage and throttling visible to both sides, rolled out in report-only mode first, and reviewed quotas whenever capacity or demand changed.

What to say in the interviewAbout 90 seconds aloud

Open with

I would treat this as an agreement problem first and a technical problem second. For the shared services that get overloaded most, I would ask the owning team to publish its tested capacity and each client team to state its normal and peak demand, and then agree a quota per client, keeping some headroom unallocated.

Then, if they want more

That table lives in a versioned config repository, so changes are reviewed like code and both sides can see them. For enforcement, I would not let every team build its own limiter.

I would put it in the gateway or the service mesh, identifying callers by their service identity, so limits apply per client service and are driven by that same config. I would also separate interactive and batch traffic, because a user waiting on checkout matters more than a nightly export.

Batch jobs get their own lower quotas during the day, should back off on 429, and ideally use bulk APIs or a replica. Visibility is essential: shared dashboards of usage against quota and throttled requests for both teams, and alerts at 80 percent so clients are warned before they are throttled.

I would roll this out gradually, starting with measurement, then report-only mode for a couple of weeks, then enforcement starting with batch clients. And since capacity and demand keep changing, quotas get reviewed quarterly and as part of every launch checklist.

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 official documentation for the version you use. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
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 "Internal services in your organisation regularly overload each other with batch jobs and...": https://scrivio-interview-library.netlify.app/spring-boot/scalability/9076c71eb1/