The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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?? |
#2
|
||||
|
||||
That will use whichever you place last. Use:
PHP Code:
|
#3
|
||||
|
||||
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.
|
#4
|
|||
|
|||
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? |
#5
|
||||
|
||||
What do you mean by 'pulling any of the connections'?
|
#6
|
||||
|
||||
Quote:
But if you prefer PHP - ok - your choice |
#7
|
|||
|
|||
Ok it's like this, I am running a local webserver with 5 separate internet connections going into one server. They are all run into one router that does the load balancing. But what I wanna do is put my forum on a different server but still host the database from here. So in the config.php file I need to be able to tell it that I have 5 separate connections that it can choose to connect to. I tried using the script you provided which seems to work but if I pull one of the 5 local connections offline then everything stops working where really it should just skip to the next connection if it sees that connection is down. Basically a failover.
|
#8
|
||||
|
||||
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.
|
#9
|
||||
|
||||
Thanks for ignoring me but still mysqlproxy can do exactly what you're looking for
|
#10
|
|||
|
|||
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? Sorry but your post wasn't really all that specific on how this could help my situation. You simply just said I should read the MySQL documentation but didn't specify what exactly I should be looking for. Hence the reason for my paying attention to Dismounted's posts as he has given me something to work with |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|