Allied Telesis Routers and Switches manual Create New Scripts

Page 12

Create New Scripts

This section describes the scripts that the trigger facility runs when the preferred SFTP server goes down or comes back up again. The scripts enable and disable the second resource. Load the same scripts onto both load balancer 1 and load balancer 2.

The load balancers send pings every 60 seconds to check the health of each resource. Therefore, the load balancer can take up to 60 seconds to detect that the server has gone down or come up again.

!Script for when the preferred server goes down: sftp1down.scp

#Enable resource 2 because resource 1 is Closing.

enable lb resource=sftp2

!Script for when the preferred server comes back up: sftp1up.scp

#Disable resource 2 because resource 1 is Up.

disable lb resource=sftp2 immediately

Configure Load Balancer Redundancy on Allied Telesis Routers and Switches

12

Image 12
Contents Introduction ExamplesWhat information will you find in this document? Which products and software version does it apply to?Configure Load Balancer Example of Basic RedundancyConfigure the firewall Disable the GUI and the Http server on portConfigure Vrrp Configure load balancingConfigure triggers Save the configurationSet system name=LB-2 Either Script for when a load balancer becomes the slave slave.scp Create the ScriptsConfigure Load Balancing Extra Commands Extension Controlling Server SelectionConfigure the Triggers Extra Commands Modify the ScriptsMaster.scp Slave.scpScript for when the preferred server goes down sftp1down.scp Create New ScriptsConfiguration Summary Commands Load BalancerCommands Load Balancer File master.scp File slave.scpFile sftp1down.scp File sftp1up.scp