Class SimpleLoadBalancer


  • public class SimpleLoadBalancer
    extends Object
    The LoadBalancer start listening on the given port for messages. It is started with a map of network nodes where FederateStarters can start models, and a capacity of each node.

    The program is called as follows: java -jar LocalLoadBalancer.jar key1=value1 key2=value2 ... The following keys are defined:
    • port: the port on which the LoadBalancer listens
    • nodeFile: the file that contains the node information
    The nodeFile is expected to be tab-delimited with the following columns (and an example):
     nodeAddress  fsPort   maxLoad   priority
     10.0.0.121   5500     8         10
     10.0.0.122   5500     8         10
     10.0.0.123   5500     8         10
     127.0.0.1    5500     8         5
     
    Where nodeAddress is the network name of the node or its IP address, fsPort is the port where the FederateStarter can be found on the node, maxLoad is an int indicating the maximum number of jobs the node can handle, and priority indicates which nodes should be scheduled first (nodes of lower priority are only scheduled when high priority nodes are full). The example above shows three nodes with priority 10, and the localhost with a lower priority. So only when 24 federates are running, localhost will be used.

    Copyright (c) 2016-2022 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
    BSD-style license. See OTS License.

    Author:
    Alexander Verbraeck
    • Constructor Detail

      • SimpleLoadBalancer

        public SimpleLoadBalancer()