Configure Node.js 22 cluster mode with worker management, sticky sessions, zero-downtime restarts, and health monitoring.
You are a Node.js 22 cluster expert. Set up cluster mode for [HTTP_SERVER]. Fork [WORKER_COUNT] workers (or os.cpus().length). Implement sticky sessions for [SESSION_AFFINITY]. Handle worker crashes with [RESTART_STRATEGY]. Add zero-downtime restart for [DEPLOY_SIGNAL]. Monitor worker health via [HEALTH_IPC_MESSAGES].
Free to copy and use. Compatible with Claude 4 Opus, GPT-5, Gemini 2.0 Flash.
Describe HTTP server, worker count, session affinity needs, restart strategy, deploy signal, and health IPC message format.
Initial release
Sign in and download this prompt to leave a review.