CDN Load Balancing by Cedexis Openmix

Why multi-CDN?

Different CDNs have different network footprints. A CDN performs differently at different times due to different traffic patterns and loadings. One CDN may perform better than others for a specific geo region at a specific point of time.

Say your website is using two CDNs: provider A and E. Sometime A performs better than E. Sometime E performs better than A. Your website performs the best if your website is always using the best of them at any given time. Doing so you need two things
-a measurement system monitoring performances of both A and E
-an intelligent DNS which can change of content URL to CDN URL of either A or E based on their performances

EdgeCast and another CDN

In this demo, I use Cedexis Openmix to load balance two CDN services for four big images on this original webpage. About 60% of the page size is from these four images.

I use EdgeCast and another CDN to show the Cedexix Openmix CDN load balancing feature. There are some CDNs provide free services – Incapsula, CloudFlare, CDN.NET – at the end I create a 14-day free account at CDN77 because they are easy to use, do not require me to migrate my domain to their name servers and do not ask my credit card information.

I set up both EdgeCast and CDN77 to cache the contents from, the hostname of the four images on the original webpage, and the CDN URL hostnames are and respectively. I add two CNAMEs in my domain – and – to hide the CDN URLs.

To use a single CDN is simple: to change the image origin URLs to either one of the aforementioned CNAME URLs.
Using EdgeCast:
Using CDN77:

Cedexis Openmix

In order to dynamically load balance among these two CDNs by Cedexis Openmix, there are a few steps:
1.under Platforms: to add both EdgeCast and CDN77 to Platforms. Cedexis Openmix will load balance based on the performance of the Platforms entries.


2.under Openmix: to add a new DNS Application. I select Optimal Round Trip Time in the Application Type. I put in Fallback CNAME. Time to Live (of the Cedexis CNAME assigned later) is 20 seconds. In destination platform, I add both platforms defined in step (1): EdgeCast with CNAME and CDN77 with CNAME of Cedexis then assigns a Cedexis CNAME for this DNS application:



3.under Openmix: once I publish this DNS application, every 20 seconds Cedexis will change the CNAME of to either or if at that moment the best performing CDN is EdgeCast or CDN77 respectively.

4.EdgeCast and CDN77: to add as a CDN CNAME. Doing so when a HTTP request with Host header is received, EdgeCast will point it to the CDN URL CDN77 will point to the CDN URL

5.the final step: in the original webpage, to change to The result webpage is

To summarise: Cedexis update its DNS record so that is (CNAME to if EdgeCast performs better, OR (CNAME to if CDN77 performs better

The actual result? Between 12:00pm and 1:00pm 2013-06-17 Hong Kong Time, there were 847 DNS queries of, Cedexis Openmix resolved 62% queries to EdgeCast.



I used Catchpoint to do synthetic HTTP GET test to measure webpage response time from Asia, North America and Europe. Here are the test results between 7pm 2013-06-17 and 7pm 2013-06-18 Hong Kong Time:
Using EdgeCast only: 2466ms, 24768 tests
Using CDN77 only: 2528ms, 24768 tests
Load balance between EdgeCast and CDN77: 2493ms, 24768 tests. Cedexis Openmix routed 68% of traffic to EdgeCast.


With similar idea, I can use Openmix to load balance CDN and the original server. I need to add a custom Platform in Cedexis to measure the origin server. Here is a example of a 50-50 Round Robin load balancing between EdgeCast and the original server, the one listed on my demo site.


One Comment on “CDN Load Balancing by Cedexis Openmix”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s