Fixes two bugs found during self-correction before publishing: - /stream used Flux.interval(), which ticks on its own wall-clock schedule independent of downstream demand and threw OverflowException under a slow subscriber; switched to Flux.range(), which has no independent production schedule and can never outrun demand. - The event-loop-starvation test's first cut used only 8 concurrent /cpu requests as background load, which drained through the 4 event-loop threads well inside the /io measurement window and produced an inconsistent, sometimes-inverted result across runs; raised to 60 concurrent requests (matching the CPU-bound benchmark's own concurrency) so the load actually occupies the event loop for the full window. Also adds StreamBackpressureTest, a StepVerifier proof that the /stream endpoint never emits ahead of its subscriber's outstanding requests.
9 lines
609 B
Plaintext
9 lines
609 B
Plaintext
I/O-bound endpoint (/io, Mono.delay(300ms)), concurrency=600, 2 vCPU sandbox, Spring Boot 4.1.1 / JDK 25.0.4.1
|
|
==============================================================================================================
|
|
webflux (netty) : total=600 success=600 wall=852ms p50=591ms p99=738ms
|
|
|
|
Mono.delay() never parks a thread -- the event loop schedules a timer callback and
|
|
goes back to the selector loop immediately. Wall time for 600 concurrent requests
|
|
stays close to a single 300ms round, same shape as virtual threads' /io result in
|
|
../virtual-threads-benchmark/docs/output/01-io-bound-benchmark.txt.
|