• Download Gist
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Regarding databases in Redis
The question on named databases and requests for more database-aware
features is a recurrent issue in the Redis community. Salvatore has
explained why using databases is in most cases a bad idea, and thus
expressed that he won't add more features to it.
> I understand how this can be useful, but unfortunately I consider
> Redis multiple database errors my worst decision in Redis design at
> all... without any kind of real gain, it makes the internals a lot
> more complex. The reality is that databases don't scale well for
> a number of reason, like active expire of keys and VM. If the DB
> selection can be performed with a string I can see this feature being
> used as a scalable O(1) dictionary layer, that instead it is not.
> With DB numbers, with a default of a few DBs, we are communication
> better what this feature is and how can be used I think. I hope that
> at some point we can drop the multiple DBs support at all, but I think
> it is probably too late as there is a number of people relying on this
> feature for their work.
Bottom line is: if you're using databases to store different kinds of
data, you probably need separate Redis instances.
For a more in-depth explanation by Salvatore, read the following

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.