AUTOM8N cluster with Cloudflare Traffic LoadBalancing

You can use CloudFlare Traffic Loadbalancing instead of the built in DNS loadbalncer in AUTOM8N

You will need to enable “Basic Load Balancing” (Allows you to load balance & failover across up to 2 origin servers from 1 geographic region. Cloudflare will automatically check the health of your servers every 60 seconds.) in cloudflare dashboard for this and this will cost 5 USD flat fee plus additional usage based charges at CloudFlare

This guide shows how two domains (you can configure any number of domains,but the origin pool and monitor that will check the upstream health will be common!)

multiple domains to be used for LoadBalancing
  1. Start creating the loadbalancer config by enabling Traffic Loadbalancer

enable Traffic LoadBalancing
  1. Add the domain name you wish to setup and setup session affinity as required

add domain and session affinity
  1. Create an origin pool, this is where you add upstream Autom8n cluster node IP’s

add origin pool

4. Create a named origin pool with the origin address set to master and slave AUTOM8N cluster IP address (note that the pool names and origin names are irrelevant and can be done to make them easily recognizable) The origin weight indicates the amount of traffic each node should handle .Setting them 0.5 each drive equal traffic

add origin pool
  1. Setup health threshold, your choice of health check region and notification email where you wish to receive alerts

add origin pool
  1. Set the fallback pool same as the origin pool

add origin pool
  1. Attach a monitor to the origin pool

attach monitor to  origin pool
  1. Create monitor and set Host header to the domain name as we will be monitoring this particular vhost

attach monitor to  origin pool
  1. Save the monitor settings

attach monitor to  origin pool
  1. Set the “Add traffic steering ” to Off

attach monitor to  origin pool
  1. Save the loadbalancer setting

save loadbalancer setting
  1. The next screen will show the setting summary, ensure they are as needed

save loadbalancer setting
  1. The loadbalancer is now active and will start loadbalancing traffic to upstream AUTOM8N cluster

summary of active loadbalancer setting
  1. In the DNS setting for the domain, you will see that the DNS resouce is now set to be managed via Traffic app

summary of active loadbalancer setting
  1. You can add CNAME record for the www DNS resource record to the domain name

summary of active loadbalancer setting
  1. The final DNS management setting will be as below. Note that you can add additional records like MX normally which is not shown here

summary of active loadbalancer setting

This completes the setting for one domain and we can continue adding more cpanel domain names configured on the same cluster But these domains will share the same origin pool and same health monitor

  1. Add more domains in the same manner as we added the first

Add domain to traffic loadbalancer
  1. Select the same origin pool we created for first domain

Add domain to traffic loadbalancer