How much issues can blocking API calls cause in a ...
# spring
m
How much issues can blocking API calls cause in a WebFlux app if they are scheduled using
Schedulers.boundedElastic()
scheduler? At the moment, I have only some DB calls using JOOQ, but I might use some other blocking library. I've added
BlockHound
to the project and once I moved DB calls to a separate scheduler it stoped reporting blocking calls, but I'm aware that number of available threads is much smaller in Netty than in Tomcat which might cause scalability issues down the road.
l
So basically your choices are use a bounded thread pool or unbounded thread pool? If you are lucky enough to have traffic to overwhelm those pools, I think if it is bounded then you might be able to recover and simply stop accepting requests, if it is unbounded then the whole application might go down because you run out of resources. The real problem in both cases is knowing how much traffic your app can handle and not giving it more.
👍 1