Scrivio Interview library
LeadershipAdvanced6 min read · updated 12 November 2026

Teams call internal services with five different HTTP client libraries, each with different defaults. Do you standardise on one, and how do you sequence the change across the organisation?

Yes, I would standardise, on one or at most two clients, with a shared configuration library that sets timeouts, retries, TLS and tracing the same way everywhere. The choice rests on the features we need, maintenance status and framework integration, for example Spring's RestClient over a chosen engine. The sequence is new code first, then the services whose incidents were linked to client settings, while stable code is not forced to rewrite without benefit; unsupported clients get an end date. We measure success by fewer timeout and connection incidents.

Why this question is asked

Five HTTP client libraries with five sets of defaults means five different ways to fail. One team's client never times out, another retries every POST, a third logs tokens, and each incident review discovers a new default. Standardising sounds obvious, but forcing dozens of teams to rewrite working code is expensive and breeds resentment. Interviewers ask this leadership question to see whether we can make a clear technical decision and then sequence the change so it pays off early without disrupting everyone. In this answer, we will look at the cost of the current situation, decide what to standardise, choose the client, sequence the migration, handle the stable code and the end dates, and define how we measure success.

1What Five Clients Really Cost

The cost is not the libraries themselves; each of them works. It is that every library comes with its own defaults and its own way of configuring them, so behaviour under failure differs from service to service. When a downstream slows down, one service fails fast, another hangs for minutes because its read timeout is infinite, and a third doubles the load with retries. Each team learns its client's traps separately, monitoring dashboards differ, and security fixes such as TLS changes must be made five times in five ways.

Before deciding anything, we gather evidence: which clients are used by which services, with which settings, and which incidents in the past year involved client behaviour, such as timeouts, pool exhaustion, retry storms or certificate problems. That evidence makes the case for the change and tells us where to start.

2What We Standardise

The decision has two parts, and the second matters more. First, a short list of supported clients, ideally one, at most two, for example one blocking and one reactive. Second, a shared configuration library that every supported client uses, which sets explicit connect, read and pool acquisition timeouts, retries only for idempotent requests with backoff and jitter, central TLS and trust store settings, trace propagation, metrics and redacted logging. Without the shared configuration, standardising the client alone would still leave teams with different settings; with it, even two clients behave the same way.

3Choosing the Client

We choose on criteria, not taste. Features we need: per-host pool limits, the timeouts above, HTTP/2 where useful, proxy and mutual TLS support. Maintenance status: an active project with regular releases and security fixes, which rules out anything abandoned. Framework integration: most of our services are Spring Boot, so a client that plugs into Spring's observability and configuration saves the most work. Team familiarity matters too, because a client people already know is adopted faster.

Scoring the candidates (example)
CriterionRestClient + Apache 5JDK HttpClientOkHttp
Pool and timeout controlstronglimitedgood
Spring integration and observabilitybuilt invia Spring, fewer knobscustom work
Maintenanceactiveactive, with the JDKactive
Team familiarity herehighmediumlow
Decisionstandardallowed for small toolsphase out

In a mostly Spring company, this usually leads to Spring's RestClient as the standard API, on a single chosen engine such as Apache HttpClient 5 for its pool control, with WebClient allowed for reactive services. That is effectively one programming model with one engine and one configuration library, which is as close to a single standard as most organisations can get.

4Sequencing the Change

The order is chosen so that each step pays for itself. First, new code: from a set date, every new service and every new downstream integration uses the standard client through the shared library. This costs almost nothing, because the code is being written anyway, and stops the problem from growing. Second, services with incidents linked to client settings: these have the clearest benefit, and the incident history gives each team a concrete reason, not an order from above. Third, services that are being changed for other reasons migrate their client calls as part of that work.

Step throughMigration sequence
  1. Gather evidenceclient inventory, settings, incidents of the past year
  2. Decide and publishstandard client, shared config library, end dates
  3. New code uses the standardfrom a set date, enforced in review and templates
  4. Migrate incident-linked servicesclearest benefit first
  5. Migrate on touchservices changed for other reasons
  6. Unsupported clients reach end dateremaining uses removed or exempted

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

During all of this, the platform team does the heavy lifting: it provides the library, migration guides for each of the old clients with before-and-after code, and office hours. A typical migration of one service's clients should take days, not weeks, and if it does not, that is feedback on the library.

5Stable Code and End Dates

Not every service needs to move quickly. A stable service that has run for years without client-related problems gains little from a rewrite, and the rewrite itself carries risk. We do not force it to migrate early. Instead, we set an end date for unsupported clients, for example eighteen months away, after which they are no longer patched or allowed in builds, with the date chosen to fit normal maintenance cycles. Teams with a strong reason can request a time-limited exception.

Meanwhile, we can often reduce risk in those stable services without a rewrite by fixing their most dangerous settings in place, such as adding a read timeout where none exists. That captures much of the safety benefit cheaply.

6Measuring Success

The point of standardising is reliability, so that is what we measure. The main indicator is the number of incidents involving HTTP client behaviour, such as timeouts, hung threads, pool exhaustion and retry storms, per quarter, compared with the year before. Supporting numbers include the share of outbound calls made through the standard library, visible from its metrics, the number of services still on unsupported clients, and the time teams spend on client-related fixes. If incidents do not fall as adoption rises, we revisit the defaults rather than declaring victory on adoption alone.

7Follow-up questions

Why not allow every team to keep its preferred client if it uses the shared configuration?

Because a shared configuration library has to be written and tested for every client it supports, and each additional client multiplies that work and the chance of subtle differences. One or two clients keep the library small enough to be excellent.

What if a team has a real need the standard client cannot meet?

We treat it as input: either the shared library gains the feature, or the team gets a documented exception with an owner and a review date. Exceptions are healthy as long as they are visible and rare.

How do we stop new uses of the old clients?

Service templates include only the standard client, a build rule flags new dependencies on unsupported clients, and code review guidelines point to the library. After the end date, the build rule becomes blocking.

8Conclusion

In this answer, we decided to standardise on one or two HTTP clients, for example Spring's RestClient over a chosen engine, with a shared configuration library for timeouts, retries, TLS and tracing, chosen by needed features, maintenance status, framework integration and familiarity. We sequenced the change with new code first, then services with client-related incidents, then services touched for other reasons, without forcing rewrites of stable code, and set an end date for unsupported clients. Success is measured by fewer timeout and connection incidents.

What to say in the interviewAbout 100 seconds aloud

Open with

Yes, I would standardise, but the most important part is the shared configuration, not the library name. Five clients with five sets of defaults means different failure behaviour in every service: one never times out, one retries POSTs, one logs tokens.

Then, if they want more

So I would pick one, at most two, supported clients and build a shared configuration library that sets connect, read and pool acquisition timeouts, idempotent-only retries with backoff and jitter, central TLS and trust stores, and tracing and metrics the same way everywhere.

I would choose on criteria: the features we need, like per-host pool limits and timeouts, active maintenance, and framework integration. In a Spring shop that usually means RestClient over one engine like Apache HttpClient 5, with WebClient allowed for reactive services.

Before deciding I would gather evidence, an inventory of clients and settings plus last year's incidents involving client behaviour, because that makes the case. Then I sequence it so each step pays off. New code uses the standard from a set date, which is nearly free. Next, services whose incidents were linked to client settings, since they gain the most.

Then services migrate when they are touched for other reasons. I would not force rewrites of stable code without benefit; instead I set an end date for unsupported clients, maybe eighteen months out, and fix the most dangerous settings in place meanwhile. Success means fewer timeout and connection incidents, not just adoption numbers.

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 "Teams call internal services with five different HTTP client libraries, each with...": https://scrivio-interview-library.netlify.app/java/networking/b0efb63b57/