The above applications replicate the scenario using Spring Boot 2.0.0 apps with Jetty, Netty, RxNetty, Tomcat and Undertow. Note this application also tests other issues (to be specified in separate tickets).
Please have a look at the detailed test explanation at the linked repository's README
Note that Flux<Item> currently produces a JSON array which is what browser clients can consume. In that sense it's not designed for a streaming scenario as opposed to SSE which enforces a flush after each event. That said we should consider improvements:
Why does it work better in Tomcat/Undertow out of the box and can we ensure similar reasonable defaults across all runtimes?
How do we support outputting a very large sequence of items other than SSE? Ideally returning Flux<Item> should support streaming and non-streaming scenarios just as well so let's start from there and see if that is possible.
For Reactor Netty, it should maybe flush the buffer when a specific amount of data has been sent, I am going to discuss that with Reactor team.
With RxNetty, 184 iterations works while 185 does not! I am going to try to reproduce it with a pure RxNetty application.