Skip to content

Instantly share code, notes, and snippets.

@novaknole
Created May 11, 2018 16:19
Show Gist options
  • Save novaknole/5188b056ba8f50f62a1601b7603a4e25 to your computer and use it in GitHub Desktop.
Save novaknole/5188b056ba8f50f62a1601b7603a4e25 to your computer and use it in GitHub Desktop.
I have questions and just give me yes or no answers . please  
1) as we all know redis, When there's a query, it gets saved in memory and then ,
it gets saved in disk. If power gets shut down, and the information that was in memory(if server or redis
was not fast enough to make it to the disk) gets lost. so that's the data loss.Is what I said right?
2) let's talk about aof. I think it does the following thing. when there's a query and info gets saved in memory,
it's also saved in file. If power gets shut down, we know if information couldn't be moved to disk, it's already lost.
so what aof does is it saved info in file. when power comes back, it synchronizes this file to the disk. and all is good.
Am I right?
3) if aof saves information in file, it should get slower right? if info is saved to disk as mysql does that, and
if we do the same thing for aof, then why would it be fast?
4) RDB is the same thing. It's just creating backups in the interval we specify. so we can backup the information which
is saved in disk and if we ever need it , we will replace it to the real database.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment