Load Balancer

Overview

Vulture uses ha-proxy to provide high-performance load-balancing features on incoming request.
You can use this feature to accept incoming connexion on any TCP port and load-balance it to another server:

  • Another Vulture node inside the cluster for incoming web traffic.
  • Another server for another protocol.

HA-Proxy Load Balancer

Create a load-balancer

To create an incoming load-balancer configuration, here are the required informations:

  • Name: A friendly name for the load-balancer.
  • HTTP Mode: Needed if the backend is a HTTP Application.
  • Incoming listener: The network interface on which ha-proxy should listen.
  • Incoming port: The TCP port on which ha-proxy will listen (80 or 443 for example).
  • Balancing mode: For now, only roundrobin is supported in Vulture.

  The HTTP Mode is needed if you need the original client's IP logged by Vulture. This mode adds a `X-Forwarded-For' header with the Client's IP address.

You can fine-tune some settings to improve performance / to adapt timeout to backends:

  • Timeout connect : Maximum timeout for client to connect to Vulture, defaults to 500ms.
  • Timeout server : Maximum timeout for Vulture to connect to the backend, defaults to 2s.
  • Timeout client : Maximum timeout for a client to acknowledge or send data, defaults to 5s.
  • Max connections : Maximum simultaneous connections, defaults to 10,000.

You will then need to add one or more backend to which you want to forward incoming request.
In a cluster configuration you will want to declare here all your Vulture nodes, but you can choose any IP / port you want.
Please not that you CANNOT select any carp IP address here

  • Host : A Friendly name for the backend
  • IP : IP address of the backend
  • Port : TCP port of the backend
  • Weight : An integer to ponderate load-balancing trafic. If you have 2 backends, one with a weight of "1" and the second with a weight of "2", the second will receive twice more traffic that the first.

For example, consider the following network diagram:
Load-Balancing-2

We want to load-balance incoming HTTP traffic (TCP port 80) from our CARP listener to each member of the Vulture cluster.
Here are the parameters to create the HA-PROXY configuration:

  • Incoming listener: Your CARP Listener (192.168.1.1)
  • Incoming port: 80
  • Backend servers (Host / IP / PORT / Weight):
    • Vulture-1 / 172.16.1.1 / 80 / 1
    • Vulture-2 / 172.16.1.2 / 80 / 1
    • Vulture-3 / 172.16.1.3 / 80 / 1

In this example, all weights are set to 1. So Vulture will send the first request to vulture-1, then on vulture-2, then on vulture-3, then on vulture-1, ... If one of the node fails, the CARP IP address will switch to another node and load-balancing will continue on the remaining 2 nodes.

Advanced configuration

In this section you can write ha-proxy directives. These directives will be placed in the "Listen" section of ha-proxy configuration. See ha-proxy documentation for details.