This page covers common commands for Edge-LB usage. For a more detailed list of CLI commands, consult the dcos edgelb cli reference.
- Edge-LB installed and running.
After launching a service and creating a pool configuration file, you can use the CLI to deploy it:
dcos edgelb create <pool-configuration-file>
Please refer to the tutorials sections for examples of pool configs.
Update a pool’s configuration with the following command:
dcos edgelb update <pool-configuration-file>
Normal reload scenario
A change to a service (such as scaling up) that is load balanced by a pool will trigger a reload of its load balancers. This reload has the following properties:
No traffic is dropped (unless the service instance that was serving the request was killed).
The load balancer will keep the long-running connections intact, while all the new connections will be proxied using the new configuration.
A reload will occur at most once every 3 seconds.
The properties of this reload enable strategies like Blue/Green Deployment.
Load balancer relaunch scenario
A change to the load balancer pool (such as adding a secret) will trigger a relaunch of all load balancers in the pool. This relaunch has the following properties:
- Traffic currently flowing through the given load balancer is dropped when it is stopped. To minimize the impact, we suggest running more than one load balancer within the pool.
- Only one load balancer is stopped in the pool during the update at a time.
- The load balancer will be relaunched on the same node (unless the node itself has failed).
Replacing a failed pod
By default, Edge-LB load balancer instances are tied to a given node; when the node goes down, Edge-LB does not automatically relocate the pod containing the Edge-LB load balancer instance to a new node. You must issue a
pod replace command to the pool scheduler to tell it to start the load balancer instance on a new node. If a machine hosting a pod is permanently lost, manual intervention is required to discard the missing pod and start it on a new node.
This can all be done using the dcos CLI
edgelb-pool subcommand (note that this is distinct from the
edgelb subcommand, and must be installed separately if it has not yet been installed).
- Install the
$ dcos package install edgelb-pool --cli --yes
- Get the name of the pool that owns the pod you need to relocate:
$ dcos edgelb list
This should show all pool configurations. The pool that has a missing pod will be your value for
- Get the name of the pod you need to replace (the one that was running on the removed public agent). This will be your value for
$ dcos edgelb-pool --name=/dcos-edgelb/pools/<pool-name> pod list
$ dcos edgelb-pool --name=/dcos-edgelb/pools/<pool-name> pod replace <pod-id>
This will destroy the pool server and re-launch a new one on the new public agent.
For a list of Edge-LB commands, see the CLI Reference page.