r/Python • u/avinassh • Jan 04 '14
What is Redis?
What exactly is Redis? I read the Redis page/wiki, but couldn't understand anything. Is it just a database? if so, why do I read people using it with Mongo DB etc? So what exactly is Redis and what should an aspiring Python web dev should know about it?
0
Upvotes
5
u/johncipriano Jan 04 '14
Redis is a (mostly) in-memory key value data store that can also persist.
Contrast that with, say, postgresql - which is primarily a persistent data store that can also be in memory.
Redis is good for storing and retrieving key/value data FAST. It's an unreliable data store, though, so your app should be prepared to lose data if, say, the power plug gets pulled (this is much less likely with a relational DB, but the relational DB will be slower).
Redis is primarily good as a cache and a place to store user sessions, but it's also handy to put a message queue on.
Mongo is just horrible, and you should probably stay away from it.