
Boost throughput with virtual threads and structured concurrency in Spring Boot, replacing thread locals with scope values for safer data sharing. Enable virtual threads in Spring Boot, test performance.
Open the GitHub project in IntelliJ, enable preview features with --enable-preview and exports java jdk internal vm to all unnamed, and set Java 21 preview as the sdk language level.
Explore how blocking I/O limits throughput in high-throughput server apps, why platform threads impede scalability, and how asynchronous and reactive approaches seek a lighter concurrency model.
Explore how Project Loom introduces virtual threads, enabling lightweight, scalable concurrency by suspending blocking IO and multiplexing many threads over a small pool of carrier threads.
Learn two methods to create virtual threads in java: the static factory and the thread builder, plus inheritable thread locals and uncaught exception handlers in spring boot.
Launch and measure 1 million virtual threads to observe forkjoinpool and platform worker usage, extract pool and worker names with regex, and assess runtime efficiency and cpu core usage.
Discover how virtual threads in Java offer scalability for IO-heavy workloads over platform threads, delivering higher throughput in Spring Boot without faster per-task execution.
Explore how virtual threads mount on carrier threads, unmount on blocking I/O, and share a ForkJoinPool with CPU cores, contrasting IO-intensive and CPU-intensive execution.
Explore how virtual threads pin to carrier threads during blocking. Learn detection methods with JDK pin threads, flight recorder, and loom unit, and prevention using reentrant locks, Java 24 changes.
Explore how continuations power virtual threads by saving and restoring stack and local variables on the heap, using run and yield to mount, unmount, and resume execution.
Explore structured concurrency with Java 21, using structured task scope to fork and join subtasks, cancel on failure, and improve error handling and observability in multi-service calls.
Explore how a scoped value safely shares data within a thread and child threads via binding and bounded lifetime, with dynamic scoping, rewind, and structured scope.
Explore how thread local and inheritable thread local store per-thread data in Java, including usage with platform and virtual threads, and how structured concurrency affects inheritance.
Compare scope value with threadlocal in spring security, show how virtual threads break threadlocal, and demonstrate using scope value to preserve authentication context across structured concurrency.
Enable virtual threads in Spring Boot 3.2+ with spring.threads.virtual.enabled=true to run requests on a virtual thread in Tomcat or others; Spring Boot 3–3.1 requires a configuration bean for task execution.
Install jmeter on your local system, install the plugin manager, and run a sample test with a thread group, http requests, and listeners like summary report and view results tree.
Perform load testing of a Spring Boot app with JMeter to compare virtual threads and platform threads, using two instances on ports 8080 and 8081 to show io-based throughput benefits.
Explore how Spring Boot with virtual threads improves load test performance against external APIs using JMeter, comparing RestTemplate and RestClient, and highlighting external service bottlenecks.
Compare Spring Boot performance with virtual threads vs platform threads when accessing a database, tune the connection pool, and apply rate limiting with resilience4j, tested with JMeter.
Explore real-time monitoring of Java virtual threads in Spring Boot applications using JFR, Micrometer, Prometheus, and Grafana, including recording and streaming events.
IMPORTANT DISCLAIMER: This course requires you to download Docker Desktop from its official website. If you are a Udemy Business user, please check with your employer before downloading software.
Master Java 21 Virtual Threads & Structured Concurrency — The Complete Spring Boot Performance Guide
Revolutionary Project Loom Technology for Enterprise Applications
Discover how Java 21 Virtual Threads and Structured Concurrency (from Project Loom) revolutionize concurrent programming in Spring Boot.
Traditional platform threads consume around 2 MB each, while Virtual Threads use only 2 KB, enabling you to run millions of concurrent tasks efficiently.
Learn to design, test, and monitor enterprise-grade, high-performance applications built for modern multicore systems.
Enterprise-Grade Performance Benefits
Achieve 10×–100× higher throughput for I/O-intensive Spring Boot applications
Reduce memory consumption dramatically with simplified concurrency models
Integrate seamlessly with existing Spring Boot microservice architectures
Implement production-ready observability using JFR, Micrometer, and Prometheus
Complete Hands-On Mastery
VIRTUAL THREADS FUNDAMENTALS – Launch and manage 1 million Virtual Threads, understand mounting/unmounting, carrier threads, and thread pinning.
STRUCTURED CONCURRENCY IMPLEMENTATION – Master concurrent patterns using StructuredTaskScope and ScopedValues, improving Spring Security context handling.
SPRING BOOT PRODUCTION INTEGRATION – Optimize REST APIs, configure data access, and build scalable services using Virtual Threads.
COMPREHENSIVE JMETER LOAD TESTING – Compare Platform vs Virtual Threads for API and database workloads with measurable metrics.
REAL-TIME MONITORING & OBSERVABILITY – Use JFR, Micrometer, Prometheus, and Grafana to monitor Virtual Thread applications in production.
THREAD CONTINUATIONS DEEP DIVE – Explore the low-level execution model that powers Virtual Threads.
Perfect For Java Professionals
Spring Boot engineers optimizing throughput and scalability
Backend developers designing concurrent microservices
Performance engineers working on enterprise concurrency challenges
Transform your Spring Boot applications with Java 21’s Project Loom and gain hands-on mastery over Virtual Threads, Structured Concurrency, and real-world load testing.