A Computable Residency Threshold for p99 Latency Collapse in Streaming Java Microservices: Spring MVC Versus Spring WebFlux Under Spring AI Token-Stream Workloads

Modern Java web services increasingly expose streaming endpoints that hold server resources for seconds per request, including large language model (LLM) chat endpoints built with Spring AI. Prior comparisons of asynchronous and reactive Java stacks focused on requests that released their resources in milliseconds. This study tests a residency-threshold hypothesis under sustained open-loop load. For a servlet-asynchronous implementation in which each stream occupies one of T workers, T/E[response] gives a nominal capacity estimate from the below-knee mean worker residency E[response]. On a calibrated 150-token chat workload, the nominal threshold was 204 requests per second. The asynchronous p99 was 4.5× the reactive p99 at 200 requests per second and 9.2× at 210 over 180-s measurement windows, with zero rejections in these cells. Queue growth at 210 requests per second implies an effective completion rate of approximately 193 tasks per second, consistent with degradation at 200. Across 108 measurement cells, the transition also appeared without the AI abstraction, moved earlier when a mid-stream tool call extended worker residency, and had no reactive counterpart within the measured grid. A buffered control and an output-token sweep support the role of worker residency. The nominal threshold and the observed onset of queueing provide complementary information for capacity planning.

Authors

Publication Details

Journal
Preprints.org
Published
2026-11-26
DOI
https://doi.org/10.20944/preprints202611.2699.v1
Primary Topic
Software System Performance and Reliability
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

A Computable Residency Threshold for p99 Latency Collapse in Streaming Java Microservices: Spring MVC Versus Spring WebFlux Under Spring AI Token-Stream Workloads

Alexandru Boicea, Cătălin Tudose, Andrei Zbarcea, Victor Asavei
Preprints.org
Software System Performance and Reliability
preprint

A Computable Residency Threshold for p99 Latency Collapse in Streaming Java Microservices: Spring MVC Versus Spring WebFlux Under Spring AI Token-Stream Workloads

Alexandru Boicea, Cătălin Tudose, Andrei Zbarcea, Victor Asavei
preprint en

Abstract

Modern Java web services increasingly expose streaming endpoints that hold server resources for seconds per request, including large language model (LLM) chat endpoints built with Spring AI. Prior comparisons of asynchronous and reactive Java stacks focused on requests that released their resources in milliseconds. This study tests a residency-threshold hypothesis under sustained open-loop load. For a servlet-asynchronous implementation in which each stream occupies one of T workers, T/E[response] gives a nominal capacity estimate from the below-knee mean worker residency E[response]. On a calibrated 150-token chat workload, the nominal threshold was 204 requests per second. The asynchronous p99 was 4.5× the reactive p99 at 200 requests per second and 9.2× at 210 over 180-s measurement windows, with zero rejections in these cells. Queue growth at 210 requests per second implies an effective completion rate of approximately 193 tasks per second, consistent with degradation at 200. Across 108 measurement cells, the transition also appeared without the AI abstraction, moved earlier when a mid-stream tool call extended worker residency, and had no reactive counterpart within the measured grid. A buffered control and an output-token sweep support the role of worker residency. The nominal threshold and the observed onset of queueing provide complementary information for capacity planning.

Preprints.org
Software System Performance and Reliability
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon