When your web application grows in popularity, it becomes more and more difficult to efficiently provide fast service to all of your users. This tutorial explores ways of using Cedexis Openmix to intelligently route traffic across multiple application origins, providing the fastest possible service to each end user. Before We Start If you don’t have […]
When your web application grows in popularity, it becomes more and more difficult to efficiently provide fast service to all of your users. This tutorial explores ways of using Cedexis Openmix to intelligently route traffic across multiple application origins, providing the fastest possible service to each end user.
If you don’t have a CenturyLink Cloud account yet, head over to our website and activate an account. You’ll need it to access CenturyLink Cloud Compute servers and other services.
You will also need a Cedexis Portal account. Visit the Cedexis Portal new account page and create one. You will need this to set up a new Openmix load balancer.
CenturyLink Cloud Network Load Balancer is a multi-tenant, scalable and programmable infrastructure presented to the customer as a service. It is based on Citrix® NetScaler®.
Cedexis Openmix is a scriptable global traffic-management service that reacts to real-time data. It can be used to balance traffic across cloud providers, CDNs, and bare metal servers.
This tutorial gets you started with a simple multi-tiered load balancing setup. Closest to your content, we will set up a CenturyLink Load Balancer to handle distribution of traffic across a number of services in a specific data center. Closest to the user, we will deploy a Cedexis Openmix application to balance traffic across content providers and CDNs.
A CenturyLink Load Balancer can be used to distribute network traffic across multiple virtual private servers, network applications, or any service that can run over TCP. In this section, we will set up a load balancer to distribute traffic across virtual servers that all live in the same data center.
Select the data center to host your new load balancer. Add a name and description.
Click create load balancer.
You will be returned to the "Load Balancer" page. It might take a few minutes for your new load balancer to be provisioned.
Once your new load balancer is ready, click on its name on the "Load Balancer" page. You will be taken to a status and configuration page.
Note: Record the IP address of your load balancer. We will need it to configure the Openmix Application later in the tutorial.
In this example, we will only be adding one content delivery platform to our Cedexis Openmix application. However, note that this is a second tier of load-balancing that operates between the CenturyLink load balancer and the end-user. To take full advantage of Openmix, you will need to configure multiple delivery platforms so it has options to pick from.
One solution that takes full advantage of CenturyLink Cloud's multi-homed services is to create a separate Load Balancer for each data center. For example, this means hosting web applications on multiple virtual servers in both VA1 and WA1, for example. Create a load balancer in each data center using the directions in the previous section to handle traffic distribution across each data center individually.
Cedexis Openmix relies on delivery platforms to measure web application performance, and an application to distribute traffic across multiple platforms. To add platforms to Cedexis Openmix, follow these steps.
Select the CenturyLink Cloud data center from the PLATFORM drop-down menu.
Repeat this process for each CenturyLink Load Balancer data center or other content delivery platform you wish to add.
The Openmix application routes traffic to your CenturyLink Load Balancers based on the algorithm you tell it to use. Before you dive into configuration, let's take a moment to understand what the different options are.
Optimal RTT uses Cedexis Radar and real user measurements to intelligently route network traffic along the fastest possible path. This is the option we will use.
Round Robin is the simplest form of traffic management. It simply hands network traffic to each provider in turn.
Static Routing routes one Cedexis Openmix application to a single service provider.
To add a new Openmix application and configure it to use Optimal RTT, follow these steps:
For APPLICATION TYPE, select "Optimal RTT" from the drop-down menu.
Enter NAME, DESCRIPTION, and TAGS to suit your project requirements.
Note: Record the CNAME for your new Openmix application for later configuration.
Cedexis Openmix uses DNS to route traffic. In your DNS configuration create a CNAME record for your web application and point it at the CNAME for your Openmix application. If you look up your web application's address from the command line, it should look similar to the following:
$ host tutorial1.example.com tutorial1.example.com is an alias for 2-01-2e8d-000b.cdx.cedexis.net. 2-01-2e8d-000b.cdx.cedexis.net has address 220.127.116.11
Note that the ending IP address (which is 18.104.22.168" in this example) will change according to Cedexis's realtime performance measurements from your Internet provider.
The next step is to separate the static elements of your web application and deliver them through a separate Cedexis Openmix application. This step usually includes deploying multiple CDNs, so it can be a little more complicated. The process can vary widely based on the CDNs you select, but most of the steps in this tutorial will still guide you to a successfully configured performance-based load balancer.
Sign-up for our Developer-focused newsletter CODE. Designed hands-on by developers, for developers. Keep up to date on topics of interest: tutorials, tips and tricks, and community building events.
We’re a different kind of cloud provider – let us show you why.