1 of 20
2 of 20
3 of 20
4 of 20
5 of 20
6 of 20
7 of 20
8 of 20
9 of 20
10 of 20
11 of 20
12 of 20
13 of 20
14 of 20
15 of 20
16 of 20
17 of 20
18 of 20
19 of 20
20 of 20

Load Balancer

Edit on GitHub

To achieve high levels of fault tolerance and performance, you need to ensure the availability of your content and applications even in case of incidents with your origin servers. Azion Load Balancer allows you to balance traffic to your origin data centers or cloud providers, avoid network congestion and overload your servers. In addition, it detects failures and provides multiple algorithms that allow you to distribute the load to the available infrastructures, ensuring the best experience for your users and results for your company.

  1. Load Balancer Features
  2. Load Balancer Configuration

1. Load Balancer Features

With Azion Load Balancer you add multiple origins to your content, select the load balancing method that best suits your needs and customize timeouts and error handling.

Balancing Method

The balancing method that defines how the load will be distributed among your origins can be selected as follows:

Method Description
Round-Robin It defines the balancing algorithm in rotation;
It takes into account the volume of requests and not the time that each origin takes to respond;
Each origin will receive a load in proportion to its weight in the round robin;
Slower origins may accumulate more connections in parallel.
Least connections It keeps track of the number of active connections with each origin and always sends the next request to the origin with the fewest connections;
Slower origins will receive fewer requests, while faster origins will be able to attend more requests sequentially.
IP Hash It keeps track per user IP address and tries, whenever possible, to associate the same origin for each IP.

Host Header

The Host header is used by your origin to identify the virtualhost and locate your content or application. When setting up an origin in Real-Time Manager, you can customize the value that must be sent by Azion in the Host header.

If this field is left blank, Azion will default to the same address that is set in the Address field. Leave the Host Header field blank if your origin is configured to respond to virtualhost by the same address that is configured in DNS.

You can fill in a custom value for Host Header to be sent to your origin. For example, www.azion.com. You must customize the Host Header if your origin is configured to respond to a virtualhost at an address other than the one configured in DNS.

You can also use the variable $host in the Host Header field, to instruct the Edge Nodes to pass on to the origin the same Host header received from your visitors. Use this setting if you have multiple virtualhosts being replied by the same origin.

Origin Path

If you need Azion Edge Nodes to request your origin content in a path other than the URI, you can define an Origin Path. Azion will concatenate the Origin Path with the URI requested by the user.

The Origin Path definition is optional. If not defined, only the URI will be considered.

For example, if in your origin the whole content is under the path /secure, though this path is not shown in the URL for your users, you can set the /secure as the Origin Path in your origin settings. The rest of the path will be preserved according the user’s request.

Origin Protocol Policy

Azion’s delivery architecture allows you to customize the desired connection type of Edge Nodes for your source, as follows:

Connection type Description
Preserve HTTP/HTTPS protocol It will keep the same connection protocol (HTTP or HTTPS) and ports used by your user when accessing your content on Azion to connect to your origin.
Enforce HTTP The connection between Azion’s Edge Nodes and your origin will be through HTTP, regardless of the connection protocol - HTTP or HTTPS - and ports used by your user to access Azion’s content. With this new option, you may customize a port to your origin in the Address field different from the default port (80 for HTTP) if you wish.
Enforce HTTPS The connection between Azion’s Edge Nodes and your origin will be through HTTPS, regardless of the connection protocol - HTTP or HTTPS - and ports used by your user to access Azion’s content. With this new option, you may customize a port to your origin in the Address field different from the default port (443 for HTTPS) if you wish.

Multiple Origins

You must add multiple origins to achieve high levels of availability and prevent an incident from impacting the availability of your content and applications, according to the following options:

Option Description
Address IP address or hostname of your origin. You may customize your origin, if you defined the Origin Protocol Policy in Enforce HTTP or Enforce HTTPS, using the notation host:port.
Weight You may define a weight for each origin. This weight defines the proportion of load that the origin will receive. If you set the weight of an origin to 3, for example, it will receive 3 times more load than an origin with a weight set to 1.
Server Role If the balancing method you select is Round-Robin or Least connections, you can define Server Role for each origin: Primary or Backup. The Backup origins will act and standby origins and only receive the load if all Primary origins fails.
Active To remove a server from balance temporarily for maintenance, you can disable it by deselecting the Active switch. At least one active origin is required for the content to be available.

Customizing Timeouts

Azion Load Balancer will verify the origins respecting the balancing and weight methods attributed by you. If any origin returns a 404 error (Not Found), a 5xx error or takes longer than the timeouts pre-defined by Azion to respond, the other origins will be consulted before returning any error to its users.

The default values for Azion Load Balancer timeouts are:

  • Connection: 60 seconds timeout in the connection establishments with the origin.
  • Between Bytes: 120 seconds timeout between bytes in a connection already established.

2. Load Balancer Configuration

To set up Azion Load Balancer, follow the guidelines below:

  1. Access Real-Time Manager and click the Edge Application menu;
  2. Click on the Edge Application you want to edit;.
  3. At the Origins tab, add or edit an origin to your content;
  4. Select Load Balancer in the Origin Type field;
  5. Configure the chosen Method;
  6. Add the addresses in the Address field;
  7. Set a weight for the balancing in the Weight field;
  8. Click the Save button to save your changes.

Didn’t find what you were looking for? Open a support ticket.