Geo load balancing, also known as GSLB (Global Server Load Balancing) has raised the bar for performance expectations. Especially for cloud service management, because now you can intelligently route traffic to the cloud service that’s best for each user.
Geo load balancing ensures every user gets the optimal experience… not just a lucky few.
Keep in mind, most of the use cases we use in this article require service diversification; or using more than one cloud service vendor for the same purpose. Redundant services make it possible to withstand otherwise crippling outages and latency.
Your app or cloud services perform very differently across the globe. You may have users in London that reach your AWS resources at lightning speed. But your users in the Middle East are barely crawling. You can complement the weak spots in your cloud services by using additional cloud service providers. In this case, maybe we would use another provider’s cloud resources in the Middle East.
With geo load balancing you don’t have to roll over during outages and slowdowns.
How It Works
Location data is deduced from the users’ IP addresses. Everyone connects to the Internet using an IP, whether it’s their device or network. An IP can reveal a lot of information about a user like where they are and what network they are connected to. At Constellix, we use the MaxMind database to map end-user IP addresses to their location and network (ASN).
This kind of user data lets you create custom experiences for your users that are optimized for their network and location. For example, we had one client who wanted to use a different server pool for mobile traffic in Malaysia. All he had to do was create an IP Filter that looked for users connecting over mobile networks (using their ASN’s), add a filter for Malaysia, and apply it to the a CNAME record pool.
Data like this opens doors for many kinds of cloud service management such as:
- Multi-CDN management
- Cloud service load balancing
- App rollouts and migrations
How to Set Up Geo Load Balancing
It’s easy to set up, and better yet… it’s affordable. Here at Constellix, we only charge our clients for the resources they use, ie: queries and record configurations. You don’t have to be on an “enterprise” plan or endure a long onboarding to get up and running.
Try our pricing calculator to estimate how much your monthly bill will be. For an average site with 10 million queries a month using geo load balancing, it would cost only $15 a month!
Okay, sales spiel is out of the way. Let’s learn how to set up geo load balancing in Constellix.
We will be using record pools to set up load balancing, here’s a quick primer on pools in case you haven’t used them before.
We need to create a configuration for two locations, the United States and Europe. Our cloud vendors perform very differently in each region, so we need to create load balancing pools that favor the best provider in that region. We will also create two IP filters, one for each region. And then we’ll put it all together with two records the same name, but point to different pools, with their respective IP filters applied.
#1 Create Load Balancers
First, we need to create a record pool for the services in the United States. We’re going to name it usa-server-pool Here, you can set different weights for your providers, increasing them for the ones you want more traffic to go to.
You also have the option to add a monitoring check for each of the endpoints in your pool. Monitoring checks need to be preconfigured in the Sonar monitoring application. Once applied, the pool will remove/add systems based on if they are up or down.
Repeat for the European server pool, called eu-server-pool.
Create an IP Filter for each location.
Put It All Together
Create two records. Each record should be the same type of record as the pool you’ve already created. They should also have the same name, in this case, we’re creating an A record at the root of our domain so the name will be blank.
Apply a pool to each record, and then apply the respective IP Filter to each record. Commit your changes, and your geo load balancers will be instantly propagated to all the nameservers in our network.
Combine geo load balancing with monitoring metrics for truly intelligent load balancing. If a service (or whatever is in your pool) is DOWN, we’ll remove it from the load balancing pool. You can also turn on ITO (Internet Traffic Optimization), which favors faster-responding servers in the pool.