caviar.engine.lb

Load balancer module.

class caviar.engine.lb.LoadBalancer(ssh_session_fact, lb_machine)

Bases: object

Load balancer.

add_instance(name, host, port)

Add an instance with the given name, host and port to the load balancer.

Parameters:
  • name (str) – Instance name.
  • host (str) – Instance host.
  • port (str) – Instance port.
remove_instance(name)

Remove the instance with the given name from the load balancer.

Parameters:name (str) – Instance name.