![]() |
Multiple hostnames in the config.php for load balancing / round robin
I am wondering if under the ****** MASTER DATABASE SERVER NAME AND PORT ****** I can add multiple hostnames that will point to one server that is hosting the database but yet that same server has 3 different WAN connections pointing to it. So basically it would look like this in config.php
// ****** MASTER DATABASE SERVER NAME AND PORT ****** // This is the hostname or IP address and port of the database server. // If you are unsure of what to put here, leave the default values. $config['MasterServer']['servername'] = '123.123.123.1'; $config['MasterServer']['servername'] = '123.123.123.2'; $config['MasterServer']['servername'] = '123.123.123.3'; $config['MasterServer']['port'] = 3306; Will vbulletin automatically round robin these entries or will it only use the first connection and then just ignore the rest?? |
That will use whichever you place last. Use:
PHP Code:
|
Hmm - and if you use instead of some PHP function a real loadbalancer ? Then you can do real load-balancing based on the load of the backends instead of just plain rotating between the backeneds.
|
Quote:
--------------- Added [DATE]1273190169[/DATE] at [TIME]1273190169[/TIME] --------------- Alright I tried that script you posted and it works but if I pull any of the connections the forum stops working. Could you double check the script for me and make certain that a character wasn't accidentally overlooked somewhere? |
Quote:
|
Quote:
But if you prefer PHP - ok - your choice |
Quote:
|
That's difficult to achieve due to the current internal design of vBulletin. It assumes that only one server exists, and this is merely a hacked-up way of getting around that. A solution would be to comment out that server's IP in config.php whenever you take it offline.
|
Thanks for ignoring me but still mysqlproxy can do exactly what you're looking for
|
Quote:
But so the script you provided should work just fine with all the connections working then correct? vBulletin will then round robin all of the addresses that I put in that array correct? Quote:
|
All times are GMT. The time now is 12:57 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|