Spring WebFlux WebClient resilience and performance : <p>I just test by sample PoC project some blocking / non blocking solutions in simple common scenario.</p>

<h2>Scenario:</h2>

<ul>
<li>There are rest blocking endpoint which is quite slow - each request tooks 200 ms.</li>
<li>There are other - client application, which call this slow endpoint.</li>
</ul>

<p>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).  </p>

<p>I have tested ratpack and lagom as reference non blocking io servers to compare results to spring boot (blocking and non blocking).</p>

<p>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.</p>

<p>WebClient usage :</p>

<pre><code>@RestController
public class NonBlockingClientController {
private WebClient client = WebClient.create("http://localhost:9000");

@GetMapping("/client")
public Mono&lt;String&gt; getData() {
    return client.get()
            .uri("/routing")
            .accept(TEXT_PLAIN)
            .exchange()
            .then(response -&gt; response.bodyToMono(String.class));
}
}
</code></pre>

<p>I have no idea what goes wrong or current snapshot version just working that.</p>

<p>All sources published at <a href="https://github.com/rutkowskij/blocking-non-blocking-poc" rel="noreferrer">https://github.com/rutkowskij/blocking-non-blocking-poc</a></p>

<ul>
<li>blocking-service - slow blocking endpoint </li>
<li>non-blocking-client - Spring Boot 2.0 and WebClient based client</li>
</ul>

<p>I just created a simple Spring Boot application using spring-boot-starter-webflux with version 2.0.0.BUILD-SNAPSHOT which brings spring-webflux version 5.0.0.BUILD-SNAPSHOT and same for Spring Core, Beans, Context, etc.</p>
