Run Spring Boot Actuator on a separate port (management.server.port)
Codemia Knowledge Hub ·
Spring Boot has no built-in "actuator thread pool" setting for web endpoints served on the same port as your application. To isolate Actuator traffic, serve it on a separate management port with management.server.port, which gives the management endpoints their own web server context and request handling.
What handles Actuator requests
Actuator web endpoints are ordinary HTTP endpoints exposed through the application's web stack:
- in a servlet app, the embedded container handles them
- in a reactive app, the reactive server infrastructure handles them
- they do not get a dedicated executor just because they are Actuator endpoints
On a shared port, Actuator and the application share the same request handling path. Tuning Tomcat, Jetty, Undertow or Netty affects the whole web server, not only Actuator.
Setting a separate management port
With this setup:
- application traffic is served on port
8080 - Actuator traffic is served on port
8081 - the management context is separate from the main server context
This keeps health checks, metrics scrapes and admin calls from competing directly with user-facing traffic on the same listener. To restrict access further, bind the management server to a private address:
That suits setups where only a reverse proxy, sidecar or local monitoring agent should reach the endpoints.
What a separate port does and does not give you
It gives you:
- independent network routing
- different firewall or proxy rules
- different connection handling infrastructure
- less contention with public request traffic
It does not create an internal worker pool for each Actuator operation. The benefit is separation at the web server level.
Often the real problem is not thread pools at all but high-frequency monitoring calls such as /actuator/health or /actuator/prometheus competing with application traffic. A separate management port plus reverse proxy or network controls fixes that more cleanly than trying to route specific endpoints to specific threads inside one listener.
Staying on one port
If Actuator and the application must share a port, no out-of-the-box property says "use this executor only for /actuator/**". Your options are server-wide tuning and endpoint design:
- tune the container thread pool for the whole app
- make expensive health checks fast or cached
- avoid synchronous remote calls inside custom Actuator endpoints
- push long-running inspection work into background tasks
Expensive remote checks placed directly in health indicators, without caching or time limits, are a common cause of slow Actuator responses.
Offloading expensive custom work to your own executor
If a custom health indicator or endpoint does expensive work, you can run that work on your own executor. This does not change the HTTP connector pool, but it keeps the expensive logic off the request thread's own code path.
A custom component can then use it:
The limitation: the incoming HTTP request still enters through the management web server. The custom executor isolates only the internal work you choose to offload, not the entire request path.
Related reading
- Spring boot applications consume 100 CPU at startup
- Spring Boot REST API - request timeout?
- Spring boot taking long time to start
- Spring CrudRepository findByInventoryIds(List<Long> inventoryIdList) - equivalent to IN clause
- Spring Boot Actuator without Spring Boot
- Spring Boot Adding Http Request Interceptors
- Spring Hibernate Query Plan Cache Memory usage
- Spring Webflux vs Vert.x
System design interview problems on this topic
- Design an API Rate Limiter: solution and walkthrough
- Design a Distributed Messaging System: solution and walkthrough
- Design an Online Payment Service: solution and walkthrough
- Design a Key Value Store: solution and walkthrough

DSA Fundamentals
Master algorithmic patterns and data structures through hands-on LeetCode-style problems - from arrays and hashing to dynamic programming and advanced graphs.
View the courseData Structures & Algorithms practice on Codemia
Step through 300+ coding interview problems with animated visualisers that show the data structure changing as the code runs. The Blind 75 are free.