How to create a Smart UI FlexBalancer

Your first simple location-based balancer

The case: we have our page copy hosted at Akamai CDN as and at Cloudflare CDS as What we want to do is to provide Akamai page as answer for all visitors from European continent and Cloudflare page for the rest of the world.

Step one. Go to FlexBalancers page and create new FlexBalancer:


Let's call it 'mysmart', we select Smart UI type and go to the next step: 


Let's suppose we have fallback resource '' (page copy or 'Unavailable' page), so we fill it as 'Fallback' and keep the default 10 seconds TTL.

Press 'Create New FlexBalancer' button :


Now we can see our FlexBalancer created.

Step two. Our new balancer has no answers yet, so let's add them (Press 'Add answer' button):


First, let's set our Cloudflare page as an answer for the whole world. We fill in our , select (keep) 'Global' location and select Cloudflare CDN from Cloud platform selector, then press 'Create answer' button:


Our first answer has been added! 


But we need another answer for Europe, so press 'Add new'. 

We fill in our , select continent 'Europe' and Akamai CDN from Cloud platform selector, then press 'Create answer' button:


Now we have FlexBalancer with two answers.

What is important:


Our 'Europe' continent is smaller than 'Global (World), so, when the request is processed, FlexBalancer will check if any continent-based answer matches the request location, if not- it will go Global answer.

Step three. Let’s press ‘Test and publish’ button,


 confirm the Deployment,


and get the final window:


It tells us not to forget to point our page domain name to using CNAME record, so requests will go to FlexBalancer and it will manage all answers (Europe to Akamai, other world - to Cloudflare page copies).

Now, let’s test how it works using the dig tool:

We will emulate the DNS-request via dig-utility, using subnets and IPs from different countries:

From France (Europe) we get


And from the USA we get


Let's test it from another computer.

From Denmark (Europe) we get

image (10)

And from Canada we get

image (11)

Everything works as expected!