I am using undertow as embedded server with Spring Boot 2.0.1.

When I run the application, i see 2 warnings in the console as below,

[2018-05-06 16:36:39.621[0;39m [33m WARN [external-service,,,][0;39m [35m2736[0;39m [2m---[0;39m [2m[ main][0;39m [36mio.undertow.websockets.jsr [0;39m [2m:[0;39m UT026009: XNIO worker was not set on WebSocketDeploymentInfo, the default worker will be used

[2m2018-05-06 16:36:39.621[0;39m [33m WARN [external-service,,,][0;39m [35m2736[0;39m [2m---[0;39m [2m[ main][0;39m [36mio.undertow.websockets.jsr [0;39m [2m:[0;39m UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used](url)

I understand this means we can fine tune the settings and improve performance in production.

I am not able to find any information on how to do that when using undertow with spring boot.

Is there a way to customize it when using Spring Boot.

Comment From: mbhave

You can provide a WebServerFactoryCustomizer as mentioned in the docs.

Maybe we can improve this section by explicitly mentioning the specific variants for Tomcat, Undertow and Jetty.

Comment From: OrangeDog

The original issue (before the rename) is still unsolved. The UndertowServletWebServerFactory doesn't provide any way that I can see to customise the WebSocketDeploymentInfo.

Specifically you'd think the websocket buffer pool would be configured via server.undertow.buffer-size and server.undertow.direct (with similar adaptive defaults), but it's not.

Comment From: philwebb

@OrangeDog Take a look at UndertowWebSocketServletWebServerCustomizer. I think you can duplicate that code and register it as a bean named websocketServletWebServerCustomizer to take complete control.

the websocket buffer pool would be configured via server.undertow.buffer-size and server.undertow.direct (with similar adaptive defaults), but it's not

I'm not sure we can (or should) apply those properties to WebSocketDeploymentInfo since they feel like they're for different purposes. WebSocketDeploymentInfo also doesn't seem to offer a builder like the main Undertow class does so we're suck with calling setBuffers I guess.

I agree the current situation isn't very user friendly, if you want to open another issue with the kinds of customizations that you usually apply we can investigate how we could make them easier to do. Perhaps we should offer a WebSocketDeploymentInfoCustomizer callback.

Comment From: mbhave

I've created an issue to see if we can apply UndertowDeploymentInfoCustomizer beans automatically.

Comment From: OrangeDog

@philwebb I'm not using websockets at all so don't know what would be common customisations to autoconfigure. A WebSocketDeploymentInfoCustomizer sounds like a sensible idea.

Ideally I could just remove the websocket deployment entirely, but that seems to be even harder.