Chapter 14: Redis
Now that you have successfully leveraged two major databases with Node.JS—MongoDB and MySQL—it’s time learn about Redis.
Redis is a database, but it would be more accurately described as a datastructure server, a definition that resonates more with MongoDB than MySQL.
‘key’: ‘some value’
, ‘key.2’: ‘some other value’
But because it’s a datastructure server, the value is not always a simple string. The following are the fundamental data types that you can assign to keys in Redis:
• sorted set
Another fundamental difference is how you persist data. Redis is designed to be an extremely fast in-memory store with configurable persistence to disk. It’s important to remember persistence to disk matters because anything stored in memory is volatile and susceptible to be lost upon a system crash or reboot.
What this means is that Redis usage and configuration should be carefully reviewed prior to its deployment for sensitive information ...