Has anyone connected multiple XenForo instances to a single Redis 7 server?

robdog

Well-known member
I want to look at the possibility of connecting multiple XenForo instances to a single Redis 7 server. I was able to use namespaces in a previous version of Redis, but not anymore in version 7. Has anyone tried prefixing a key with a value to ID the stored values per instance?
 
Hmm ... this is effectively what namespace does, eg. key it prefixes the keys.

What specific problems did you notice?

Is namespace still supported in Redis 7? The test that I have ran with multiple XenForo instances hitting the same Redis 7 server seems to have an issue with keys getting overwritten and then causing a latency issue. I am going to keep checking and see if there is something else going wrong here.
 
I don't use Redis much, but as far as I can see from the code namespacing is internal to Doctrine Cache so it shouldn't matter which cache provider is used.

Did you configure a distinct namespace for each XenForo instance in config.php?
 
I want to look at the possibility of connecting multiple XenForo instances to a single Redis 7 server. I was able to use namespaces in a previous version of Redis, but not anymore in version 7. Has anyone tried prefixing a key with a value to ID the stored values per instance?
Can't you use different Redis database for each instance? If not you can run a separate Redis server instance on a different port for each Xenforo instance too. I do the latter already.
 
  • Like
Reactions: Sim
Can't you use different Redis database for each instance? If not you can run a separate Redis server instance on a different port for each Xenforo instance too. I do the latter already.

Are you talking about the 'database' config value under the cache config in the main config.php file?
 
I don't use Redis much, but as far as I can see from the code namespacing is internal to Doctrine Cache so it shouldn't matter which cache provider is used.

Did you configure a distinct namespace for each XenForo instance in config.php?

Yeah, each instance has a different namespace.
 
Can't you use different Redis database for each instance? If not you can run a separate Redis server instance on a different port for each Xenforo instance too. I do the latter already.

Yes - I run 6 XF forums on one server all sharing the same Redis server.

They each have their own Redis database, which is configured via the XF config

PHP:
$config['cache']['enabled'] = true;
$config['cache']['provider'] = 'Redis';
$config['cache']['config'] = [
    'host' => '127.0.0.1',
    'database' => 7, // <=== change database number for each forum
];
 
Top Bottom