I just read that Redis is "persistent". Does that mean that it is stored in the hard disk? If yes, how can it be faster than MySQL, which is also hard disk based? Obviously, I am just a beginner, so don't be too harsh.
Connected to: Cheapest way to cache data in node.js?
Redis only works on key value pairs, which is much simpler but is far from covering the normal use cases of a relational database like MySQL.
The persistence of Redis is optional. Many use cases don't need durability (for example I use Redis to store user sessions outside of my server program so that I can restart it without the users noticing). In that case there's no write on disk.
Even when you configure it for persistence, the writing isn't made at each write in the store which means you could lose up to a few seconds of data in a case of a severe crash. But which also means much better performances.
Overall, you don't really compare Redis and MySQL :
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With