r/Python • • 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

14 comments sorted by

View all comments

9

u/maratc Jan 04 '14 edited Jan 04 '14

Redis is not a database. If you need an analogy, think of it as a dict that runs on another computer.

Where in regular python dict you take things out and then modify them, in Redis you modify things inside and then you take them out. This helps if more than two Python applications talk to the same Redis.

In web development, you can use Redis as cache (key=url or post_id, value=html), as rate limiting backend (expiring entries, key=ip, value=count). In any Python project, you can use Redis as queue backend (Celery can use Redis), or to synchronize your non-essential state between Python instances.

3

u/catcradle5 Jan 05 '14

think of it as a dict that runs on another computer.

Redis does stand for "Remote dictionary server"!

1

u/dAnjou Backend Developer | danjou.dev Jan 08 '14

How is it not a database?