Configure Load Balancers
To follow this guide, you need to create a Load Balancer on your account.
Configure Load Balancer features
The Load Balancer Details page enables you to fine tune behaviors of both the Load Balancer instance and the nodes behind it and configure the required fields used to get the Load Balancer up and running.
Edit Load Balancer details
Click on the pencil icon to enter into the Load Balancer Details page.
You can change Protocol and port here at any time after the initial build.
You can set a timeout value to control how long the Load Balancer waits for responses from its nodes, with a default of 30 seconds and a maximum of 120 seconds.
Select one of the following algorithms to distribute traffic to the nodes:
- Round robin: Sends requests to nodes in the order the nodes are listed, with each node treated equally.
- Weighted round robin: Similar to round robin, except assigns weights to the nodes so that one can receive proportionally more traffic than others.
- Random: Sends requests to nodes with no regard for the node list order, and treats all nodes equally.
- Least Connections: Prioritizes nodes with the fewest current connections for new requests.
- Weighted least connections: Similar to least connections, except assigns weights to the nodes so that one can receive proportionally more traffic than others.
HTTPS redirect allows you to reroute all requests that come to the Load Balancer for HTTP to be rerouted to the HTTPS version of that same URL, returning a
301 Moved Permanently response code. This function only works with HTTPS Load Balancers.
Enable additional features
On the Load Balancer Details page, you can enable the following additional functions at any time:
- Content Caching: This features allows the Load Balancer to store frequently accessed content and store it for up to 10 minutes, serving it directly to requesters and therefore reducing the workload of the nodes. Files up to 2MB in size can be cached. Files served from your web servers with a
no-cacheheader are excluded, allowing you to control what is stored.
- Session persistence: This feature allows you to have all requests of the same protocol from one client be forced to the same node, which is commonly used with any applications that are not designed to share their application state among back-end servers. HTTP cookie is available only with HTTP Load Balancers and inserts a browser-based cookie to identify clients. Source IP is available with HTTPS passthrough Load Balancers and other non-HTTP protocols and uses the Load Balancer’s internal services to track the source IP in order to maintain session persistence.
Th following additional options are available to fine-tune how nodes behave when being served traffic. Click on the pencil icon next to any of your Load Balancer’s nodes to configure it.
Condition: Allows for a specified server to handle incoming requests from the Load Balancer differently. The default is enabled and permits all inbound traffic as assigned from the Load Balancer. Setting nodes to disabled immediately stops all requests from going to the node. Setting node condition to draining means that new connections are not sent to the node, but existing sessions are honored. Adding a new node to the Load Balancer with the draining condition set also allows health monitoring to successfully connect to the node, while it still denies inbound traffic.
Weight: Can be used with Load Balancer algorithms with the “weighted” description. Use this value to assign proportionally more traffic to some nodes than others, with a higher number value representing more traffic going to the node.
Node type: Is set to primary by default when you add new nodes. You can configure secondary nodes in this section, so that traffic is redirected to those secondary nodes should all of the primary nodes fail to respond.
Port: Can also be set individually per node, to customize which port on the server itself receives the Load Balancer assigned traffic.