Is it possible to keep consistency of sets in Redis after crash without AOF?

If it is not very much, you can have a process that simply reloads all of the data in Redis from your MySQL database. The nice thing is that you can load up all of your data into Redis from the 10 minute backup store, and then simply overwrite everything key by key in Redis. If it is already there, then great, if not, then it adds it Unfortunately, you are never going to be able to keep them consistent without some major work to build concurrency between the two systems.

AOF isn't that bad. You should give it a try. Even then, you have to worry about consistency.

If it is not very much, you can have a process that simply reloads all of the data in Redis from your MySQL database. The nice thing is that you can load up all of your data into Redis from the 10 minute backup store, and then simply overwrite everything key by key in Redis. If it is already there, then great, if not, then it adds it.

Unfortunately, you are never going to be able to keep them consistent without some major work to build concurrency between the two systems. AOF isn't that bad. You should give it a try.

Even then, you have to worry about consistency.

Wow okay. Well I thought about re-reading from MySQL every time after crash, but was thinking maybe there's a better solution (was trying to avoid selecting from MySQL). I haven't tried AOF, but most blog posts don't say too many positive things about it for some reason.

I guess the problem isn't that straightforward. Thanks for helping either way. Btw, data-wise I guess it's not that much.

– Jon Derring Oct 28 at 4:19.

One solution I have had some success with is using a slave instance running on another server. Synchronization with slaves isn't blocking, so there is still a chance you could lose the last command or so if the master crashes, but in practice this is pretty unlikely. You can also have multiple slaves for redundancy.

The result is your master no longer uses ANY disk I/O, and no additional memory for a process fork used by snapshotting. When the master goes down you can restore the data by turning one of your slaves into the master (using my favorite redis command: SLAVEOF NO ONE) temporarily, having your master slave from your temporary master, and then restoring master/slave roles to their original configurations once synchronization is complete.

Interesting... I'll have to experiment with that. Thank you for suggestion. – Jon Derring Nov 1 at 20:00.

What if I want to add values to a List type structure and have them get auto removed 1 hour after insertion. Is that currently possible, or would it require running a cron job to do the purging manually?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions