The CDN Load Distribution Settings on the ArvanCloud Panel

With the ArvanCloud CDN load distribution settings, you can distribute the traffic load among several servers that contain equal resources and information. This way, the requests for access to the resources can be answered via several servers rather than just one. Accordingly, you will also increase redundancy and reliability.

When you use the ArvanCloud Content Delivery Network (CDN), we locate our servers between the central web server that hosts your website and your website/service final users. Therefore, the ArvanCloud edge servers will receive the users' requests. However, if you are using several servers for your service/website, the load distribution process among the origin servers that host your website will be managed by the ArvanCloud edge servers.

You can complete one of the following ways to activate the load distribution property as you use the ArvanCloud CDN product:

Tip: Pay attention to the fact that while using the ArvanCloud CDN product, if you have also adjusted the load distribution settings for the ArvanCloud DNS product, the settings will not be applied. The reason is that the load balancing is implemented at another level via the reverse proxy.


The First Way: Using the Activation Section

If you aim to activate load distribution in general - it means for all origin servers, you can go to the Content Delivery Network (CDN) product, and then the activation section on the ArvanCloud user's panel. Then, click on the Edit option head-on the A record associated with your primary domain.

Hint: Be careful - the cloud icon must turn green for the A record associated with your primary domain.
Now, you can click on the + icon to define more IP addresses for the A record as well as assign a weight to each IP address. This weight determines the percentage of traffic load sent to the IP. The more the assigning weight to an IP, the more the traffic load is transferred to that one.

Now, you may set the settings and save the changes. Then go to the Origin Settings section under the CDN product group. With selecting the Load Balancing Type option, you can determine that the traffic load transferred to the origin servers that host your website (which you have defined their IP addresses in the previous step) either be round-robin or based on the user's IP.

In the round-robin mode, the transferred traffic load toward the servers occurs based on the arrangement of the server definition and the assigned weight to each server.

The Second Way: Using the Cluster

You can aggregate a range of the origin servers and the weight that you should assign to each server in a cluster. Then, with this cluster, you can deliver the load distribution for a specific URL.

To do so, go to the Origin settings section in the Content Delivery Network (CDN) product and click on the New Cluster option in the Origin Servers Cluster section.

When you select this option, you will see a window similar to the following image.

In the Type field, you can determine that the server definition method in the cluster occurs based on either their IP address or their domain name. Type a name for your cluster in the Name field and add more comments (in the Comment section) if necessary. You can also define the communication protocol (HTTP or HTTPS) in the Protocol field. If you select the Automatic option, you will propose that the traffic tailored to the user's request, either HTTP or HTTPS, be automatically detected and transferred to the servers. Therefore, notice whether a specific port on one of the defined servers in the cluster (HTTP or HTTPS) has been closed or not because selecting this option may cause the transferring traffic to be out of order.

Finally, according to the servers definition type (based on either IP or DNS Name), you can define the servers which you should place in this cluster in the servers field. For example, if you have selected the IP type, you should enter the IP address of the central server that hosts your website. To define more IP addresses, you can use the + icon.

You will finish the process of creating your cluster if you click on the Save button.

You can use the Cluster Edit option to add a new server if you want so.

Now, in order to activate the load distribution property for a specific URL, use the Page Rules option under the Content Delivery Network (CDN) product group. Then, click on the rule associated with that particular URL (if you have not customized a rule for that URL, you can produce one through the New Rule option).

In the end, go to the Proxy Settings section in the open window and select the defined cluster from the Origin Settings field.