I just test by sample PoC project some blocking / non blocking solutions in simple common scenario.
- There are rest blocking endpoint which is quite slow - each request tooks 200 ms.
- There are other - client application, which call this slow endpoint.
I have tested current (blocking) Spring boot client (tomcat), Spring Boot 2.0 (netty) with WebFlux - WebClient, Ratpack and Lagom. In each cases I have stressed client application by gatling test simple scenario (100-1000 users / second).
I have tested ratpack and lagom as reference non blocking io servers to compare results to spring boot (blocking and non blocking).
In all cases i have results as expected, except spring boot 2.0 test. Its working only for small load levels but even then with high latency. If load level rises up - all requests are time outed.
WebClient usage :
I have no idea what goes wrong or current M1 version just working that.
All sources published at https://github.com/rutkowskij/blocking-non-blocking-poc
blocking-service - slow blocking endpoint
non-blocking-client - Spring Boot 2.0M1 and WebClient based client
I have asked for this problem on
- StackOverflow - https://stackoverflow.com/questions/43128467/spring-webflux-webclient-resilience-and-performance
- SpringBoot Gitter
but nobody answer to this.