Tagged articles
9 articles
Page 1 of 1
Selected Java Interview Questions
Selected Java Interview Questions
Sep 10, 2024 · Backend Development

Graceful Shutdown in Spring Boot: Mechanisms, Code Samples, and Configuration

This article explains how Spring Boot handles graceful shutdown in Kubernetes, manual Actuator shutdown, SIGTERM handling, Tomcat graceful termination, and Logback log flushing, providing detailed code examples, configuration snippets, and the underlying shutdown hook mechanisms that ensure resources are released cleanly.

GracefulShutdownJavaKubernetes
0 likes · 18 min read
Graceful Shutdown in Spring Boot: Mechanisms, Code Samples, and Configuration
Cognitive Technology Team
Cognitive Technology Team
Jun 10, 2024 · Backend Development

Gracefully Shutting Down a Thread Pool in Java

To gracefully shut down a Java thread pool, use ExecutorService's shutdown() to reject new tasks, awaitTermination() to wait for running tasks with optional timeout, handle exceptions, and optionally invoke shutdownNow() for forced termination, as illustrated by code examples from Dubbo3 and RocketMQ.

ExecutorServiceGracefulShutdownJava
0 likes · 4 min read
Gracefully Shutting Down a Thread Pool in Java
Cognitive Technology Team
Cognitive Technology Team
Oct 28, 2023 · Backend Development

Understanding ThreadPoolExecutor: Parameters, Lifecycle, Graceful Shutdown, Pitfalls, and Monitoring

This article explains ThreadPoolExecutor's configuration parameters, creation and execution flow, state management, graceful shutdown techniques, common pitfalls such as OOM and ThreadLocal issues, and provides monitoring alerts and sample Java code for robust thread‑pool handling.

DubboGracefulShutdownJavaConcurrency
0 likes · 7 min read
Understanding ThreadPoolExecutor: Parameters, Lifecycle, Graceful Shutdown, Pitfalls, and Monitoring
政采云技术
政采云技术
Feb 16, 2023 · Backend Development

Graceful Shutdown Support in Spring Boot 2.3+ for Embedded Web Servers

Since Spring Boot 2.3.0.RELEASE, graceful shutdown is supported for all embedded web servers (Jetty, Reactor Netty, Tomcat, Undertow) and both reactive and servlet‑based applications, using SmartLifecycle beans, configurable timeouts, and a JVM shutdown hook to allow in‑flight requests to finish while refusing new ones.

BackendEmbeddedWebServerGracefulShutdown
0 likes · 10 min read
Graceful Shutdown Support in Spring Boot 2.3+ for Embedded Web Servers
Java Architect Essentials
Java Architect Essentials
Sep 14, 2021 · Operations

Graceful Service Startup and Shutdown for Microservices with Spring Boot and Docker

This article explains how to implement graceful shutdown and startup for microservices using JVM shutdown hooks, Spring Boot's built‑in mechanisms, Docker stop signals, and external containers like Jetty, providing code examples and best‑practice recommendations for ensuring services deregister, reject traffic, and start only after health checks succeed.

DockerGracefulShutdownMicroservices
0 likes · 10 min read
Graceful Service Startup and Shutdown for Microservices with Spring Boot and Docker