Hello, from these posts:
XF2 features a new "ReplicationAdapter" which allows separate read and write connections to be made.
You can see a typical example of configuration below:
PHP:$config['db']['adapterClass'] = 'XF\Db\Mysqli\ReplicationAdapter'; $config['db']['write'] = [ 'host' => '192.168.10.1', // ... username, password, dbname etc. ]; $config['db']['read'] = [ 'host' => '192.168.10.2', // ... username, password, dbname etc. ];
Could you please provide an example of a configuration for a round-robin load balancing setup with multiple read (or write) MySQL servers?We only expose a single one (though clearly you could round robin them by choosing one at random via config.php). Of course then there are elements like automatic failover and so on...