Scrivio Interview library

Packaging and deployment

19 questions in 7 subtopics.

Executable jars

InternalsFoundations7 min read
What is inside a Spring Boot executable jar and how does java -jar app.jar start the application?
DebuggingIntermediate7 min read
An application started with java -cp app.jar com.acme.Main fails with ClassNotFoundException for Spring classes, but java -jar app.jar works. Why?
LeadershipPrincipal6 min read
Java deployment went from application servers and EARs to executable jars, containers and now native images. Looking back, what drove each step and what would you expect next?

Layered jars

ConceptFoundations6 min read
What are layered jars and why do they speed up Docker image builds?
CodingIntermediate7 min read
Write a multi-stage Dockerfile for a Boot application that uses layered jar extraction, and explain the order of COPY instructions.

Buildpacks and container images

ConceptFoundations6 min read
How do you build a container image with Cloud Native Buildpacks in Spring Boot, without a Dockerfile?
DesignAdvanced6 min read
Should your organisation standardise on buildpacks or Dockerfiles for 200 Java services? Compare them and make a recommendation.
LeadershipPrincipal6 min read
Container base images and buildpacks are a large part of your security exposure. How would you set long-term ownership and patching for images across hundreds of services?

War deployment

CodingFoundations6 min read
What changes do you need to deploy a Spring Boot 3 application as a war to an external Tomcat?
ScenarioAdvanced6 min read
A company still deploys 50 Spring applications as wars to shared application servers and wants to move to containers. How would you plan this?

Running on Kubernetes

ConceptFoundations7 min read
Which Kubernetes settings matter most for a Spring Boot service, and how does Boot help with them?
DebuggingIntermediate7 min read
A Boot service in Kubernetes is OOMKilled although -Xmx is 1 GB and the memory limit is 1.2 GB. Why?
DesignAdvanced6 min read
Define the deployment standards for Spring Boot services on Kubernetes across your organisation.
LeadershipPrincipal6 min read
Your company runs Spring services on Kubernetes today. How would you keep the option of moving to another runtime, such as a serverless platform, in the future?

Configuration in containers

ConceptFoundations7 min read
What is the best way to give the same container image different configuration in dev, test and production?
DebuggingIntermediate6 min read
A ConfigMap was updated but the running Spring Boot pods still use the old values. Why, and what are the options?

Deploying to cloud platforms

ConceptFoundations8 min read
You need to deploy a Spring Boot service to a managed platform such as Google Cloud Run, Azure App Service, AWS App Runner or Cloud Foundry. What does the application need to do to run well there, and what does Spring Boot detect automatically?
DebuggingIntermediate9 min read
A Spring Boot service on Google Cloud Run has slow first requests after idle periods, scheduled @Scheduled jobs that sometimes do not run, and lost messages during deployments. Explain the platform behaviours behind each problem and the fixes.
LeadershipPrincipal7 min read
Managed application platforms come and go: some popular Java platforms have been retired by their vendors, forcing customers to migrate within a few years. How do you choose deployment platforms for your company's Java services so that a platform retirement does not become a crisis?