Java 21: The revolution of virtual threads - A Deep dive
summary
Shows migrating a Spring Boot app from blocking to reactive to Java 21 virtual threads, using JMeter with 1,000 concurrent users and artificial delays (1,000ms and 500ms). Demonstrates an OOM when creating 1 million platform threads and then running the same load with virtual threads served by ~40 OS worker threads, cutting the blocking endpoint to ~1s and the speaker+talks flow to ~1.5s using structured task scope and a small CollectionTaskScope helper. Notes risks: thread‑local leaks, synchronized/ native calls, and CPU‑bound work.
AI-written summary · about
chapters (13)
- 0:00Java 21 and virtual threads
- 1:50Blocking Spring Boot app
- 6:25Platform threads vs blocking I/O
- 11:41Reactive with CompletableFuture
- 15:13Reactive code complexity
- 22:57Project Loom and virtual threads
- 24:04How virtual threads work
- 26:34Creating and testing virtual threads
- 30:17Migrating Spring Boot to virtual threads
- 33:07Structured concurrency with virtual threads
- 37:25Custom scopes for concurrency
- 40:58ThreadLocals pitfalls
- 43:28Conclusion and future
related talks
46mJava 21: The Revolution of Virtual Threads - A Deep Dive
51mJava 21: The revolution of virtual threads
44mGet The Most Out of Virtual Threads in Java 25: A Deep Dive
50mGet The Most Out of Virtual Threads in Java 25 -A Deep Dive into the Latest Achievements of Virtual
47mMore Action, More Overview – From 4k to 1M Threads
38mJava Project Loom: Why Should I Care?
43mVirtual Threads: Taming the Wild Multithreading Beast
39mUnlocking Data-Intensive Applications with Virtual Threads
