Avoiding Redis persistence (Socket.io + Cluster + RedisStore)

I know that you can use Redis for the communication between socket.io sockets from different cluster workers in node.js and also for sharing other objects between these workers.

But I'm struggling with the following:

Does the persistence of Redis data get in the way of this? How can I be sure that the socket data is removed from redis when the master process is closed? And how can I ensure the same for the objects? I only need this data until the processes/sockets terminate.

Maybe I have to remove the save-to-disk interval and reload the whole Redis server on master-start?

Thanks so much.


您可以使用FLUSHDB从当前数据库或FLUSHALL中删除所有数据,以删除所有数据库中的所有数据。

链接地址: http://www.djcxy.com/p/63670.html

上一篇: nodejs集群

下一篇: 避免Redis持久性(Socket.io + Cluster + RedisStore)