Answer the question
In order to leave comments, you need to log in
How to store data in the Node.js process and not lose it when it crashes?
I want to store all the data in the node process, because it is long-lived. How to implement data exchange between several processes and not lose any information if the process dies?
Is it possible to do without an external database at all? Even without the radish.
Answer the question
In order to leave comments, you need to log in
If you store only in RAM (node process) - when the process ends, everything will be lost.
If you need to save data outside the process, that is, in non-volatile memory - this is called a hard disk (self-written database on files, mysql / postrgesql, redis, rabbitmq or something else - it doesn’t matter).
Data exchange between processes:
- fast, but with loss at the end of the script - via sockets.
- a little slower, but reliable - via hard disk storage.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question