Suppose you have a Tomcat server that has 10 threads that listen on client requests. If you have a client that invokes an endpoint that needs to be answered for 5 seconds, this client holds this thread for those 5 seconds. Add multiple concurrent clients, and within these 5 seconds you will end the flow soon.
, 5 -, , , , .
, Spring Callable, CompletableFuture ListenableFuture - , .
, -, . , . IO ( NIO) API.
, Servlet API Servlet Async IO, Spring , , . , :
/ Servlet Async - NIO.
, , , - -. , , - . -, , - , , , , - . , Callable, CompletableFuture ListenableFuture - , Spring , .
, , , NIO, , , , ( Tomcat), , .
, , Spring Project Reactor , API, .
, Netty, RxJava, . .
, Spring, . , Vert.x Ratpack, , , Node.js .