As Rupert Tagnipes outlined in his article “High Availability with Dynamic Load Balancers,” crafting a fault-tolerant, reliable website is critical to a company’s online success. There’s nothing worse than going to a website to do a transaction only to have it either be slow to respond or have an interaction time out. By setting up a load balancer in front of transactional web or application servers, companies can ensure their web presence is resilient, responsive, and gets information to their customers reliably.
GoGrid launched with a free load-balancing service in 2008. This year, we introduced our next-generation cloud load-balancing service on GoGrid. Embracing the software-defined networking (SDN) mantra, we created our load-balancing service to embrace the key characteristics of cloud computing: on-demand, usage-based, and distributed. I encourage you to read more about our Dynamic Load-Balancing service in Rupert’s article.
Although understanding why load balancing is critical to success is important, knowing how to create a new GoGrid Dynamic Load Balancer is equally important. This How-To article will guide you quickly and easily down that path.
As always, I like to boil the process down to 3 easy steps. In the case of the Dynamic Load Balancer creation process, these steps are:
It’s important to remember that although we try to make all these processes as easy and straightforward as possible, you should pay close attention to how the process works. This article includes two ways to create a Dynamic Load Balancer: first with a video and then later with the basic steps.
A Video Walk-Through
The video below (also available directly on YouTube) provides a quick overview of how to create a Dynamic Load Balancer on GoGrid. In this video, you’ll learn:
- Why Dynamic Load Balancers are important to your infrastructure
- The core components that make up the Dynamic Load-Balancing Service
- How to create Dynamic Load Balancers (Real IPs, VIPs, Health Checkers, & Listeners)
Let’s get started:
Ready to try it out yourself? First, you need to be sure you have a GoGrid account. If you don’t, just contact one of our Cloud Specialists, mention this article, and they can set you up with a service credit to get going. Also, before you create a GoGrid Dynamic Load Balancer, you need to have at least 2 web or application servers to load balance. You can set those up in literally minutes.
Setting Up a Dynamic Load Balancer
In the written part of this tutorial, we’re going to walk through 5 steps:
1. Adding a Dynamic Load Balancer object
2. Selecting Real IPs (IP addresses of servers) for use in the Dynamic Load Balancer
3. Adding a Health Checker
4. Adding a Virtual IP (VIP)
5. Adding a Listener
Adding a Dynamic Load Balancer Object
The first step is to add the Dynamic Load Balancer object. In the management console, click the Add button, choose the data center, and select the Dynamic Load Balancer object.
Note that GoGrid’s Dynamic Load-Balancing Service is available in all our data centers.
You’ll be brought to the VIP management screen. From there, you actually need to “ready” your web or application servers to be associated with the VIP (the IP of the Dynamic Load Balancer).
Selecting the Real IPs
Each server on GoGrid has a public IP address associated with it that you can use to access it. You need to tell the Dynamic Load Balancer which servers it should send traffic to, and you use a server’s IP address to do so.
To create the relationship, you need to create Real IP objects that represent the servers you want to load balance.
Click the Add a Real IP link.
It’s important to note that you can use either a GoGrid server IP address or an external server IP address. For the best performance and to avoid latency, we recommend you use servers that are in close proximity—either in the same data center or same geographic region.
If your server is located in a GoGrid data center, select the data center and then choose the server from the dropdown.
You can add a Description, set the Weighting (you can set it later as well), and set the Status of the Dynamic Load Balancer to Enabled (or Disabled).
Click Save to add the Real IP.
Once the Real IP and server are added to the list, you can go ahead and add other Real IPs to the Dynamic Load Balancer. At the end of this process, you’ll associate the Real IPs you’ve created with the VIP of the Dynamic Load Balancer.
Adding a Health Checker
Health Checkers determine the state of the real servers. This is a core component to any load-balancing service. If the Health Checker detects an issue with a server, it notifies the Load Balancer that there’s an issue and removes the server from the load-balancing pool.
To add a Health Checker, click on the Health Checker link. From there, you can configure the Health Checker.
First start by choosing the data center and create a name for the Health Checker. It’s always good to enter some sort of a description as well (e.g., “HTTP health checker for US West”).
Next, you choose the type of Health Checker: HTTP, Connect, or SSL. (You can find descriptions of these types on the GoGrid wiki.) Depending on the type you select, you’ll have to configure the other options appropriately. For this example, we chose HTTP and entered a “/” in the URI field which means that any value in this path is accepted for the health check.
Once you’ve filled in the options, click Save to store the Health Checker, which will then display in the list of Health Checkers.
Next, we move on to creating the VIP.
Creating a VIP
The Dynamic Load Balancer is defined on the VIP page. You manage your pool of real servers from within the VIP configuration. You can add or remove real servers here, but only those you’ve set up during the Real IP process described above.
To create the VIP, select VIP from the menu. Choose the primary data center where you want your Dynamic Load Balancer to reside. You’ll want to select the Load Balancer data center to match the data center of your real IPs to ensure the least amount of latency. Then name the VIP, write a description, and set the status.
From there, you’ll need to associate the Real IPs to the VIP. Click on Assign a Real IP and choose the server from the list.
Click the Assign button to associate the Real IP with the VIP. Repeat this process with the other servers you want to be associated with the Dynamic Load Balancer. Once you’re finished, click Save.
Your new Dynamic Load Balancer will show up on the list.
From the listing, you can enable or disable the Dynamic Load Balancer and Edit it (to enable or disable the Real IPs in the list).
It’s also important to note that once the Health Checker is configured, it displays current Health Checker response codes. You can immediately see if your Real Server is available or not. You can find a full list of the response codes on the GoGrid wiki.
From here, we move on to the last step of the process: creating a Listener.
Creating a Listener
A Listener essentially tells the Dynamic Load Balancer what port to listen to for traffic requests on the front end and what port to send those traffic requests to on the back end. It is in the Listener where you define the type of algorithm you want the Load Balancer to follow: Weighted Round Robin, Weighted Least Connect, or Source Address Hashing. You also define the type of Persistence and associate a Health Checker.
Select Listener from the menu. Then choose the data center, enter a name and description for your Listener, choose the VIP, decide which Protocol to use, assign ports (Listener and Real), assign the Health Checker, choose the Persistence, and set the Algorithm.
Once you click Save, you’ve finished creating the Listener and your Dynamic Load Balancer is now active and balancing traffic between servers.
Balancing to a Solution
GoGrid’s Dynamic Load Balancer offers a variety of powerful configuration options, so be sure to test out different configurations and read through the documentation. With a properly configured Dynamic Load Balancer, your business Internet presence is poised to be responsive to demand yet resilient enough to handle any issues that arise.
As part of a software-defined networking solution—having your data center acting as a distributed load-balancing service—you know you’ll benefit from a resilient architecture. The service is designed to be self-healing, so even if the primary Load Balancer goes down, all your configurations and VIP will be automatically transitioned to a standby. Not only is your architecture protected by having load distributed, but because your Dynamic Load Balancer is also distributed across the data center, there’s less chance of a service interruption.
Give our new Dynamic Load Balancing service a try (oh, and the first Load Balancer is free!). We think you’ll like it.
Latest posts by Michael Sheehan (see all)
- Get Your Game On in the Cloud - June 11, 2013
- How Software Defined Networking Delivers Next-Generation Success - June 5, 2013
- James Gosling to Speak on Innovation at GoGrid Cloud Meetup on 5/22 - May 16, 2013