The purpose of this is to support a little bit on Azure Load Balancer
and floating IP when you're using SQL Server Always On availability
group clusters in the cloud, okay? This is on the AZ‑801 objective so
it's important that we cover this.
The Azure Load Balancer is a software appliance, it's an Azure native
resource, that provides high availability for non‑clustered hosts.
So on the diagram at right,
you can see coming in over the internet on TCP port 80, those service
requests are handled by the front end of a Public Load Balancer, that's
an Azure resource with a public internet accessible IP. We've configured
a load balancing rule on that load balancer to forward that TCP 80
traffic to one back‑end node that are identically configured web servers
in this example.
Now you'll note that the Azure Load Balancer actually can be
deployed entirely within an Azure virtual network,
this is the internal load balancer, and this is what's happening in the
diagram at right with the database back end. Actually it looks like its
Business Tier, so it's TCP 443. But I want you to know, though, that the Azure
Load Balancer is a general purpose load balancer,
it's happy to load balance any port. And you might remember,
you might want to remember, that the default port for SQL
Server is TCP 1433. If you're familiar with the Open Systems
Interconnection reference model, the Azure Load Balancer functions at Layer 4,
which means it makes its routing decisions based on IP
addresses, source and destination IP address,
source and destination port number, and protocol. Azure Load Balancer is
normally deployed regionally, and that makes sense given that your virtual
network and your virtual machines are all regional, but there's actually a
global option, and this allows you to put a second public load balancer in
front of a number of child regional load balancers. So you have some
multi‑region load balancing going on with Azure Load Balancer, it's pretty
cool.
So drilling in further, the concept of the floating IP is
this. As you can see in this example, let's just focus in
on the DataSubnet at right,
you've got a private IP that falls within the range of 10.200.1, that's the
subnet range here on the DataSubnet, and so requests from web1,
web2,
web3 for the database will go through that load balancer's front end.
But you might think, well wait a minute now, you said that an Always On
availability group has a listener address,
how do you reconcile the cluster listener IP address with the
private IP on the front of the load balancer?
Well that's this property that you set in the Azure Load Balancer
called floating IP. It's just a simple checkbox control,
it's not a Microsoft proprietary technology,
it's actually called Direct Server Return, but Microsoft calls
it floating IP. And at the end of the day, all you're doing is
ensuring that that front end on the load balancer is the same IP
address as your listener.
Why is that important?
Well because when the requests come into the front end of the load
balancer and that address is the same as the listener,
you're basically just passing through the load
balancer directly to the listener.
And if you do a failover, that listener is going to be updated
with a new MAC address of which server it should then route
traffic to. You see what I mean?
So, long story short, that floating IP property is a real big deal
breaker in terms of an administrator trying to get Always On
availability group clusters available in an Azure VM.
If you forget to set floating IP, you've got some problems. I'll show you this in our demo upcoming.