Scaling Your Spring Boot App to Zero
summary
Spring Boot 3 now supports two concrete scale-to-zero paths: build native AOT images with GraalVM to shrink container size (examples drop from ~300 MB to ~30 MB) and reduce memory so a 20 GB server can become a 512 MB deployment, or use coordinated restore at checkpoint (CrAC) to snapshot a running JVM and restore in milliseconds. Demos show native AOT (GraalVM) images starting in about 0.32 s and CrAC restores under 40 ms (19 ms observed), with trade-offs: compile-time configuration, limited dynamic loading, architecture and Linux kernel constraints.
AI-written summary · about
chapters (9)
- 0:00Introduction and overview
- 1:26What does scale to zero mean
- 3:10Raw VM vs checkpoint restore
- 8:27Demo of native image building
- 12:22Why native images matter
- 26:08Introducing checkpoint restore
- 30:49Demo of checkpoint restore
- 38:27Trade-offs and best practices
- 40:39Call to action and feedback
related talks
41mGoing Serverless With Spring’s Support for GraalVM, Project CraC & More
23mBoost Java Application Efficiency and Slash Costs with GraalVM and Spring AOT
44mGoing Serverless with Spring Boot 3
26mGoing Serverless With Spring’s Support for GraalVM, Project CraC & More
44mHow to develop, run and optimize Spring Boot 3 application on AWS Lambda
47mScale your @Controller to zero with AWS Lambda or Azure Function
47mOptimize your Java application for containers and serverless
30mSupersonic Java Quarkus with Knative serverless
