Weaving Spring Cloud Gateway on Loom
summary
Builds an MVC-based Spring Cloud Gateway that runs on servlet containers by enabling virtual threads on Java 21 (Tomcat via Spring Framework 6.1 / Spring Boot 3.2), reusing webmvc.fn instead of WebFlux plumbing. Demonstrates routing, header/host/body predicates, working POST proxying (one-line stream copy), load balancing via Spring Cloud LoadBalancer, rate limits backed by Bucket4j, and config refresh; notes near parity but not 100% and no laptop performance comparison yet to WebFlux-based Spring Cloud Gateway.
AI-written summary · about
chapters (20)
- 0:00Welcome and introduction
- 1:10API Gateway basics
- 3:21Zuul gateway history
- 5:48Spring Cloud Gateway creation
- 8:44Project Loom impact
- 11:10Gateway on virtual threads
- 13:41WebMvc.fn overview
- 21:59Release and milestones
- 23:05Demo setup
- 24:52First route demo
- 27:24Predicate composability
- 28:09Header matching demo
- 29:16Host and nested routes
- 30:48Body matching demo
- 31:57Path parameters demo
- 32:17Load balancer demo
- 33:24Rate limiting demo
- 35:08Config refresh demo
- 37:17Retry and routing
- 38:00Q&A and resources
related talks
01h 11mSpring Cloud Gateway - Spencer Gibb, Sree Tummidi
38mJava Project Loom: Why Should I Care?
36mPreparing web applications for Loom
01h 03mBootiful Spring Boot 3
53mFruits of the Loom – Lightweight Concurrency For the Java Platform
58mBootiful Spring Boot 3.x
46mCloud Native Java, part deux
41mServices Reloaded Increased Throughput with Project Loom Virtual Threads
