Scrivio Interview library
LeadershipPrincipal6 min read · updated 12 November 2026

Boot 4 drops support for an embedded server that some of your services use. What does this teach about choosing less common components, and how would you plan the change?

Boot 4 removed Undertow, and the lesson is that less common components carry a higher risk of being dropped, so we should prefer the defaults unless we have a measured need. The migration itself is a planned project: read the Boot 4 release notes for exactly what was removed, map each server-specific setting to the new server, keep server-specific code to a minimum, and prove the change with load tests before production.

Why this question is asked

Most of us have chosen a component because it looked a little faster or a little lighter, and moved on. Years later the framework drops it and the choice comes back as unplanned work across many services. Interviewers ask this at the most senior level because it tests two things at once: whether we learn the general lesson about choosing components, and whether we can turn a forced change into a calm, measured migration. In this answer, we will look at why less common options get dropped, what that teaches about choosing, and then plan the move off a removed server step by step.

1What Changed in Boot 4

Spring Boot 4 is built on Spring Framework 7 and Jakarta EE 11, which uses Servlet 6.1. Undertow did not keep up with that Servlet version in time, and Boot 4 removed its Undertow support, the starter and the server.undertow properties. So services that ran on Undertow must move to Tomcat or Jetty before they can upgrade. The exact list of what was removed and what replaces it belongs in the Boot 4 release notes and migration guide, and the first step of any plan is to read them rather than rely on memory.

This was not a surprise to anyone watching closely. Undertow was the least used of the servers Boot supported, and its release activity had slowed. That pattern is the warning sign we should learn to see early.

2Why Less Common Options Get Dropped

A framework team supports a component only as long as the cost is worth it. Every supported server must be tested against every new Servlet version, every new Java version and every security fix. When few users depend on one option, the cost per user is high, and when the upstream project slows down, the cost rises further. So the least used option is always the first candidate for removal.

The default component has the opposite profile. Most users run it, the framework's own tests exercise it, and problems are found and fixed by thousands of other teams before they reach us. When we pick the default we share the maintenance with the whole community. When we pick a rare option we take on more of it ourselves, and one day we may take on all of it.

Default versus less common components
QuestionDefault (Tomcat)Less common (Undertow)
How many users find bugs first?Most Boot usersA small share
Tested in every framework release?Yes, firstYes until it is dropped
Upstream activityActive, regular releasesSlower releases
Cost of leaving laterRarely neededMigration across every service using it

3The Lesson for Choosing Components

The rule I take from this is to prefer the default unless there is a measured need. A measured need is a requirement we can show: a feature the default lacks, or a load test of our own service where the alternative wins by a margin that matters. A benchmark someone else published, or a feeling that one server is lighter, is not enough.

When we do choose a rare component, we should write down why and what would make us leave it, and watch its health: release frequency, open security issues, and whether the framework still lists it as supported. Then removal is a decision we saw coming, not an emergency.

4Planning the Migration Step by Step

With 30 services on Undertow, I would run the migration as one project with one owner, not 30 separate surprises. The steps follow the order in which risk is removed.

Step throughMoving services off a removed server
  1. Read the Boot 4 release noteswhat was removed, what replaces it
  2. Inventory every service and its server settingsproperties, customizers, handlers
  3. Map each setting to the new serveror record that it has no equivalent
  4. Move one pilot servicestill on Boot 3, change only the server
  5. Does the load test match the old baseline?
    YesRoll out to the restNoTune and test again
  6. Upgrade to Boot 4 as a separate step

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

Notice that the server change and the Boot 4 upgrade are separate steps. Boot 3.5 still supports both Undertow and Tomcat, so we can switch the server first while everything else stays the same. If latency changes, we know the server caused it. Doing both at once would leave us guessing.

5Mapping Server-Specific Settings

The inventory usually finds two kinds of server-specific code: properties and customizers. Properties map by meaning, not by name, and a few have no direct equivalent.

Java
# Before (Boot 3, Undertow)
server.undertow.threads.io=8
server.undertow.threads.worker=64
server.undertow.max-http-post-size=10MB
# After (Tomcat): same intent, different model
server.tomcat.threads.max=64 # worker threads that run our code
server.tomcat.max-swallow-size=10MB # how much of an oversized body Tomcat reads; check the exact meaning
spring.servlet.multipart.max-request-size=10MB # upload limit, set by Spring, works on any server
# Undertow's io threads have no Tomcat property: Tomcat manages its acceptor and poller itself

The reason we map by intent is that the thread models differ. Undertow had a small pool of I/O threads plus a worker pool, while Tomcat has one worker pool and manages its own I/O threads. A literal copy of the numbers can be wrong, which is exactly why the load test is part of the plan.

Customizers are the second kind. A WebServerFactoryCustomizer<UndertowServletWebServerFactory> will no longer compile on Boot 4. This is where the advice to keep server-specific code to a minimum pays off: a service that configured everything through standard properties needs almost no code change, while one that registered Undertow handlers needs a rewrite. Going forward, I would put any remaining server customization in the platform starter, so it exists in one place.

6Proving the Change With Load Tests

Before the switch, we record a baseline for the pilot service: p50, p95 and p99 latency, throughput at the target load, error rate and memory. After the switch, we run the same test with the same data. The goal is not that Tomcat is faster, but that nothing got worse in a way users would notice. If p99 rises from 180 to 260 milliseconds, we look at thread and connection settings before rolling out further. Once the pilot matches, the remaining services move in batches with the same before-and-after comparison.

7Follow-up questions

Should we stop using any component that is not the default?

No. Sometimes the alternative is the right choice, for example Reactor Netty is the default only for WebFlux. The point is to choose rare options on purpose, with a recorded reason and someone watching their health, so that removal is expected and cheap.

Why not stay on Boot 3 and keep Undertow?

That buys time, but only until Boot 3 stops receiving open-source support. After that, security fixes stop or cost money, and the migration becomes more urgent, not less. It is better to schedule the server change while Boot 3.5 still supports both servers.

How do you keep server-specific code to a minimum in practice?

Configure the server through standard Boot properties wherever possible, avoid server APIs such as Undertow handlers or Tomcat valves in business code, and put any unavoidable customizer in a shared starter. Then a server change touches one library instead of every service.

8Conclusion

In this answer, we saw that Boot 4 dropping Undertow is an example of a general rule: less common components carry a higher risk of being removed, so we prefer defaults unless we have a measured need. We planned the migration as one project: read the release notes, inventory and map server settings by intent, switch the server before the Boot upgrade, keep server-specific code minimal, and prove each step against a load-test baseline.

What to say in the interviewAbout 80 seconds aloud

Open with

The first thing it teaches me is that less common components carry a higher risk of being dropped. A framework keeps a component only while enough people use it to justify testing it against every new Servlet and Java version, and Undertow was the least used server, with slowing upstream activity.

Then, if they want more

So my rule is to prefer the default unless there is a measured need, such as a missing feature or a load test of our own service, and to record why we chose anything else. For the change itself, I would start by reading the Boot 4 release notes for exactly what was removed and what replaces it.

Then I would inventory every service on Undertow with its server properties and customizers, and map each setting to Tomcat by intent, because the thread models differ: Undertow's io threads, for example, have no direct Tomcat property.

I would switch one pilot service while still on Boot 3.5, so the server is the only change, and compare p95 and p99 latency, throughput and errors against a baseline. Once it matches, the rest move in batches, and the Boot 4 upgrade comes as a separate step.

Going forward I would keep server-specific code in the platform starter, so the next change touches one place.

About this answer

Last updated
12 November 2026
Versions it names
Jakarta EE 11, Spring Boot 4, 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
Spring Boot reference
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 "Boot 4 drops support for an embedded server that some of your services use. What does...": https://scrivio-interview-library.netlify.app/spring-boot/embedded-servers/95a76ad5e9/