In this Cloudflare load balancing failover article, you will learn to configure Cloudflare load balancing while highlighting its key features and advantages with help of our Server management support services at Bobcares.
Cloudflare load balancing failover
Read on to start creating your own load balancer.
Configuring a Failover for Traffic Steering
You need to know the different available failover configurations. Server failover requires having a backup server configured to serve traffic and take over if the primary origin server) becomes unavailable.
Cloudflare’s common failover configurations include:
- Active – Passive: The primary origin services all traffic and the passive, or alternative origin until it is unavailable. This is promoted to service all traffic instead.
- Active – Active: All origins are available to service traffic, with traffic divided between them.
Steering Traffic with Active-Passive Failover
An active-passive failover configuration steers the traffic in your active pool until a failure threshold occurs. The load balancer will then redirect traffic to the secondary origin when the failure happens.
This configuration provides uninterrupted service, especially during planned outages. This might result in slow responses due to traffic being directed to a single origin.
To have an active-passive failover, you will need to have a load balancer with two origin pools.
1. Open any web browser and log in to the Cloudflare dashboard.
2. Next create the origin pool and set the pool as your first primary pool to load balancer.
An origin pool consists of many servers known by their IP addresses or hostnames. Cloudflare load balancing redirects traffic to the host according to the health and weight of each origin.
3. In the “Origins” section, click Add Origin to add a second origin to the existing pool >> click Next.
4. Finally, select the Off option to direct traffic from the unhealthy pool to the healthy pool in the configuration. Click Next to save the configuration.
From this configuration, the load balancer will direct all traffic to the primary. Until the primary pool has fewer available origins than specified in its health threshold. Only then load balancer will direct traffic to the secondary pool.
Steering Traffic with Active-Active Failover
An active-active failover steers traffic to servers within the pool. Until the pool reaches its configured failure threshold. The load balancer then redirects traffic to the set fallback pool when a failure occurs.
Create two origin pools “primary and secondary”. Then save the origin pool configurations. This you will next use in step 3 of the “Creating a Load Balancer” section.
Creating a Load Balancer
Cloudflare load balancing enhances application performance and activity by channeling traffic away from unhealthy and unavailable servers. At the same time, dynamically distributes the traffic to any available and responsive server pools without experiencing any latency.
The very first step is to create a hostname. A load balancer defaults to the root hostname, you can also set a unique hostname matching your requirements.
1. On the Cloudflare dashboard. Click on the Traffic menu >> click on the Load Balancing tab to launch the creation page. Select “Create Load Balancer” to configure a new load balancer.
2. Next, configure a hostname. DNS name that hosts the load balancer
You can select to proxy or not to proxy traffic to hostname through Cloudflare. By clicking on the right of the hostname input box.
- Move the session-based load balancing toggle for Session Affinity. When session affinity is enabled, your load balancer will direct all requests from a particular end-user to a specific origin server.
- Click “Next” to load the Origin Pool page.
3. Select an existing pool from the dropdown box. Click Add Pool or click on Create a new origin pool to create a new one. Then click Next.
4. Select an existing Cloudflare monitor or create a new one to attach the origin pool >> click Next.
5. Select any option that is shown under Add Traffic Steering. Choose the conventional failover (Off) option. Then click Next.
6. Finally, review the summary of the configuration. Click on the “Save and Deploy” button to deploy a new load balancer.
Editing and Deleting Load Balancer Configurations
In case you made some errors while creating the load balancer, You can either edit or delete the configurations through the Cloudflare dashboard. You can set custom rules or reuse monitors and pools between multiple load balancers.
1. Go to the Traffic page and click the Load Balancing button.
2. Next, click on either Edit or Delete depending on your target load balancer configuration.
3. Update the settings as required through the creation workflow. If you are editing a load balancer configuration.
4. Click the Save option after all the changes are done.
[Looking for a solution to another query? We are just a click away.]
Conclusion
From this article, you have created a load balancer. Also checked to steer traffic with two different failovers for the load balancer. Ensuring the high availability of your website.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
0 Comments