Lean Spring Boot Applications for The Cloud
summary
Baseline PetClinic measures: 360 MB image, 3.9 s cold start, ~278 MB initial RAM, ≈195 req/s under load. Walks through concrete changes and results: add spring-context-indexer and Spring AOT to cut bean initialization, make beans Lazy Spring Beans to halve startup time, remove actuator and unused deps with DepClean to cut image and startup overhead, switch builders and use JLink to shrink images, and compare JVMs (JDK 21, OpenJ9, GraalVM) with tradeoffs in RAM, startup and throughput.
AI-written summary · about
chapters (26)
- 0:00Introduction and speaker intro
- 1:16Problem statement and goals
- 3:59Baseline setup with Spring PetClinic
- 6:59Buildpacks and JVM memory tuning
- 8:33Startup time benchmarking tools
- 10:02Benchmarking methodology explained
- 12:47Java version upgrades impact
- 13:27JIT compiler optimization TieredStopAtLevel
- 14:13Lazy Spring Beans optimization
- 15:27Removing Spring Boot actuators
- 15:52Optimizing config file location
- 16:37JMX and buildpack defaults
- 17:45Dependency cleanup with DepClean
- 19:44Spring AOT compilation
- 20:55JLink for smaller runtime
- 22:03OpenJ9 JVM comparison
- 23:43GraalVM as JVM runtime
- 24:49Alpine Linux builder optimization
- 25:58GraalVM native image benefits
- 26:48CRaC checkpoint restart recovery
- 27:56Virtual threads in Java 21
- 28:44Core count impact on startup
- 30:23Future Spring Boot optimizations
- 31:54Project Leyden overview
- 32:15Summary of optimizations
- 33:09Q&A session
