Multiple Redis databases
Redis comes with support for multiple databases, which is very similar to the concept in SQL databases. In SQL databases, such as MySQL, PostgreSQL, and Oracle, you can define a name for your databases. However, Redis databases are represented by numbers.
You learned in Chapter 4, Commands (Where the Wild Things Are), that we can switch between databases using the command SELECT <dbid>. Although multiple databases work fine, this has become a deprecated feature, so we do not recommend that you use it in production.
It has been deprecated because it is, in general, better to launch multiple Redis servers on the same machine rather than using multiple databases. Redis is single threaded. Thus, a single Redis server with multiple databases only uses one CPU core. On the other hand, if multiple Redis servers are used, it is possible to take advantage of multiple CPU cores.
Multiple databases make administration of Redis harder and may complicate performance and resource...