nice-grpc Server Middleware Terminator
JSON →The `nice-grpc-server-middleware-terminator` package provides a crucial server middleware for `nice-grpc` to facilitate graceful shutdown of gRPC services by actively terminating long-running calls. It addresses a common challenge in gRPC, particularly with streaming RPCs, where `server.shutdown()` would otherwise block indefinitely until all in-flight requests complete or are cancelled by the client. This middleware injects a `context.signal` into service implementations; when `server.shutdown()` is initiated, this signal is aborted, prompting the service method to stop processing. Clients of terminated calls receive a `UNAVAILABLE: Server shutting down` gRPC error, ensuring that the server can complete its shutdown process within a predictable timeframe. The current stable version is 2.0.17, with updates typically coinciding with the broader `nice-grpc` ecosystem. Its key differentiator is providing a standardized, integrated mechanism within the `nice-grpc` framework for managing server-side RPC lifecycle during shutdown, directly supporting the modern `AbortSignal` pattern.
Traffic · last 30 days ↑200% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · 🇩🇪 Germany · 🇫🇮 Finland