Lean Spring Boot Applications for the Cloud
summary
Benchmarks show concrete wins: baseline image ~358 MB, startup ~4.5 s, idle RAM ~300 MB and ~470 MB after ~2k req/s; switching JDK from 17 to 21 improves high‑percentile latency; buildpacks produce tuned containers and spring boot startup report surfaces slow bean init; toggling lazy spring beans and removing Actuator drops beans from 447 to 275 and cuts startup; depclean removes unused libs and trims image size; jlink and alternate JVMs (GraalVM/native) shrink images and, in measured runs, improve throughput.
AI-written summary · about
chapters (22)
- 0:00Lightweight Spring Boot cloud apps
- 1:08Optimize Java apps for cloud
- 5:45Spring Pet Clinic demo
- 8:17Build packs for Docker
- 13:15Startup time with Spring Boot Startup Report
- 15:25Baseline benchmarks for Pet Clinic
- 20:20Upgrade to Java 21
- 23:31JVM startup with -noverify
- 24:32Tiered compilation for faster startup
- 26:20Garbage collector choices
- 28:29Lazy Spring bean init
- 31:02Reduce config file scans
- 32:02Impact of removing Actuator
- 34:15Clean unused dependencies
- 37:43Optimize Spring config with indexer
- 39:10Custom JREs with jlink
- 40:16Switch JVMs for performance
- 41:43GraalVM for native images
- 43:06Alpine-based containers
- 43:48GraalVM native images
- 44:29Virtual threads in Java 21
- 44:50Key optimizations summary
related talks
51mLean Spring Boot Applications for The Cloud
46mLean Spring Boot Applications for The Cloud
39mHow to Reduce the Footprint of Your Spring Boot Applications
24mSpring: Your Next Java Micro-Framework
11mPatrick Baumgartner at JNation 2024
01h 02mOptimizing Containerized #Java Apps with Jib, #GraalVM, CDS, & #CRaC
49mContainers All the Way Down!
55mWho cares about speed
