Building Lean Spring Boot Applications for the Cloud
summary
Spring PetClinic containers built with buildpacks and Liberica JDK 17 start in ~4.5–5s, produce ~360MB images and use ~300MB RAM while handling ≈2,000 req/s; switching to Java 21, virtual threads, and Spring AOT cuts percentiles and memory, enabling about half the startup time and ≈30% less RAM when combined with jlink and a smaller builder. GraalVM native images shrink runtime RAM but blow up build time and sometimes worsen throughput. Removing actuator and unused starters reduces bean count (447 → 275) and saves milliseconds.
AI-written summary · about
chapters (16)
- 0:00Introduction
- 5:46Spring Pet Clinic demo app
- 8:12Baseline for benchmarks
- 13:10Startup performance tools
- 17:47Benchmarking methodology
- 22:30Java and JVM tuning
- 25:19Spring Boot optimizations
- 28:26Removing dependencies
- 30:57Cleaning with DepClean
- 33:05Ahead-of-time processing
- 35:32Smaller containers with jlink
- 36:36Alternative JVMs overview
- 41:56GraalVM Native Images trade-offs
- 43:02Virtual threads in Java 21
- 43:43Summary of optimizations
- 47:59Conclusion and Q&A
related talks
52mLean Spring Boot Applications for the Cloud
59mRuntime Efficiencies and Spring Boot
45mProject Leyden: Improving Java’s Startup Time
49mThe Path Towards Spring Boot Native Applications
43mStep up the performance game with Spring Boot and Project Leyden
01h 02mOptimizing Containerized #Java Apps with Jib, #GraalVM, CDS, & #CRaC
42mSupercharge your JVM performance with Project Leyden and Spring Boot
40mThe Path Towards Spring Boot Native Applications on GraalVM
