Using Redis as a cache repository for multiple applications on the same server

I want to use Redis as a cache repository for multiple applications on the same physical machine.

I know at least two ways to do this:

  • by running multiple instances of Redis on different ports;
  • using different Redis databases for different applications.

But I don’t know which one is better for me.

What are the advantages and disadvantages of these methods?

Is there a better way to do this?

+5
source share
1 answer

Generally, you should choose the first approach, i.e. a dedicated Redis server. Shared databases are managed by the same Redis process and can block each other. In addition, shared databases have the same configuration (although this might not be a problem in your case, since all databases are for caching). Finally, shared databases are not supported by Redis Cluster.

For more information, refer to this blog post: https://redislabs.com/blog/benchmark-shared-vs-dedicated-redis-instances

+11
source

Source: https://habr.com/ru/post/1207998/


All Articles