For Magento (v1.9 or lower), is okay to use a single Redis instance for both session and backend caching? Is there any extra configuration required?
For Magento (v1.9 or lower), is okay to use a single Redis instance for both session and backend caching? Is there any extra configuration required?
3
Answers
After further research, it seems like using the same instance for both session and backend cache is easy to do with the only potential problem being running out of space (not an issue if you're on AWS using ElastiCache).
Different port numbers are also not necessary. You just need to specify different "database numbers". The following is an example config:
You can use a single instance, but you’d still use separate data stores for each of them, e.g. 6379 and 6380 but on the same Redis server.
There’s no extra configuration required over having separate instances from the Magento side.
I would recommend seperate instances.
Advantages over single instance with same db, or even different dbs
Space and configuration control : You would not want to logout a user because your caching is taking too much redis space. A redis object which stores some page cache might cause a session data key to get evicted, not good.
Key name spacing control : Your keys would be seperated based on concern, and you can use things like flushing to clear all of your cache, or to logout your users on some major change. Instead of having to delete keys by pattern.