Restarting a backend during deploys often feels like a gamble: HTTP requests finish, while WebSocket connections and broker clients snap mid-flight or hang. NestJS 12.6, released on November 20, 2026, tackles those production headaches and trims startup boilerplate.
First, a nice TypeScript touch: NestFactory.create() now infers the app type automatically from FastifyAdapter, ExpressAdapter, or NodeAdapter, so you can skip manual generics like NestFastifyApplication.
The main upgrade is graceful shutdown. WsAdapter gains gracefulShutdown (off by default) and a 10-second gracePeriod: during shutdown, it returns 503 to new upgrades, waits for active handlers, and closes sockets with code 1001. gRPC and Kafka receive the same 10-second gracePeriod. Meanwhile, Kafka, MQTT, Redis, and RabbitMQ clients no longer hang forever on disconnects or rebalances and fail immediately with Connection closed. Fastify custom param decorators with response objects and host-pattern conflict checks were fixed as well.
Watch out for one gRPC detail when upgrading: gracefulShutdown previously waited indefinitely for active calls, whereas now it cancels them after 10 seconds. Raise gracePeriod manually if you run long-lived streams.
