'Spring Webflux apps non-blocking, but starts using "main" thread
Small question regarding Spring Webflux web apps please.
Webflux apps are well known they should not block. However, on each of my application startup, I do see:
logger_name: org.springframework.boot.web.embedded.netty.NettyWebServer
message: Netty started on port 8080
thread_name: main
logger_name: a.b.c.MyApplication
message: Started MyApplication in 251.887 seconds (JVM running for 52.801)
thread_name: main
And only after that, I see it is serving requests on thread such as [or-http-epoll-1], [or-http-epoll-2], [or-http-epoll-3], [or-http-epoll-4]
As you can see, the startup time is quite high. This is a bit confusing, as it uses the "main" thread, which I think is blocking, in order to perform application startup.
There are no code on my end using the main thread on purpose.
Hence, I am having a hard time understanding, why this use of main thread, if there is a way to use the non blocking threads instead?
Thank you
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
