Load balancing is crucial for distributing traffic across multiple instances to ensure high availability and improve performance. Our OpenStack environment uses the Amphora provider for load balancing services.

Overview

Amphora is a provider driver for OpenStack’s Octavia project, which offers advanced load balancing capabilities. It deploys virtual machines (amphora instances) to handle load balancing tasks.

Key Features

  • Layer 4 (TCP) and Layer 7 (HTTP) load balancing
  • SSL/TLS termination
  • Health monitoring
  • Session persistence
  • Multiple listener support
  • Horizontal scaling

Creating a Load Balancer

  1. Navigate to Network > Load Balancers.

  2. Click Create Loadbalancer.

  3. Provide the following details in the creation wizard:

    Load Balancer Details

    • Name: Choose a descriptive name.
    • Description: (Optional) Add relevant notes.
    • Owned Network: Select the network where the load balancer will be deployed.
    • Owned Subnet: Select the subnet where the load balancer will be deployed.
    • IP Address: (Optional) Specify an IP or leave as “Automatically assigned”.

    Listener Details

    • Name: Provide a name for the listener.
    • Protocol: Choose HTTP, HTTPS, or TCP.
    • Port: Specify the port (e.g., 80 for HTTP, 443 for HTTPS).
    • Note: If using HTTPS, ensure you have an SSL certificate available (see Advanced Configuration).

    Pool Details

    • Name: Give your pool a name.
    • Algorithm: Choose a Load Balancing Algorithm (e.g., Round Robin, Least Connections).
    • Protocol: Select the backend protocol (usually HTTP or TCP).

    Member Details

    • Select the instances to add as members.
    • Specify the port on which your application is running on these instances.

    Health Monitor Details

    • Name: Give your health monitor a name.
    • Delay: Specify the delay between health checks (e.g., 5 seconds).
    • Max Retries: Specify the maximum number of retries (e.g., 3).
    • Timeout: Specify the timeout for health checks (e.g., 3 seconds).
    • Health Monitor Type: Choose the type of health monitor (e.g., HTTP, HTTPS, TCP).
  4. Click Create Load Balancer.

Best Practices

  1. Security Groups: Ensure your security groups allow traffic from the load balancer to your instances
  2. Monitoring: Regularly check the status of your load balancer and backend instances
  3. Scaling: Monitor traffic patterns and scale your backend instances accordingly
  4. SSL Certificates: Keep your SSL certificates up to date
  5. Health Checks: Configure appropriate health checks to quickly detect and respond to instance failures

Troubleshooting

  • Check the status of your load balancer and its components (listeners, pools, members)
  • Verify that backend instances are responding correctly
  • Review the load balancer’s logs for any error messages
  • Ensure network connectivity between the load balancer and backend instances

Limitations

  • There might be a brief delay when creating or updating load balancers as Amphora instances are provisioned

Additional Resources

For advanced configurations or troubleshooting assistance, please contact our platform support team.