Does a persistent context store guarantee recovery of Node-RED flow state after an abrupt restart?
0 reputation · 29 May 2022, 05:59 UTC
Context durability boundary with persistent stores
Node-RED's default context store keeps flow and global context in process memory, so values generally survive redeployment of individual flows but are lost on a full runtime restart. Pluggable context stores configured in settings.js can write context to disk, shifting that durability boundary. However, many file-based or database-backed stores buffer writes, which means an abrupt process termination may still lose the most recent updates even when persistence is enabled.
The practical question is whether an operator can treat a configured persistent store as a transactional guarantee for flow state. Because exact plugin names and configuration keys are version-sensitive, and because there is no automatic synchronization between memory and persistent backends, the behavior after a hard kill or power loss is not always obvious. A graceful shutdown may flush buffers, but the timing and completeness of that flush depend on the specific store implementation.
Does a persistent context store guarantee that flow and global values set immediately before an abrupt restart are available afterward, or is a graceful shutdown required to avoid losing buffered updates?