Scrivio Interview library

Startup time and footprint

16 questions in 5 subtopics.

CDS and AppCDS

ConceptFoundations6 min read
What is Class Data Sharing (CDS) in the JVM, and how does the default CDS archive help startup?
CodingIntermediate7 min read
Describe the steps to create and use an AppCDS archive for a Spring Boot application, including what is needed for Boot's executable jar.
LeadershipPrincipal6 min read
CDS has existed since Java 5 but became a priority for server applications only in recent years. Why did startup matter more over time, and what does that suggest about future platform investments?

AOT cache

ConceptFoundations7 min read
What is a training run in the context of the JDK AOT cache, and why does it matter what the training run does?
InternalsIntermediate7 min read
What does the AOT cache introduced in JDK 24 (JEP 483) store beyond classic CDS, and how do you create and use it on JDK 24 and JDK 25?
DesignAdvanced7 min read
Integrate AOT cache creation into the build and deployment pipeline for container images across many Spring Boot services. What steps, checks and risks would you plan for?
LeadershipPrincipal7 min read
Choose a startup strategy for a company with about 1,000 Spring Boot services: the JDK AOT cache, GraalVM native image, or CRaC. How do you frame the decision as a multi-year bet?

CRaC

ConceptIntermediate7 min read
What is CRaC (Coordinated Restore at Checkpoint), and what must an application do to support it correctly?
ScenarioAdvanced6 min read
A team proposes CRaC in production so new instances serve traffic within milliseconds during scale-out. What questions do you ask before approving it?

GraalVM native image

ConceptFoundations6 min read
What is GraalVM native image, and what does the closed-world assumption mean for a Java application?
DebuggingIntermediate7 min read
A Spring Boot 3 native image builds successfully, but at run time it fails with ClassNotFoundException for a class whose name comes from a configuration property and is loaded with Class.forName. How do you fix it?
ScenarioIntermediate6 min read
When is GraalVM native image a poor fit for a Java service? Give concrete reasons.

Footprint reduction

ConceptFoundations7 min read
List practical ways to reduce the memory footprint of a Spring Boot service running in a container.
CodingIntermediate6 min read
Build a minimal Java runtime for a service with jdeps and jlink. What commands do you use, what does it save, and what should you be careful to keep?
DesignAdvanced6 min read
Your company runs hundreds of small JVM services, each with at least 512 MiB of memory, many using under 100 MB of heap. What are the options to reduce total footprint, and how do you choose?
LeadershipPrincipal6 min read
Some teams argue that Java's memory footprint justifies writing new small services in Go instead. How do you respond with a multi-year view of cost and risk?