Serverless Java: Cold Start Mitigation in Cloud Run/Spring Boot
This paper focuses on the cold start latency problem in serverless Java applications, seen mainly when deploying with Google Cloud Run and Spring Boot. Auto-scaling, reduced infrastructure use, and cost savings are why serverless computing is becoming more popular. Still, Java applications generally face delays when starting up, referred to as cold starts, because the JVM must boot up, and Spring Boot comprises complex settings. Because of this latency, users' experience can become very poor, especially when using real-time APIs, chatbots, and e-commerce systems. The study explains the processes behind cold starts, their impact, and several ways to address them. Cloud Run's usage of containers and Spring Boot being a good choice for creating microservices is covered, as well as their difficulties in initializing quickly. Optimizations include adjusting container images, native compilation using GraalVM, setting "minimum instances" and concurrency in Cloud Run, using lazy initialization in Spring Boot, and routinely pinging during warm-up. These approaches have been observed to improve latency from several seconds to almost nothing whenever they are used. This research uses case analysis, benchmarking, and performance monitoring to examine the effectiveness of mitigation strategies. The paper concludes that although Java encounters some cold start difficulties, recent advancements in tools such as GraalVM, virtual machine design, and better cloud support are promising. If Java is configured correctly and sufficient time is spent planning, it can be an excellent fit for serverless environments on Google Cloud Run.
Authors
- Sandeep Reddy Gundla
Institutions
- G & A Technical Software (United States) (US)
Publication Details
- Journal
- International journal of IoT
- Published
- 2025-06-07
- DOI
- https://doi.org/10.55640/ijiot-05-01-07
- Primary Topic
- Cloud Computing and Resource Management
- Type
- article
- Field-Weighted Citation Impact
- 0.00