Quick revision
The short answer
The platform should not let each team pick a server by taste. Every extra server type adds its own tuning knowledge, security patches, dashboards and configuration properties, so the sensible standard is one default per stack, Tomcat for Spring MVC and Reactor Netty for WebFlux, with exceptions allowed when a team shows a measured need and accepts the cost of owning it.
What to remember
In this answer, we saw that changing the embedded server is cheap for one team and expensive for the organisation, because each server type brings its own tuning knowledge, patches, dashboards and configuration properties. The standard is one default per stack, Tomcat for MVC and Reactor Netty for WebFlux, set in the platform starter, with exceptions granted for a measured need and an owner who carries the extra cost.
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.
The platform should not let each team pick a server by taste. Every extra server type adds its own tuning knowledge, security patches, dashboards and configuration properties, so the sensible standard is one default per stack, Tomcat for Spring MVC and Reactor Netty for WebFlux, with exceptions allowed when a team shows a measured need and accepts the cost of owning it.
Why this question is asked
Spring Boot makes swapping the embedded server look free: we exclude one starter, add another, and the application starts. Because it is so easy, a large organisation can end up with four servers in production without anyone ever deciding it. Interviewers ask this at senior level to see whether we can weigh developer freedom against the long-term cost of running many kinds of software. In this answer, we will recap what the embedded server does, count what each extra server really costs, look at how differently each server is configured, and then set a standard with a clear way to ask for an exception.
1A Quick Recap of Embedded Servers in Spring Boot
An embedded server is the HTTP server that runs inside our application's own JVM. Instead of deploying a WAR file into a separately installed Tomcat, the application starts the server itself when it boots, and the server is just another library on the classpath.
Spring Boot picks the server from the starter we use. spring-boot-starter-web brings Tomcat, and spring-boot-starter-webflux brings Reactor Netty, an event-loop server built for non-blocking code. Jetty is the other supported option for both stacks. Undertow was supported in Boot 3, but Boot 4 removed it, which is itself a lesson for this question.
Switching is a dependency change. So the technical barrier is close to zero, and the real cost appears later, in operations.
2What Each Extra Server Really Costs
Suppose we run 120 services and teams choose freely. A year later we have 80 on Tomcat, 25 on Netty, 10 on Jetty and 5 on Undertow. Each of those four servers now needs someone who knows how its thread pools, connection limits and timeouts behave under load. When an incident happens at 2 a.m., the on-call engineer has to know which kind of server they are looking at before they can even read the thread dump.
Security patches multiply in the same way. When a vulnerability is published for one server, the platform team must find every service using it, check the fixed version, and push upgrades. With one server per stack, there is one advisory feed to watch and one upgrade campaign to run. With four, there are four feeds and four campaigns, and the rare server is the one most likely to be forgotten.
Dashboards and alerts are the third cost. Tomcat publishes metrics such as tomcat.threads.busy, Jetty and Netty publish different names and different meanings. A shared dashboard that shows thread saturation for every service only works if the services expose the same metrics. So each new server type means new panels, new alert rules and new runbooks.
| Area | One server per stack | Free choice |
|---|---|---|
| Tuning knowledge | One set of limits and defaults to learn | Each team learns its own; on-call must know all |
| Security patches | One advisory feed, one upgrade campaign | One per server; rare servers get forgotten |
| Dashboards and alerts | Shared panels for every service | Separate metric names and panels per server |
| Platform starter | One set of tested defaults | Defaults written and tested per server |
| Framework support | Defaults stay supported longest | Less common servers can be dropped |
3Why Configuration Standards Must Be Written Per Server
Spring Boot offers common properties such as server.port and server.shutdown, but the settings that matter most under load are specific to each server. That is why a single standard cannot cover all of them.
Notice that the same idea, such as limiting connections or threads, has different names and sometimes no equivalent at all. Netty does not have a request thread pool to size, because a few event-loop threads serve every connection. So if we allow three servers, our platform starter needs three tested sets of defaults, and our tuning guide needs three chapters. Every time we change a standard, such as a new idle timeout, we change it three times.
4The Standard: One Default per Stack
The rule I would set is simple to remember. Servlet services built on Spring MVC use Tomcat, the Boot default. Reactive services built on WebFlux use Reactor Netty, also the Boot default. The platform starter carries tested settings for exactly those two, and dashboards, alerts and runbooks are written for exactly those two.
Choosing the defaults has a reason beyond convenience. The default is what the Spring team tests most, what most users run, and what the documentation and community answers describe. It is also the option least likely to be removed in a future major version. We saw this with Undertow in Boot 4: teams that chose it for small gains had to migrate.
5How a Team Asks for an Exception
Freedom should not disappear completely, because there are real cases for another server. A team might need a feature only Jetty offers in their setup, or a load test might show that a specific workload performs measurably better elsewhere. The test is whether the reason is measured, not preferred.
So the exception process asks for three things: the requirement that the default cannot meet, a load test or feature comparison that shows it, and a named owner who will keep the configuration, dashboards and patching for that server up to date. The exception is recorded in the service catalogue and reviewed once a year, so it does not quietly outlive its reason.
- Team asks for a non-default server
- Is there a feature or performance need?YesCollect the evidenceNoUse the default server
- Does a load test or comparison show it?YesName an owner for the serverNoUse the default server
- Record the exceptionservice catalogue, review yearly
- Owner keeps settings, patches and dashboards
5 steps in order. Play them, or step through them one at a time.
6Follow-up questions
Is Jetty or Undertow faster than Tomcat?
For most business services the difference is small compared with database calls, serialization and network time. A server can win a microbenchmark and make no visible difference to a service whose requests spend 40 milliseconds waiting for PostgreSQL. That is why the standard asks for a load test of the actual service rather than a published benchmark.
What about a service that mixes MVC and WebFlux?
If both starters are on the classpath, Spring Boot configures Spring MVC on the servlet server and uses WebClient only as a client. That is a common and supported setup, and it stays on Tomcat. A service only moves to Netty when it is truly a WebFlux application.
How would you enforce the standard without blocking teams?
Put the defaults in the platform starter so that doing nothing gives the standard, and add a build or deploy check that flags a non-default server without a recorded exception. A warning first, then a failure after a grace period, gives teams time to respond.
7Conclusion
In this answer, we saw that changing the embedded server is cheap for one team and expensive for the organisation, because each server type brings its own tuning knowledge, patches, dashboards and configuration properties. The standard is one default per stack, Tomcat for MVC and Reactor Netty for WebFlux, set in the platform starter, with exceptions granted for a measured need and an owner who carries the extra cost.
Open with
I would not allow free choice, but I would allow justified exceptions. The reason is that every extra server type multiplies operational work. Each one has its own thread model and limits that someone must understand during an incident, its own security advisories and upgrade campaigns, and its own metrics, so our shared dashboards and alerts stop working the same way everywhere.
Then, if they want more
Configuration is different too: Tomcat has threads.max, max-connections and accept-count, Jetty has other names, and Netty has no request thread pool at all, so every standard has to be written and tested per server.
My standard would be one default per stack: Tomcat for Spring MVC and Reactor Netty for WebFlux, which are the Boot defaults, the best tested and the least likely to be dropped. We saw that risk when Boot 4 removed Undertow. The platform starter would carry tuned settings for those two.
If a team needs something else, they bring a measured reason, such as a feature requirement or a load test of their own service, and they name an owner who keeps the settings, patches and dashboards for that server. We record the exception and review it yearly.
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.
- 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 "Teams want to choose their own embedded servers: some Tomcat, some Jetty, some Netty....": https://scrivio-interview-library.netlify.app/spring-boot/embedded-servers/238a89a90f/