Azure SQL VM's in Availability Set

sydney 1 Reputation point


I have a question regarding Azure Availability Set and specifically related to Azure SQL VM's. Assume I have the following configured in Azure:

  1. SQLRG (name of resource group)
  2. SQLVM1 (sql vm 1)
  3. SQLVM2 (sql vm 2)
  4. SQLAS (name of availability set)
  5. SQLLB (name of load balancer)

I am omitting the networking stuff and showing what's relevant for my question. The two vm's are members of domain
and have private static IP's and belong to SQLAS. I can RDP into VM1 and VM2; open SSMS and connect to these sql servers.

Here's my question: Can I use the frontend IP, assigned in the load balancer, and use it as an endpoint to connect to
these sql server VM's? From what I've read, the whole idea behind load balancer to load balance the traffic between member VM's. If problems are detected on SQLVM1, Azure will route traffic to SQLVM2. When I tried to connect using the frontend IP in SSM, i was not successful. Did I miss something?


SQL Server on Azure Virtual Machines
Azure Load Balancer
Azure Load Balancer
An Azure service that delivers high availability and network performance to applications.
422 questions
{count} votes

1 answer

Sort by: Most helpful
  1. msrini-MSFT 9,271 Reputation points Microsoft Employee

    Hi @SydneyLuu-9481,

    Load balancer works on Layer 4. So you can load balance traffic between VMs of your backend pool over a TCP or UDP port.

    If your SSMS ports on your VM is listening on port 1433, then create a rule in LB to load balance on port 1433. Note: Load balancing is active - active. So you cannot control to which VM you want to SSM to. Choose Load distribution as Client IP, so as long as client IP is same you will always reach the same VM. Make sure you configure health probe.

    If you don't want to load balance and simply get rid of the public IPs of your SSMS server and access each server via LB's IP separately, then you can go for Inbound NAT rules in your LB.