Συγκριτική αξιολόγηση απόδοσης νημάτων πλατφόρμας και εικονικών νημάτων της Java 21 σε αρχιτεκτονικές μικρουπηρεσιών
Comparative performance evaluation of platform threads and virtual threads of Java 21 in microservice architectures

View/ Open
Keywords
Java 21 ; Project Loom ; Virtual threads ; Spring Boot ; React ; JMH benchmarking ; Microservices ; Platform threadsAbstract
This master’s thesis presents the design and implementation of a microservice aggregator, with the primary objective of empirically evaluating the architectural shift introduced by Java 21’s Project Loom. Specifically, the research focuses on comparing the performance of the legacy Platform Thread architecture (1:1 Model) against the modern paradigm of Structured Concurrency via Virtual Threads (M:N Model). The system's architecture is based on a secure RESTful API implemented with Spring Boot 3, while real-time observability of telemetry data is achieved through a dashboard developed with React. A key technical feature of this work is the utilization of the Java Microbenchmark Harness (JMH) to conduct statistically rigorous stress tests at the Java Virtual Machine (JVM) level, isolating network noise and accurately measuring throughput, latency, and Garbage Collection allocation rates. The empirical results demonstrate that Virtual Threads completely eliminate the JVM-level bottleneck of thread starvation, delivering a 15.8x increase in throughput under massive concurrent I/O load without requiring hardware upgrades. However, the research also reveals that the extreme efficiency of the JVM inevitably shifts the bottleneck to the Transport Layer, leading to the exhaustion of the operating system's ephemeral TCP ports. This finding highlights the absolute necessity of utilizing connection pooling in real-world enterprise environments.


