We have a lot of data that decided to use mongodb, and it works great.
We started using redis to track active users in our real-time application. We also started making some pub / subchannel stuff with redis.
The next step might be to use mongodb for inactive data and redis for active data. An example of this is that all our users are stored in mongodb, but when they log in, we will move a copy of this data to redis for quick access. We also store things like their game activity in redis and use the data accordingly. When the user logs out, we will save everything we need in the mongo, where it will live until it is needed again and loaded into redis.
One thing that we studied is saving redis in an accident. User activity in the system is significant data that we would not want to lose in the event of a failure, and if we only register data after the fact, should we keep a backup of the important data in mongo after each event? Then, with a crash, redis can recover from mongo?
Is there a better way to do what we are trying to achieve?
Thank!
source
share