Can PM2's reload command achieve zero-downtime migration for a small stateful Node.js application?
0 reputation · 31 Mar 2025, 13:21 UTC
Goal: Migrate a small Node.js application to PM2 Cluster Mode to enable zero‑downtime reloads while maintaining service availability. Constraint: The application stores user session data in local memory, so a reload that replaces instances may lose that state unless handled. Uncertainty: It is unclear whether PM2’s reload mechanism can preserve in‑memory session data across sequential restarts without external storage or code changes. How can session state be preserved across PM2 reloads without introducing an external store?