Scrivio Interview library
LeadershipPrincipal6 min read · updated 12 November 2026

Concurrency limits moved from thread pool sizes to semaphores and now to adaptive limits that adjust from observed latency. What long-term stance would you take on static versus adaptive concurrency limits for your services?

Static limits are simple and predictable but drift out of date as traffic, hardware and dependencies change; adaptive limits adjust themselves from observed latency, much like TCP congestion control, but are harder to reason about and to debug. My stance is to start every service with static limits based on measured capacity, add adaptive limits only for dependencies whose capacity really varies, expose the current limit and rejections as metrics whatever the method, and review the approach as traffic patterns and the platform change.

Why this question is asked

Concurrency limits used to be implicit, set by the size of a thread pool. Then they became explicit, a semaphore with a configured number. Now libraries can compute them on the fly. Each step moved control from an accident to a decision, and each brought new questions about who owns the number and how anyone knows it is right. Interviewers at this level want to hear a stance that a whole organisation can follow for years, with the reasoning behind it. In this answer, we will recap what a concurrency limit is, look at how static and adaptive limits each behave, walk through an example where they differ, and then set out the stance and how to keep it honest.

1A Quick Recap of Concurrency Limits

A concurrency limit caps how many requests are in progress at once, either requests a service accepts or calls it makes to a dependency. It protects against overload: past a certain point, adding more concurrent work does not raise throughput, it only raises latency, because requests wait on the same CPU, connections or locks. Little's law ties the numbers together: in-flight requests equal the arrival rate times the average time each takes. A service that handles 1,000 requests per second at 40 milliseconds has about 40 in flight; letting 400 in does not make it ten times faster, it makes each request about ten times slower.

2Static Limits: Simple, Predictable, and Slowly Wrong

A static limit is a number we choose, such as max-concurrent-calls: 60. It is easy to understand, easy to review and behaves the same way every time, which is valuable during an incident: if calls are rejected, we know exactly why. It is also easy to test in a load test.

The cost is that the number is only right for the conditions it was measured under. The dependency gets a faster database and could take 120, but we still cap at 60 and reject traffic for no reason. Or a noisy neighbour halves its capacity on Tuesday mornings, and 60 is now enough to overload it. Static limits do not fail loudly; they become quietly wrong, and nobody notices until the next incident or the next load test.

3Adaptive Limits: Borrowing From TCP

An adaptive limit treats the dependency like a network link. TCP does not know a link's capacity in advance; it increases its sending window while things go well and cuts it back when it sees packet loss or rising delay. Adaptive concurrency limiters do the same with latency: they track the minimum or typical latency of calls, and when latency rises above that baseline, which means requests are starting to queue somewhere, they reduce the limit; when latency stays near the baseline, they slowly raise it. Netflix's open-source concurrency-limits library offers algorithms such as AIMD (additive increase, multiplicative decrease), Vegas and Gradient that work this way.

The benefit is that the limit follows reality. When the dependency gets faster, more calls are allowed; when it slows down, we back off before it falls over. The costs are of a different kind. The current limit is no longer a number anyone chose, so explaining why 30 percent of calls were rejected at 10:42 means reading algorithm state. Latency is a noisy signal: a slow downstream call caused by one big request can look like overload. And the algorithms have their own parameters, which teams tend to copy without understanding.

Static and adaptive limits
AspectStatic limitAdaptive limit
Where the number comes frommeasured once, set in configcomputed continuously from latency
When capacity riseskeeps rejecting needlesslyraises the limit over time
When capacity dropsmay still overload the dependencybacks off early
Explaining a rejectionthe limit was 60read the algorithm's state at that time
Failure modequietly out of dateoscillates or reacts to noise
Effort to adoptlowtuning, testing, team education

4An Example Where They Differ

Imagine a search dependency that serves 800 requests per second at 25 milliseconds during the day, about 20 in flight, and our static limit is 40. At night a reindexing job runs on the same cluster, and its capacity drops by half: at 40 concurrent calls its latency climbs from 25 to 200 milliseconds, our callers' 500 millisecond timeouts start firing, and retries add even more load. The static limit never noticed.

An adaptive limiter would have seen latency rise above the 25 millisecond baseline within seconds and cut the limit toward 20, rejecting some calls quickly instead of letting all of them become slow. When reindexing ended, it would have raised the limit again. That is the case where adaptive limits earn their complexity: a dependency whose capacity changes in ways we do not control. For a dependency that is stable, such as a well-provisioned internal service, the static limit gives the same protection with none of the extra reasoning.

5The Stance I Would Take

Start with static limits everywhere, sized from measured capacity, because they are the simplest thing that protects us and they force someone to measure. Add adaptive limits deliberately, for dependencies with variable capacity: shared clusters, third-party APIs with changing quotas, services under batch load. Each adoption comes with a note on why, which algorithm, and what the bounds are; I would always keep a static floor and ceiling around an adaptive limit, so it can never drop to zero or climb without limit.

Whatever the method, every limit is visible. The current limit, the number of in-flight calls and the rejection rate are metrics on the standard dashboard, so during an incident nobody has to guess. And the stance itself is reviewed, for example once a year or when the platform changes significantly, such as moving to virtual threads or a service mesh that offers its own adaptive concurrency, which may make a library-level limiter redundant.

Step throughChoosing a limit for a dependency
  1. Measure capacity under loadrequests per second at healthy latency
  2. Set a static limit from itLittle's law plus headroom
  3. Does capacity vary a lot over time?shared clusters, third-party quotas, batch load
    YesAdd an adaptive limit within a static floor and ceilingNoKeep the static limit
  4. Expose limit, in-flight and rejectionssame dashboard for every service
  5. Review on a schedule and after incidentsre-measure, re-decide

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

6Follow-up questions

Isn't adaptive always better, since it removes guesswork?

It removes one guess, the number, and adds others: the algorithm, its parameters and how it reacts to noisy latency. For stable dependencies those extra unknowns buy nothing. Adaptive limits are a tool for variable capacity, not a universal upgrade.

Where should adaptive limits run, client or server?

Both have a place. On the server, an adaptive limit protects the service itself from any mix of callers. On the client, it protects one dependency and lets each caller back off independently. Many organisations start on the server side for their most critical services, because one change protects against all callers.

How do you test an adaptive limiter?

With load tests that change the dependency's capacity during the run, for example by adding artificial latency or CPU pressure, and checking that the limit falls and recovers within an acceptable time without oscillating. A test at constant capacity tells us very little.

7Conclusion

In this answer, we saw that static limits are simple and predictable but drift out of date, while adaptive limits follow the dependency's real capacity using latency signals, as TCP congestion control does, at the cost of being harder to reason about. The stance is to start with static limits from measured capacity, add adaptive limits within static bounds for dependencies with variable capacity, expose the current limit, in-flight calls and rejections as metrics in every case, and review the approach as traffic and the platform change.

What to say in the interviewAbout 80 seconds aloud

Open with

I'd frame it as a trade-off between predictability and accuracy. A static limit, say 60 concurrent calls, is easy to understand, review and load test, and during an incident you know exactly why calls were rejected.

Then, if they want more

But it's only right for the conditions it was measured under, and it goes quietly wrong as traffic, hardware or the dependency changes. Adaptive limits work like TCP congestion control: they watch latency, and when it rises above the baseline they cut the limit, and when it stays low they raise it, using algorithms like AIMD or Gradient.

They follow reality, but the number is no longer something anyone chose, latency is a noisy signal, and they need tuning. So my stance is: static limits everywhere by default, sized from measured capacity with Little's law, because that forces measurement and is the simplest thing that protects us.

Adaptive limits only for dependencies whose capacity genuinely varies, like a shared search cluster that halves its capacity during reindexing, and always inside a static floor and ceiling. Whatever the method, the current limit, in-flight calls and rejections are on the standard dashboard.

And I'd revisit the stance regularly, especially when the platform changes, like a move to virtual threads or a mesh that offers its own limits.

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.
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 "Concurrency limits moved from thread pool sizes to semaphores and now to adaptive limits...": https://scrivio-interview-library.netlify.app/java/synchronizers/7c404ed759/