how to setup load balancing. aka load pics from another server (11)

9 Name: dmpk2k!hinhT6kz2E : 2006-08-31 17:45 ID:Heaven [Del]

It's a bit ugly.

Let's say you have three machines: A, B, C. A is the board itself, and B and C are machines you want to load-balance with.

Put a copy of loader.pl (in extras/) on B and C, and change the PASSWORD in both files. Make sure that the directories are writable by the scripts.

Move sender.pl out of extras/ into board A's main directory (the same place as wakaba.pl).

Edit config.pl on machine A. Set ENABLE_LOAD to 1, and change LOAD_HOSTS to reflect your setup. So assume for a moment that the loader on B is at http://www.someboard.com/a/loader.pl with a password of "john", and C is at http://www.yetanotherboard.org/loader.pl with a password of "doe". Then LOAD_HOSTS will look like this:

use constant LOAD_HOSTS => (['http://www.someboard.com/a/loader.pl', 'john', 10], ['http://www.yetanotherboard.org/loader.pl', 'doe', 10]);

You can ignore the two numbers in the above line, so long as they're equal. They're meant to adjust ratios where later requests are sent too, but at the moment I think it's bugged.

The last thing you need to do is move redir-convert.pl out of extras/ into the same directory as wakaba.pl, and then run redir-convert.pl from a browser.

Now refresh wakaba's cache, and you should be good to go.

Name: Link:
Leave these fields empty (spam trap):
More options...
Verification: