Performance Articles
4 articles about Performance. Explore Spring Boot implementation, design, and operations across related topics.
-
How to Speed Up Spring Boot Application Startup - Reducing Time with CDS, AOT, and Lazy Initialization
Spring Boot apps starting too slowly, causing Pods to miss readiness probes, or breaking your focus during local rebuilds—this guide solves those problems with practical steps. Learn how to identify bottlenecks with Actuator startup, then progressively apply lazy initialization, AutoConfig exclusion, CDS, and AOT to consistently reduce startup time.
-
How to Properly Configure and Tune Spring Boot's HikariCP Connection Pool - Why the Default of 10 Isn't Enough
Tuning steps to eliminate 'Connection is not available' errors in Spring Boot's HikariCP. Covers the default maximumPoolSize of 10 and the official formula (cores × 2 + 1), revising connectionTimeout from 30s to 3s, the relationship between maxLifetime and wait_timeout, and leak detection with leakDetectionThreshold, all with implementation examples. Includes comparison data showing timeout error rates reduced from 40% to 3% through configuration changes.
-
Spring Boot Virtual Threads (Java 21): Setup, Performance, and Pitfalls
Enable virtual threads in Spring Boot 3.2+ with one setting. Covers performance benchmarks vs platform threads, ThreadLocal behavior changes, pinning issues, and @Async integration.
-
How to Implement Asynchronous Processing in Spring Boot - Using @Async and @EnableAsync
An implementation guide for @Async / @EnableAsync, compatible with Virtual Threads in Spring Boot 3.2+ / Java 21. Learn how to speed up your API by running email sending and external API calls in the background, with production know-how covering ThreadPoolTaskExecutor sizing, RejectedExecutionHandler, graceful shutdown, MDC propagation (TaskDecorator), and CompletableFuture, all explained with implementation examples.