How to test my FlexBalancer?

Dig, PerfOps Panel DNS Resolve, PerfOps CLI, DNSMap.io

It is done, you have just created your first Smart UI or Custom code FlexBalancer. Everything is great, but you need to check if it works and how it works. The best way to do it is dig feature usage.

Let's take our simple location based FlexBalancer (from 'Getting Started' section) as an example. What it does - it provides akapage.myawesomepage.net as the answer for all visitors from European continent and cfpage.myawesomepage.net for all visitors from the rest of the world.

We have already created it and named it mysmart.89f659.flexbalancer.net:

dig_1

Let's test it five different ways:

1. Testing with Google G Suite Toolbox Dig Tool.

This tool is great when you test answers based on CDN Uptime/Performance, when the location is not important. So in our case it is only partially useful. But we know that now we are located in Europe, so let's test if we get akapage.myawesomepage.net answer. 

Just paste our balancer 'mysmart.89f659.flexbalancer.net' and select CNAME record type:

dig_2

Ok, we have tested it from Europe and we have got the correct answer.

2. Testing with PerfOps Panel DNS Resolve.

We have more than 250 servers worldwide and provide the ability to test your resources using that servers. So, let's test our mysmart.89f659.flexbalancer.net from different locations.

Fill in our target, use one of well known DNS Resolvers (let it be 1.1.1.1), CNAME record type. Let's leave the location field empty (it will randomly select locations worldwide) and set our limit to 5.

dig_3

Now, let's run our tests:

dig_4

As we can see - the answers from Europe (blue) are all correct - we get 'akapage' and other locations return 'cfpage' (green) as expected.

Let's test it with single locations:

dig_5


Melbourne (Australia continent) - 'cfpage' - correct!

dig_6


London - 'akapage' - correct!

dig_7


Tokyo - 'cfpage' - correct!

Notice that tests consume your PerfOps API Credits, you get the monthly limited amount of those according to Essential plan, and also can purchase additional Credits, or contact our team and switch to the Custom plan.

3. Testing with the PerfOps CLI Tool.

Follow the installation instructions to get the PerfOps CLI, then copy your personal PerfOps API Token from the Settings Page - you will need it to use CLI correctly. 

use `perfops resolve --help` to get the list of options and examples

dig_9


Now, let's test the answer from Europe:

perfops resolve --key your_perfops_api_key --from "Europe" --dns-server 1.1.1.1 --type CNAME mysmart.89f659.flexbalancer.net

dig_10

We get the correct answer 'akapage'.


Now, from Australia:

perfops resolve --key your_perfops_api_key --from "Australia" --dns-server 1.1.1.1 --type CNAME mysmart.89f659.flexbalancer.net

dig_11 

The answer is correct, it is 'cfpage'.

And from the world, with the limit of 10 tests:

perfops resolve --key your_perfops_api_key --limit 10 --dns-server 1.1.1.1 --type CNAME mysmart.89f659.flexbalancer.net

dig_12

All answers are correct: 'akapage' for Europe, 'cfpage' for the rest of the world!

That tests also consume your PerfOps API Credits.

4. Testing with the dig tool.

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

Using Denmark IP:

image (10)


And using the IP from Canada:

image (11)

Everything works as expected!


5. Testing with Dnsmap.io service.

Dnsmap.io provides free dns lookup service for checking domain name server records against a randomly selected list of DNS servers in different corners of the world. So if we check our FlexBalancer's CNAME records - we get the expected answers:

MAPIO_3

The process is explained in our article 'How to perform a DNS Propagation Check?'