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

Azion Load Balancer allows you to balance traffic to your origin data centers or cloud providers, avoid network congestion, and overload your servers.

  1. How it works
  2. Balancing method
  3. Host header
  4. Origin Path
  5. Origin Protocol Policy
  6. Multiple origins
  7. Customizing timeouts

1. How it works

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.

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.

Load Balancer also 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.

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

  1. Access Real-Time Manager.
  2. On the upper-left corner of the page, select Products Menu > Edge Application.
  3. Select the Edge Application you want to edit or create a new one.
  4. In the Origins tab, add or edit an origin to your content.
  5. Select Load Balancer in the Origin Type field.
  6. Configure the chosen Method.
  7. Add the addresses in the Address field.
  8. Set a weight for the balancing in the Weight field.
  9. Click the Save button to save your changes.

2. Balancing method

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

Method Description
Round-Robin 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 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 Keeps track per user IP address and tries, whenever possible, to associate the same origin for each IP.

3. 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 the Host header to be sent to your origin, for instance, www.azion.com.

Warning: 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 ${host} variable 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.

4. 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.

Note: 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, even though this path isn’t 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.

5. 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 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.

6. 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.

7. 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 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.

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