Quick revision
The short answer
For hundreds of services I would not build a full internal HTTP client SDK by default. An SDK can enforce timeouts, retries, auth and tracing in one place, but it becomes a framework that needs a funded team, releases and migration support for a decade, and its hidden behaviour causes incidents. A middle path usually wins: adopt the standard clients, ship thin configuration starters per framework, and move transport concerns such as mTLS and connection retries into a service mesh, deciding with cost estimates, incident history and a named long-term owner.
What to remember
In this answer, we treated the SDK question as a build-versus-adopt decision. An internal SDK centralises timeouts, retries, auth and tracing, but it turns into a framework with a team, releases and migrations, and its hidden behaviour causes its own incidents. Adopting standard clients with shared configuration keeps skills portable at lower cost, and the middle path of thin starters per framework plus a service mesh for transport concerns gives most of the benefit. We decide with incident data, ten-year cost estimates, a pilot, and a clear answer to who owns it.
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.
For hundreds of services I would not build a full internal HTTP client SDK by default. An SDK can enforce timeouts, retries, auth and tracing in one place, but it becomes a framework that needs a funded team, releases and migration support for a decade, and its hidden behaviour causes incidents. A middle path usually wins: adopt the standard clients, ship thin configuration starters per framework, and move transport concerns such as mTLS and connection retries into a service mesh, deciding with cost estimates, incident history and a named long-term owner.
Why this question is asked
Build-versus-adopt questions are where senior engineers earn their title, because both answers sound reasonable and both have failed at real companies. The interviewer wants to hear how we reason: what problem the SDK would solve, what it would cost over its whole life, what goes wrong when it exists, and what evidence would change our mind. In this answer, we will state the problem honestly, weigh the case for an SDK, the case for adopting standard clients, look at the hidden behaviour risk, describe the middle path, and finish with how we would actually decide and who owns the result.
1What Problem Are We Solving?
Before choosing, we name the problem in measurable terms. Suppose an incident review over the last year shows 14 outages caused by client behaviour: 6 from missing timeouts, 4 from retry storms, 2 from lost trace context that slowed diagnosis, and 2 from a token being passed to the wrong service. Those are behaviour problems, and they are the real target. MicroProfile Rest Client, Spring HTTP interfaces and the JAX-RS client are all capable libraries; none of those 14 incidents happened because a library was missing a feature.
Framing it this way matters, because an SDK proposal often arrives framed as a technology wish. The question for leadership is which option removes those 14 incidents per year at the lowest total cost.
2The Case for an Internal SDK
An internal SDK puts every rule in one place. Timeouts, retries with backoff, auth token handling, tracing and metrics are implemented once, tested once, and every team inherits them by upgrading a dependency. When a security fix is needed, one release fixes everyone, at least in theory.
But the SDK is not a library; it becomes a framework. It needs a team of perhaps 3 to 5 engineers, a release process, compatibility guarantees, adapters for every framework we run (Jakarta, Quarkus, Spring with its own HTTP stack), documentation, and migration support every time one of those frameworks makes a major change, such as the javax to jakarta move or Spring Framework 7. Over ten years at a loaded cost of around 200,000 per engineer per year, 4 engineers is 8 million, before counting the time 300 services spend upgrading it.
3Hidden Behaviour Is the Real Risk
The more an SDK does for teams, the less they understand what it does. A common incident goes like this: the SDK retries 3 times by default, a team wraps its call in its own retry of 3, the mesh retries twice, and a downstream service that slowed down receives 18 times the normal load. Another: the SDK's pool is 20 connections per host, a high-traffic service never knew it had a pool, and it fails under a sale.
Standard libraries have the same knobs, but their behaviour is documented publicly, discussed on the internet, and familiar to the engineers we hire. Skills stay portable: an engineer who knows Spring RestClient is productive on day one, while an engineer who knows our SDK knows something no other company uses.
4The Middle Path: Thin Starters Plus a Mesh
The option I usually recommend splits the concerns by where they are best handled. Transport concerns, the ones that do not depend on what a request means, go to the service mesh or the platform: mTLS between services, connection-level retries and outlier detection, and connect timeouts. Request concerns, the ones that need application knowledge, stay in the standard client of each framework, configured by a thin starter that the platform team owns: read timeouts, idempotent retries, tracing, token propagation and metric names.
A thin starter is a few hundred lines of configuration, not a client. It configures RestClient.Builder for Spring and MicroProfile Rest Client properties and providers for Jakarta and Quarkus, so it adds no new API to learn. Its cost is perhaps half an engineer, and when a framework moves, the starter is small enough to update in days.
| Option | Ten-year cost | Main risk | Skill portability |
|---|---|---|---|
| Internal SDK | high: 3-5 engineers plus every upgrade | hidden behaviour, framework lock-in | low |
| Standard clients, no shared config | low upfront, high in incidents | inconsistent timeouts and retries | high |
| Standard clients + thin starters + mesh | medium-low: about half an engineer | two layers must not both retry | high |
5How We Decide and Who Owns It
We decide with evidence, written down in a decision record. The inputs are the incident history mapped to causes, a cost estimate for each option over ten years including the upgrade work pushed onto teams, the number of frameworks and languages we must support, and a pilot: put the starter and mesh policy into 10 services for a quarter and measure whether the timeout and retry incidents in those services drop.
The last question is often the decisive one: who will own this for ten years? If nobody will commit a funded team for the life of an SDK, we should not build one, because an unowned SDK becomes the legacy dependency that blocks every framework upgrade. An SDK can still be the right answer, for example when we must enforce a complex proprietary auth protocol across many languages, but then it is funded as a product with a roadmap, not built as a side project.
- Map incidents to causesbehaviour, not library features
- Can configuration of standard clients fix them?YesThin starters plus meshNoConsider an SDK
- Is there a funded owner for ten years?YesBuild the SDK as a productNoDo not build it
- Pilot on 10 services, measure incidentsthen roll out or revisit
4 steps in order. Play them, or step through them one at a time.
6Follow-up questions
What would make you choose to build the SDK?
A requirement that configuration cannot express and that must behave identically everywhere, such as a custom request-signing protocol required by a regulator, combined with a team that will own it. Even then I would keep the SDK as thin as possible, wrapping standard clients instead of replacing them.
How do you stop the mesh and the client both retrying?
We make it a written rule: the mesh retries only connection failures that never reached the application, and the client retries only idempotent requests that failed with specific statuses. The starter sets those defaults, and the behaviour tests check that a single failed request produces at most the agreed number of attempts.
How do you convince teams to adopt the starter?
By making it the easiest path. New service templates include it, it removes configuration they would otherwise write, and its dashboards work out of the box. Mandates come last, for the riskiest gap, such as clients with no timeout.
7Conclusion
In this answer, we treated the SDK question as a build-versus-adopt decision. An internal SDK centralises timeouts, retries, auth and tracing, but it turns into a framework with a team, releases and migrations, and its hidden behaviour causes its own incidents. Adopting standard clients with shared configuration keeps skills portable at lower cost, and the middle path of thin starters per framework plus a service mesh for transport concerns gives most of the benefit. We decide with incident data, ten-year cost estimates, a pilot, and a clear answer to who owns it.
Open with
I would start by asking what problem we are solving, and I would look at the incident history. In my experience the failures come from behaviour, missing timeouts, retry storms, lost trace context, not from the libraries lacking features.
Then, if they want more
An internal SDK can fix that in one place, but it turns into a framework: it needs a team of several engineers, releases, adapters for every framework we run, and migration help every time Jakarta or Spring has a major release, and that cost runs for ten years.
It also hides behaviour, and hidden retries and pools cause incidents when teams do not know they are there. Standard clients like Spring RestClient and MicroProfile Rest Client keep skills portable.
So my default recommendation is the middle path: thin configuration starters per framework that set timeouts, idempotent retries, tracing, token propagation and metrics, and a service mesh for transport concerns like mTLS and connection retries, with a clear rule about which layer retries.
I would write a decision record with cost estimates, pilot it on a few services and measure incidents, and I would only build an SDK if there is a requirement configuration cannot meet and a funded owner for its whole life.
About this answer
- Last updated
- 12 November 2026
- Versions it names
- Spring Framework 7
- 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
- Jakarta EE specifications
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 "MicroProfile Rest Client, Spring HTTP interfaces and the JAX-RS client all offer...": https://scrivio-interview-library.netlify.app/java/jax-rs/2432f7b713/