Preparing Spring Web Applications for Loom
summary
Examines Loom (Java 21) with Apache Tomcat using microbenchmarks and higher‑concurrency cloud tests; virtual threads show about 30 microseconds lower per‑request overhead and roughly +1% throughput on a 3.37M→3.41M request run, but latency tails increase (89% ≤800ms, 9% 800–1200ms, 2% >1200ms). Identifies concrete fixes: replace blocking inside synchronized blocks (use ReentrantLock), review thread‑local caches, expect larger heap GC churn, and enable with connector option useVirtualThreads=true while keeping Tomcat defaults until users demand change.
AI-written summary · about
chapters (11)
- 0:00Introduction and speaker intro
- 1:27Brief history of servlet scalability
- 10:14Virtual threads overview and benefits
- 16:38Virtual threads impact on scalability
- 21:58Throughput comparison tests
- 27:15Ease of use with blocking APIs
- 30:26Coding constraints and pinning issues
- 32:13Thread local alternatives and caching
- 34:45Conclusion and recommendations
- 36:52Future of virtual threads in Tomcat
- 37:57Q&A session
related talks
36mPreparing web applications for Loom
38mJava Project Loom: Why Should I Care?
41mServices Reloaded Increased Throughput with Project Loom Virtual Threads
53mFruits of the Loom – Lightweight Concurrency For the Java Platform
31mJava Virtual Threads
49mPrepare for what “Loom”s ahead.
47mConcurrent and Asynchronous Programming: Loom in Java 20 and 21
54mLooming in the cores
