CuriousTechie: Hey, I am learning to setup Global Server Load Balancing on AVI. I do not have much experience on GSLB especially with AVI or NSX ALB, can you help me understand the basic concept of GSLB with NSX ALB?
ITGuy: Sure! Are you good with how GSLB works irrespective of the Load Balancer?
CuriousTechie: I know some basics, but a white board refresher will be helpful.
ITGuy: Sure! Let’s see what happens when you type a URL in your favourite web browser. You input a URL lets say “curioustechies.in”and DNS does its magic and run multiple DNS queries to find you the IP of the web site/server that you are looking for. I believe you have a fair understanding of how DNS works so will not go much deep into it. OK?
CuriousTechie: Yes, I have an understanding of DNS, let me draw a white board with the basic DNS and let me know if the understanding is good.

ITGuy: Yes! this is perfect, we can build the GSLB concept on top of this. Okay so first tell me why do you need a GSLB?
CuriousTechie: When someone needs to host an application in two or more different datacenters and want the ability to load balance users going to each location. The load balancing can be based on the Geo location of the client or any other LB algorithm.
ITGuy: Okay your basic understanding is perfect, let’s work with a use case to further build the concept. Take an example of a new application which you would like to be available via GSLB and let’s call the application “http://www.myapp.curioustechies.in“. Where would you start and what will you need on a very high level?
CuriousTechie: I will need the below.
- An AVI controller
- Service Engines in both the sites
- Virtual service for the application in each site, lets say “appsiteA” with IP 10.1.20.10 and “appsiteB” with IP 10.1.40.10 and ofcourse the actual application servers in each site as pool members.
- A DNS service in each site? But I am not sure about that!
ITGuy: We need to take one step back and clarify one important point on NSX ALB. It is perfectly okay to have a controller in one site and manage service engines for other sites for LTM i.e., local load balancing. This is a normal concept of Software Defined Networking i.e., separation of Management/Control Plane(AVI Controller) and Data Plane(Service Engine). You may check out this article about some basics of SDN, this one is about NSX but the concept of Management/Data plane remains the same A Casual NSX Conversation ā Curious-Techies (curioustechies.in)
But when we are discussing about Global Server Load Balancing, we mean totally different AVI controllers in two or more sites configured to serve independent Virtual Services on different Service engines thus achieving resiliency for complete site failures. You cannot run a multi-site GSLB setup with only one AVI controller!!!!
CuriousTechie: Yeah right, I missed that point totally but any thoughts about stretched L2 networks with Stretched vSphere clusters?
ITGuy: That would be way to achieve high availability of a single Virtual Service by spreading the Service Engines across two sites and there can be some design constraints for doing that(follow design best practices) but in any manner, you cannot achieve GSLB with this.
CuriousTechie: Okay cool! Am I missing anything else?
ITGuy: Just few more points specific to AVI GSLB!
It is not mandatory to have a DNS service in all the GSLB sites, in AVI terminology if you are not running a DNS service in a site but you do have Virtual Service/Pool members in that site then itās called a Passive site. As you see below DC-1 and DC-3 are Active sites as they are hosting the DNS services, but DC-2 is a Passive site as it doesn’t host a DNS service, although it does have Virtual services which can take part in a GSLB configuration.

CuriousTechie: What is the difference between a Leader and Follower site?
ITGuy: In a GSLB setup, you are allowed to create/edit Global Virtual Services only from the Leader site. This is to avoid any kind of configuration mismatch if done at the same time from two different sites. At a point of time there can be only one Leader site and multiple follower sites.
CuriousTechie: Okay cool!
ITGuy: And a major point related to DNS is a GSLB subdomain!
CuriousTechie: I think I don’t know much about GSLB’s, what is a subdomain?
ITGuy: Okay I will assume you already have a corporate DNS server hosting your domain “curioustechies.in” and which will have DNS records for all your corporate servers. Then what is the purpose of hosting a DNS service in AVI?
CuriousTechie: I am not sure, didn’t think about it.
ITGuy: No worries, to host a GSLB service you will need to create a subdomain on your corporate domain and you will need to perform a zone delegation for that subdomain on your corporate DNS servers.
For example, you have a corporate domain called “curioustechies.in”, you will need to create a subdomain for example “gslb.curioutechies.in” and create a zone delegation for this domain to the DNS service that you will host on AVI. Any DNS queries coming for “gslb.curioutechies.in” will be forwarded to the AVI hosted DNS service for name resolution.
Let’s understand this using your DNS white board.

CuriousTechie: Okay this is helpful, but I have one doubt!
ITGuy: Sure, shoot!
CuriousTechie: I want my users to type in “http://www.myapp.curioustechies.in” in their browser rather than “http://www.myapp.gslb.curioustechies.in“. Is that possible?
ITGuy: Ofcourse! Ideally your end user will have no idea what is the subdomain you are using for GSLB. And we achieve this using DNS CNAME records, in the corporate DNS server where you create the delegation for your subdomain , you will create a CNAME record something like this “http://www.myapp.curioustechies.in“=”http://www.myapp.gslb.curioustechies.in“
When the user’s DNS query reaches the corporate DNS server with the request “http://www.myapp.curioustechies.in” it will be translated to “http://www.myapp.gslb.curioustechies.in” thus the zone delegation for the configured subdomain will forward the DNS request to AVI DNS Virtual Service for name resolution.
CuriousTechie: Thank you! This is useful information, and I will try to build a lab on this and come back if I need more help. On the next meet we can talk more about the specifics of setting up the GSLB and available LB algorithms etc.
ITGuy: Sure! Until next time! Happy learning!


One Reply to “”