Book a 90-minute product workshop led by HashiCorp engineers and product experts during HashiConf Digital Reserve your spot

Load Balancer Integrations

Load Balancer Deployment Considerations

This overview provides considerations when deploying load balancers in your infrastructure for performance and HA. While reading through these scenarios, you should evaluate what works best for your particular environment.

»Deploy Load Balancers in Separate Datacenters

Nomad allows you to configure which datacenter your node belongs to. Using this information in the job specification, you can control which datacenter you deploy your application into. You can use this technique to isolate your load balancers by deploying them to a distinct datacenter. This method may provide you the following advantages:

  • Isolation between submitting/modifying infrastructure-related jobs vs core applications.

  • The ability to deploy your load balancer as a system job to a well-defined, limited number of nodes dedicated to your infrastructure applications. This simplifies deployment while preventing the over-utilization of resources across the entire cluster.

»Use Service Scheduler with 1+ Instances of your Load Balancer

While deploying your load balancer as a system job simplifies scheduling and guarantees your load balancer has been deployed to every client in your datacenter, this may result in over-utilization of your cluster resources. You may want to consider deploying your load balancer with the service scheduler and using a count with 1+ instances. Please note the following:

  • Your applications will need to use service discovery to discover the load balancer instances in your cluster.

  • You will need to adjust the resources and count of your load balancer instances depending on traffic and utilization.

»Use Auto Scaling Groups with Load Balancers

One method you can use to ensure load balancer availability are Auto Scaling Groups with client metadata. Below is an outline of the method:

  • Configure the group of Nomad clients that will be running your load balancer to be part of their own autoscaling group.

  • Configure these clients with metadata unique to their purpose.

  • Run the load balancer job constraining the deployment to the metadata you have configured on the clients.

The steps above will ensure that if any nodes dedicated to running your load balancers go down, the necessary infrastructure will be brought back up. Additionally, Nomad will make sure the load balancer gets deployed the the correct nodes.

Note: you may want to consider configuring something like Dynamic Scaling to automatically scale up the nodes dedicated to your load balancers based on metrics like CPU utilization, etc.

»Deploy a Load Balancer

Try one of the guides below to deploy a popular load balancer: