1 00:00:01,240 --> 00:00:05,700 The purpose of this is to support a little bit on Azure Load Balancer 2 00:00:05,700 --> 00:00:10,170 and floating IP when you're using SQL Server Always On availability 3 00:00:10,170 --> 00:00:14,470 group clusters in the cloud, okay? This is on the AZ‑801 objective so 4 00:00:14,470 --> 00:00:16,640 it's important that we cover this. 5 00:00:16,640 --> 00:00:20,790 The Azure Load Balancer is a software appliance, it's an Azure native 6 00:00:20,790 --> 00:00:25,030 resource, that provides high availability for non‑clustered hosts. 7 00:00:25,030 --> 00:00:26,340 So on the diagram at right, 8 00:00:26,340 --> 00:00:30,920 you can see coming in over the internet on TCP port 80, those service 9 00:00:30,920 --> 00:00:34,960 requests are handled by the front end of a Public Load Balancer, that's 10 00:00:34,960 --> 00:00:39,070 an Azure resource with a public internet accessible IP. We've configured 11 00:00:39,070 --> 00:00:43,390 a load balancing rule on that load balancer to forward that TCP 80 12 00:00:43,390 --> 00:00:47,640 traffic to one back‑end node that are identically configured web servers 13 00:00:47,640 --> 00:00:49,240 in this example. 14 00:00:49,240 --> 00:00:51,940 Now you'll note that the Azure Load Balancer actually can be 15 00:00:51,940 --> 00:00:55,370 deployed entirely within an Azure virtual network, 16 00:00:55,370 --> 00:00:58,840 this is the internal load balancer, and this is what's happening in the 17 00:00:58,840 --> 00:01:02,840 diagram at right with the database back end. Actually it looks like its 18 00:01:02,840 --> 00:01:07,560 Business Tier, so it's TCP 443. But I want you to know, though, that the Azure 19 00:01:07,560 --> 00:01:10,120 Load Balancer is a general purpose load balancer, 20 00:01:10,120 --> 00:01:13,390 it's happy to load balance any port. And you might remember, 21 00:01:13,390 --> 00:01:16,140 you might want to remember, that the default port for SQL 22 00:01:16,140 --> 00:01:21,080 Server is TCP 1433. If you're familiar with the Open Systems 23 00:01:21,080 --> 00:01:25,420 Interconnection reference model, the Azure Load Balancer functions at Layer 4, 24 00:01:25,420 --> 00:01:28,470 which means it makes its routing decisions based on IP 25 00:01:28,470 --> 00:01:31,540 addresses, source and destination IP address, 26 00:01:31,540 --> 00:01:36,300 source and destination port number, and protocol. Azure Load Balancer is 27 00:01:36,300 --> 00:01:40,390 normally deployed regionally, and that makes sense given that your virtual 28 00:01:40,390 --> 00:01:44,530 network and your virtual machines are all regional, but there's actually a 29 00:01:44,530 --> 00:01:49,850 global option, and this allows you to put a second public load balancer in 30 00:01:49,850 --> 00:01:56,220 front of a number of child regional load balancers. So you have some 31 00:01:56,220 --> 00:02:00,040 multi‑region load balancing going on with Azure Load Balancer, it's pretty 32 00:02:00,040 --> 00:02:01,140 cool. 33 00:02:01,140 --> 00:02:04,520 So drilling in further, the concept of the floating IP is 34 00:02:04,520 --> 00:02:08,270 this. As you can see in this example, let's just focus in 35 00:02:08,270 --> 00:02:10,130 on the DataSubnet at right, 36 00:02:10,130 --> 00:02:16,050 you've got a private IP that falls within the range of 10.200.1, that's the 37 00:02:16,050 --> 00:02:20,540 subnet range here on the DataSubnet, and so requests from web1, 38 00:02:20,540 --> 00:02:21,060 web2, 39 00:02:21,060 --> 00:02:25,790 web3 for the database will go through that load balancer's front end. 40 00:02:25,790 --> 00:02:29,520 But you might think, well wait a minute now, you said that an Always On 41 00:02:29,520 --> 00:02:32,020 availability group has a listener address, 42 00:02:32,020 --> 00:02:36,750 how do you reconcile the cluster listener IP address with the 43 00:02:36,750 --> 00:02:39,440 private IP on the front of the load balancer? 44 00:02:39,440 --> 00:02:42,730 Well that's this property that you set in the Azure Load Balancer 45 00:02:42,730 --> 00:02:46,240 called floating IP. It's just a simple checkbox control, 46 00:02:46,240 --> 00:02:49,160 it's not a Microsoft proprietary technology, 47 00:02:49,160 --> 00:02:53,000 it's actually called Direct Server Return, but Microsoft calls 48 00:02:53,000 --> 00:02:56,920 it floating IP. And at the end of the day, all you're doing is 49 00:02:56,920 --> 00:03:00,830 ensuring that that front end on the load balancer is the same IP 50 00:03:00,830 --> 00:03:02,940 address as your listener. 51 00:03:02,940 --> 00:03:04,440 Why is that important? 52 00:03:04,440 --> 00:03:07,800 Well because when the requests come into the front end of the load 53 00:03:07,800 --> 00:03:10,920 balancer and that address is the same as the listener, 54 00:03:10,920 --> 00:03:13,290 you're basically just passing through the load 55 00:03:13,290 --> 00:03:15,360 balancer directly to the listener. 56 00:03:15,360 --> 00:03:19,370 And if you do a failover, that listener is going to be updated 57 00:03:19,370 --> 00:03:22,820 with a new MAC address of which server it should then route 58 00:03:22,820 --> 00:03:24,540 traffic to. You see what I mean? 59 00:03:24,540 --> 00:03:28,680 So, long story short, that floating IP property is a real big deal 60 00:03:28,680 --> 00:03:32,630 breaker in terms of an administrator trying to get Always On 61 00:03:32,630 --> 00:03:35,810 availability group clusters available in an Azure VM. 62 00:03:35,810 --> 00:03:42,000 If you forget to set floating IP, you've got some problems. I'll show you this in our demo upcoming.