Installation guide
Using the Load Balancing Plug-in: libresonate
61
A sample of this is shown below:
[12/Jun/2000:09:36:35] verbose (20685): Resonate plugin watching thread pool sleep
[12/Jun/2000:09:36:35] verbose (20685): Resonate plugin aggressive setting is
FALSE
[12/Jun/2000:09:36:35] verbose (20685): Resonate plugin poll time set to 2000
[12/Jun/2000:09:36:35] verbose (20685): Resonate plugin HighThreshold set to 5
[12/Jun/2000:09:36:35] verbose (20685): Resonate plugin LowThreshold set to 1
[12/Jun/2000:09:36:35] verbose (20685): Resonate plugin event executable path set
to /tools/ns/bin/perl5
[12/Jun/2000:09:36:35] verbose (20685): Resonate plugin low command set to
/usr/netscape/ent41/plugins/loadbal/CmdLow.pl
[12/Jun/2000:09:36:35] verbose (20685): Resonate plugin high command set to
/usr/netscape/ent41/plugins/loadbal/CmdHigh.pl
This is what will the log entries will look like when LogVerbose on is set and the plugin is
activated:
[12/Jun/2000:09:40:12] verbose (20699): Resonate plugin reducing load.
[12/Jun/2000:09:40:14] verbose (20699): Resonate plugin reducing load.
[12/Jun/2000:09:40:16] verbose (20699): Resonate plugin reducing load.
[12/Jun/2000:09:40:18] verbose (20699): Resonate plugin reducing load.
[12/Jun/2000:09:40:20] verbose (20699): Resonate plugin reducing load.
[12/Jun/2000:09:40:30] verbose (20699): Resonate plugin increasing load.
Testing
A simple way to test the load balancer is to use an NSAPI that prints a little HTML page and then
calls
sleep() for a period to simulate execution time. This way one can build up a simulated load
on the server and ensure that the load balancer commands are working properly.
To configure the sample program, first we want to add a new MIME type so this isn’t run for every
request. Modify
config/mime.types and add a line like this:
type=magnus-internal/sleep exts=sleep
Then create a file in your document-root directory with the extension of .sleep. It doesn’t matter if
anything is in this file, it is used as a placeholder only.
To load the module into the server, add a line like this to your
obj.conf, changing shlib to the
location of the library. You also have to set
pool to the name of the thread pool you defined earlier:
Init fn="load-modules" funcs="dosleep"
shlib="/usr/netscape/ent41/plugins/nsapi/examples/dosleep.so" pool="sleep"
Then add this Service line where the others are found (note that order is not important):