SIOS SANless clusters

SIOS SANless clusters High-availability Machine Learning monitoring

  • Home
  • Products
    • SIOS DataKeeper for Windows
    • SIOS Protection Suite for Linux
  • News and Events
  • Clustering Simplified
  • Success Stories
  • Contact Us
  • English
  • 中文 (中国)
  • 中文 (台灣)
  • 한국어
  • Bahasa Indonesia
  • ไทย

SQL Server 2016 Support For Distributed Transactions

August 21, 2018 by Jason Aw Leave a Comment

SQL Server 2016 Support For Distributed Transactions With AlwaysOn Availability Groups

SQL Server 2016 Support For Distributed Transactions with Always On Availability Groups sounds extremely promising. They did make some improvements in that regard, but it is not yet fully supported.

SQL Server 2016 Support For Distributed Transactions
Example of a Distribute Transaction Source – SQL Server 2016 DTC Support In Availability Groups

SQL Server 2016 Support For Distributed Transactions are only supported if the transaction is distributed across multiple instances of SQL Server. It is NOT supported if the transaction is distributed between different databases within the same instance of SQL Server. So in the picture above, if the databases are on separate SQL instances it will work. But not if the databases reside on the same instance which is more likely.

If you require distributed transaction support between different databases within the same SQL Server instance and you want high availability, you still must use a traditional SQL Server Always On Failover Cluster or a SANLess Cluster using DataKeeper.

Reproduced with permission from Clusteringformeremortals.com

Filed Under: Clustering Simplified Tagged With: AlwaysOn Failover Cluster, SQL Server, sql server 2016 support for distributed transactions

Deploy SQL Server Failover Clusters In Azure Resource Manager

August 19, 2018 by Jason Aw Leave a Comment

Deploying Microsoft SQL Server 2014 Failover Clusters in Azure Resource Manager

In this post, we will detail the specific steps required to Deploy SQL Server Failover Clusters In Azure Resource Manager. I will assume you are familiar with basic Azure concepts as well as basic SQL Server Failover Cluster concepts.

Deploying a 2-node SQL Server Failover Cluster in a single region of Azure using Azure Resource Manager is not rocket science. What I’ll focus in this article is the uniqueness about deploying a SQL Server Failover Cluster in Azure Resource Manager. If you are still using Azure Classic and need to deploy a SQL Server Failover Cluster in Classic,  read my article “STEP-BY-STEP: HOW TO CONFIGURE A SQL SERVER FAILOVER CLUSTER INSTANCE (FCI) IN MICROSOFT AZURE IAAS #SQLSERVER #AZURE #SANLESS”

Before we begin, let’s familiarize with the Windows Azure Article, High availability and disaster recovery for SQL Server in Azure Virtual Machines. In that article all of the HA options are outlined. This included AlwaysOn AG, Database Mirroring, Log Shipping, Backup and Restore and finally Failover Cluster Instances. Assuming you have dismissed those other options due to the costs associated with Enterprise Edition of SQL Server or lack of features, we are focusing on the final option – SQL Server AlwaysOn Failover Cluster Instance (FCI).

As you read that article it becomes clear that the lack of cluster aware shared storage in Azure is an obstacle in deploying SQL Server Failover clusters. However, there are a few alternatives described in that article. We will focus on using SIOS DataKeeper, to provide the storage to be used in the cluster.

Deploy SQL Server Failover Clusters In Azure Resource Manager
Figure 1 Microsoft’s support policy for SQL Server Failover Clusters https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-classic-sql-dr/

With DataKeeper Cluster Edition you are able to take the locally attached storage, whether it is Premium or Standard Disks, and replicate those disks either synchronously, asynchronous or a mix or both, between two or more cluster nodes. In addition, a DataKeeper Volume resource is registered in Windows Server Failover Clustering which takes the place of a Physical Disk resource. Instead of controlling SCSI-3 reservations like a Physical Disk Resource, the DataKeeper Volume controls the mirror direction, ensuring the active node is always the source of the mirror. As far as SQL Server and Failover Clustering is concerned, it looks, feels and smells like a Physical Disk and is used the same way Physical Disk Resource would be used.

Pre-Requisites To Deploy SQL Server Failover Clusters In Azure Resource Manager

  • You have used the Azure Portal before and are comfortable deploying virtual machines in Azure IaaS.
  • Have obtained a license or eval license of SIOS DataKeeper
  • Are familiar with SQL Server AlwaysOn Failover Cluster Instance. If not, please review the documentation here https://msdn.microsoft.com/en-us/library/ms189134.aspx

The Easy Way To Do A Proof-Of-Concept

If you are familiar with Azure Resource Manager you know one of the great new features is the ability to use Deployment Templates to rapidly deploy applications consisting of interrelated Azure resources. Many of these templates are developed by Microsoft and are readily available in their community on Github as “Quickstart Templates”. Community members are also free to extend templates or to publish their own templates on GitHub. One such template entitled “SQL Server 2014 AlwaysOn Failover Cluster Instance with SIOS DataKeeper Azure Deployment Template” published by SIOS Technology completely automates the process of deploying a 2-node SQL Server FCI into a new Active Directory Domain.

To deploy this template it is as easy as clicking on the “Deploy to Azure” button in the template.

Deploy SQL Server Failover Clusters In Azure Resource Manager
Figure 2- Visit https://github.com/SIOSDataKeeper/SIOSDataKeeper-SQL-Cluster to rapidly provision a 2-node SQL cluster

Deploying A SQL Server Failover Cluster Instance Using The Azure Portal

While the automated Azure deployment template is a quick and easy way to get a 2-node SQL Server FCI upon and running quickly, there are some limitations. For one, it uses a 180 Day evaluation version of SQL Server, so you can’t use it in production unless you upgrade the SQL eval licenses. Also, it builds an entirely new AD domain so if you want to integrate with your existing domain you are going to have to build it manually.

To build a 2-node SQL Server Failover Cluster Instance in Azure, we are going to assume you have a basic Virtual Network based on Azure Resource Manager (not Azure Classic) and you have at least one virtual machine up and running and configured as a Domain Controller. Once you have a Virtual Network and a Domain configured, you are going to provision two new virtual machines which will act as the two nodes in our cluster.

Our environment will look like this:

DC1 – Our Domain Controller and File Share Witness
SQL1 and SQL2 – The two nodes of our SQL Server Cluster

Provisioning The Cluster Nodes (SQL1 And SQL2)

Using the Azure Portal, we will provision both SQL1 and SQL2 exactly the same way. There are numerous options to choose from including instance size, storage options, etc. This guide is not meant to be an exhaustive guide to deploying SQL Server in Azure as there are some really good resources out there and more published every day. However, there are a few key things to keep in mind when creating your instances, especially in a clustered environment.

Availability Set – It is important that both SQL1, SQL2 AND DC1 reside in the same availability set. By putting them in the same Availability Set we are ensuring that each cluster node and the file share witness reside in a different Fault Domain and Update Domain. This helps guarantee that during both planned maintenance and unplanned maintenance the cluster will continue to be able to maintain quorum and avoid downtime.

Deploy SQL Server Failover Clusters In Azure Resource Manager
Figure 3 – Be sure to add both cluster nodes and the file share witness to the same Availability Set

Static IP Address

Once each VM is provisioned, you will want to go into the setting and change the settings so that the IP address is Static. We do not want the IP address of our cluster nodes to change.

Deploy SQL Server Failover Clusters In Azure Resource Manager
Figure 4 – Make sure each cluster node uses a static IP

Storage

As far as Storage is concerned, you will want to consult Performance best practices for SQL Server in Azure Virtual Machines. In any case, you will minimally need to add at least one additional disk to each of your cluster nodes. DataKeeper can use Basic Disk, Premium Storage or even Storage Pools consisting of multiple disks in a storage pool. Just be sure to add the same amount of storage to each cluster node and configure it identically.

Deploy SQL Server Failover Clusters In Azure Resource Manager
Figure 5 – make sure to add additional storage to each cluster node

Create The Cluster

Assuming both cluster nodes (SQL1 and SQL2) have been provisioned as described above and added to your existing domain, we are ready to create the cluster. Before we create the cluster, there are a few Features that need to be enabled. These features are .Net Framework 3.5 and Failover Clustering. These features need to be enabled on both cluster nodes.

Deploy SQL Server Failover Clusters In Azure Resource Manager
Figure 6 – enable both .Net Framework 3.5 and Failover Clustering features on both cluster nodes

Once those features have been enabled, you are ready to build your cluster. Most of the steps I’m about to show you can be performed both via PowerShell and the GUI. However, I’m going to recommend that for this very first step you use PowerShell to create your cluster. If you choose to use the Failover Cluster Manager GUI to create the cluster, you will find that you wind up with the cluster being issues a duplicate IP address.

Without going into great detail, what you will find is that Azure VMs have to use DHCP. By specifying a “Static IP” when we create the VM in the Azure portal all we did was create sort of a DHCP reservation. It is not exactly a DHCP reservation because a true DHCP reservation would remove that IP address from the DHCP pool. Instead, this specifying a Static IP in the Azure portal simply means that if that IP address is still available when the VM requests it, Azure will issue that IP to it. However, if your VM is offline and another host comes online in that same subnet it very well could be issued that same IP address.

There is another strange side effect to the way Azure has implemented DHCP. When creating a cluster with the Windows Server Failover Cluster GUI when hosts use DHCP (which they have to), there is not option to specify a cluster IP address. Instead it relies on DHCP to obtain an address. The strange thing is, DHCP will issue a duplicate IP address, usually the same IP address as the host requesting a new IP address. The cluster will usually complete, but you may have some strange errors and you may need to run the Windows Server Failover Cluster GUI from a different node in order to get it to run. Once you get it to run you will want to change the cluster IP address to an address that is not currently in use on the network.

You can avoid that whole mess by simply creating the cluster via Powershell and specifying the cluster IP address as part of the PowerShell command to create the cluster.

You can create the cluster using the New-Cluster command as follows:

New-Cluster -Name cluster1 -Node sql1,sql2 -StaticAddress 10.0.0.101 -NoStorage

After the cluster creation completes, you will also want to run the cluster validation by running the following command:

Test-Cluster
Deploy SQL Server Failover Clusters In Azure Resource Manager
Figure 7 – The output of the cluster creation and the cluster validation commands

Create File Share Witness

Because there is no shared storage, you will need to create a file share witness on another server in the same Availability Set as the two cluster nodes. By putting it in the same availability set you can be sure that you only lose one vote from your quorum at any given time. If you are unsure how to create a File Share Witness you can review this article http://www.howtonetworking.com/server/cluster12.htm. In my demo I put the file share witness on domain controller. I have published an exhaustive explanation of cluster quorums at https://blogs.msdn.microsoft.com/microsoft_press/2014/04/28/from-the-mvps-understanding-the-windows-server-failover-cluster-quorum-in-windows-server-2012-r2/In

Install DataKeeper

After the cluster is created it is time to install DataKeeper. It is important to install DataKeeper after the initial cluster is created so the custom cluster resource type can be registered with the cluster. If you installed DataKeeper before the cluster is created you will simply need to run the install again and do a repair installation.

Deploy SQL Server Failover Clusters In Azure Resource Manager
Figure 8 – Install DataKeeper after the cluster is created

During the installation you can take all of the default options.  The service account you use must be a domain account and be in the local administrators group on each node in the cluster.

Deploy SQL Server Failover Clusters In Azure Resource Manager
Figure 9 – the service account must be a domain account that is in the Local Admins group on each node

Once DataKeeper is installed and licensed on each node you will need to reboot the servers.

Create The DataKeeper Volume Resource

To create the DataKeeper Volume Resource you will need to start the DataKeeper UI and connect to both of the servers.
Deploy SQL Server Failover Clusters In Azure Resource Manager

Connect to SQL1
Deploy SQL Server Failover Clusters In Azure Resource Manager

Connect to SQL2
Deploy SQL Server Failover Clusters In Azure Resource Manager

Once you are connected to each server, you are ready to create your DataKeeper Volume. Right click on Jobs and choose “Create Job”
Deploy SQL Server Failover Clusters In Azure Resource Manager

Give the Job a name and description.
Deploy SQL Server Failover Clusters In Azure Resource Manager

Choose your source server, IP and volume. The IP address is whether the replication traffic will travel.
Deploy SQL Server Failover Clusters In Azure Resource Manager

Choose your target server.
Deploy SQL Server Failover Clusters In Azure Resource Manager

Choose your options. For our purposes where the two VMs are in the same geographic region we will choose synchronous replication. For longer distance replication you will want to use asynchronous and enable some compression.
Deploy SQL Server Failover Clusters In Azure Resource Manager

By clicking yes at the last pop-up you will register a new DataKeeper Volume Resource in Available Storage in Failover Clustering.
Deploy SQL Server Failover Clusters In Azure Resource Manager

You will see the new DataKeeper Volume Resource in Available Storage.
Deploy SQL Server Failover Clusters In Azure Resource Manager

 

Install The First Cluster Node

You are now ready to install your first node. The cluster installation will proceed just like any other SQL cluster that you have ever built. I have not copied every screen shot, just a few to guide you along the way.
Deploy SQL Server Failover Clusters In Azure Resource ManagerDeploy SQL Server Failover Clusters In Azure Resource ManagerDeploy SQL Server Failover Clusters In Azure Resource ManagerDeploy SQL Server Failover Clusters In Azure Resource Manager

You see that the DataKeeper Volume Resource is recognized as an available disk resource, just as if it were a shared disk.
Deploy SQL Server Failover Clusters In Azure Resource Manager

Make note of the IP address you select here. It must be a unique IP address on your network. We will use this same IP address later when we create our Internal Load Balancer.
Deploy SQL Server Failover Clusters In Azure Resource Manager

Add The Second Node

After the first node installs successfully, you will start the installation on the second node using the “Add node to a SQL Server failover cluster” option. Once again, the install is pretty straight forward, just use standard best practices as you would any other SQL cluster installation.
Deploy SQL Server Failover Clusters In Azure Resource ManagerDeploy SQL Server Failover Clusters In Azure Resource ManagerDeploy SQL Server Failover Clusters In Azure Resource ManagerDeploy SQL Server Failover Clusters In Azure Resource Manager

Create The Internal Load Balancer

Here is where failover clustering in Azure is different than traditional infrastructures. The Azure network stack does not support gratuitous ARPS, so clients cannot connect directly to the cluster IP address. Instead, clients connect to an internal load balancer and are redirected to the active cluster node. What we need to do is create an internal load balancer. This can all be done through the Azure Portal as shown below.

First, create a new Load Balancer
Deploy SQL Server Failover Clusters In Azure Resource Manager

You can use an Public Load Balancer if your client connects over the public internet. But assuming your clients reside in the same vNet, we will create an Internal Load Balancer. The important thing to take note of here is that the Virtual Network is the same as the network where your cluster nodes reside. Also, the Private IP address that you specify will be EXACTLY the same as the address you used to create the SQL Cluster Resource.
Deploy SQL Server Failover Clusters In Azure Resource Manager

Deploy SQL Server Failover Clusters In Azure Resource Manager

After the Internal Load Balancer (ILB) is created, you will need to edit it. The first thing we will do is to add a backend pool. Through this process you will choose the Availability Set where your SQL Cluster VMs reside. However, when you choose the actual VMs to add to the Backend Pool, be sure you do not choose your file share witness. We do not want to redirect SQL traffic to your file share witness.
Deploy SQL Server Failover Clusters In Azure Resource Manager

Deploy SQL Server Failover Clusters In Azure Resource Manager

The next thing we will do is add a Probe. The probe we add will probe Port 59999. This probe determines which node is active in our cluster.

Deploy SQL Server Failover Clusters In Azure Resource Manager

And then finally, we need a load balancing rule to redirect the SQL Server traffic. In our example we used a Default Instance of SQL which uses port 1433. You may also want to add rules for 1434 or others depending upon your applications requirements. The important thing to notice in the screen shot below is the Direct Server Return is Enabled. Make sure you make that change.

Fix The SQL Server IP Resource

One last step to Deploy SQL Server Failover Clusters In Azure Resource Manager. Run the following PowerShell script on one of your cluster nodes. This will allow the Cluster IP Address to respond to the ILB probes and ensure that there is no IP address conflict between the Cluster IP Address and the ILB. Please take note; you will need to edit this script to fit your environment. The subnet mask is set to 255.255.255.255, this is not a mistake, leave it as is. This creates a host specific route to avoid IP address conflicts with the ILB.

# Define variables
$ClusterNetworkName = “” 
# the cluster network name 
(Use Get-ClusterNetwork on Windows Server 2012 of higher to find the name)
$IPResourceName = “” 
# the IP Address resource name 
$ILBIP = “” 
# the IP Address of the Internal Load Balancer (ILB)
Import-Module FailoverClusters
# If you are using Windows Server 2012 or higher:
Get-ClusterResource $IPResourceName | Set-ClusterParameter 
-Multiple @{Address=$ILBIP;ProbePort=59999;SubnetMask="255.255.255.255";
Network=$ClusterNetworkName;EnableDhcp=0}
# If you are using Windows Server 2008 R2 use this: 
#cluster res $IPResourceName /priv enabledhcp=0 address=$ILBIP probeport=59999  
subnetmask=255.255.255.255

Conclusion

You should now have a functioning SQL Server Failover Cluster Instance. Facing problems to Deploy SQL Server Failover Clusters In Azure Resource Manager? Reach out to me on Twitter @daveberm and I will be glad to assist. If you need a DataKeeper evaluation key fill out the form at http://us.sios.com/clustersyourway/cta/14-day-trial, SIOS will send an evaluation key sent out to you.

Reproduced with permission from Clusteringformeremortals.com

Filed Under: Clustering Simplified Tagged With: Azure, Azure Resource Manager, deploy sql server failover clusters in azure resource manager, Failover Clusters, SQL Server

SQL Server on Linux High Availability Features and Considerations

August 17, 2018 by Jason Aw Leave a Comment

SIOS will be speaking at Microsoft SQLSaturday event

Speaker Jason Aw, Strategic Business Development, SIOS Technology Corp, will be sharing in this one hour session about SQL Server on Linux High Availability Features and Considerations.

With SQL Server on Linux, Microsoft brings SQL Server’s core relational database engine to the growing enterprise Linux ecosystem. High Availability and Disaster Recovery (HADR) are aspects of SQL Server that are critically important and in this session we discuss the features, limitations and options for High Availability and how SANless clustering can ensure proper functionality, availability and reliability for SQL Server on Linux, on-premise and in the Azure cloud.

Jason is a passionate IT leader with over 20 years of experience in technology, infrastructure, cloud environments particularly with high availability and disaster recovery solutions for different architectures including SQL database applications. For more information on SIOS, please contact here.

Track: Track 3

Level: Intermediate

You Are Invited To Join Us At SQLSaturday

SQLSaturday is a free training event for Microsoft Data Platform professionals and those wanting to learn about SQL Server, Business Intelligence and Analytics.

This event will be held on Aug 18 2018 at Microsoft Singapore Operations Pte Ltd, #22-01 One Marina Boulevard, Singapore, Singapore, 018989, Singapore

REGISTER NOW

About The Event

Welcome to SQLSaturday

We are proud to host SQLSaturday for the 3rd consecutive year in Singapore. SQLSaturday is a training event for SQL Server and data professionals who want to learn how to elevate their careers to the next level.

Admittance to this event is free, all costs are covered by donations and sponsorship. Please register soon as seating is limited, and let friends and colleagues know about the event.

It is a great opportunity to learn from Microsoft Product Team, Microsoft MVPs, SQL Server authors, and professionals who have been through and can relate to the obstacles you have day to day. This one day training event is unlike any other providing free food, training, networking, and also provide opportunity to win a few prizes!

Date & Time: Saturday, August 18th, 2018 – 8:30 AM to 5:30 PM

Cost: Free

Venue: #21-01 One Marina Boulevard, Singapore – 018989

Filed Under: News and Events Tagged With: High Availability, Microsoft, SQL Server, SQL Server High Availability, SQLSaturday

Join My Session On Deploying Highly Available SQL Server in Azure

March 31, 2018 by Jason Aw Leave a Comment

@Sqlsatnash Deploying Highly Available SQL Server In #Azure Session At SQL Saturday Nashville, Jan 16th

I’ll be heading to Nashville to share about deploying highly available SQL server. While there, there is a couple of things that I can’t wait to catch up on  – Technology and music. While I’m there, I certainly hope I am able to have some good music at The Station Inn.

Come By My Session On Deploying Highly Available SQL Server in Azure

Jan 16th is going to be a great day of learning and networking. Hang out with my #SQLPass family and join my session. This hour long session is great for those who are keen in learning about deploying SQL Server in Azure.

On Cloud Database/Application Development & Deployment

As we are already aware, Windows Azure is an excellent IaaS platform to deploy SQL Server. There is a need to plan for high availability and disaster recovery even as Microsoft manages the infrastructure. In this session, learn how to leverage Azure Fault Domains, Upgrade Domains, and Internal Load Balancers to ensure high availability of SQL Server deployments within the Azure cloud. You will learn to see the difference between Azure Classic and Azure Resource Manager. And at the same time, how it would affect your SQL Server availability. While Microsoft Azure offers SLA’s of 99.95%, make sure your SQL Server deployment qualifies. Again, this session is best suited for those with intentions to move or have already moved your SQL Servers instances to Azure. By the way, participants for this session should have a basic knowledge of SQL Server AlwaysOn Failover Clustering as well as Availability Groups. But if you don’t, no fear because you should be able to catch up pretty fast with a little bit of practice and experimenting.

Reproduced with permission from https://clusteringformeremortals.com/2015/12/21/sqlsatnash-deploying-highly-available-sql-server-in-azure-session-at-sql-saturday-nashville-jan-16th/

Filed Under: Clustering Simplified Tagged With: Azure, Clustering, Highly Available SQL Server, SQL Server

Configure SQL Server Alwayson Internal Load Balancer with Resource Manager

March 16, 2018 by Jason Aw Leave a Comment

Configuring The SQL Server Alwayson Internal load Balancer For The Client Listener In Azure Resource Manager (ARM) Deployment Model #Sqlpass

Take Your Pick With Two Deployment Models

What we are going to go through in this article is configuring the SQL Server Alwayson internal load balancer on the Resource Manager deployment model.

In case you didn’t know, Azure has two deployment models: Resource Manager (ARM) and Classic Deployment. Classic deployment is the “old” way of doing things and ARM is the new way of doing things. There are numerous benefits to using ARM as described in the Azure article Understanding Resource Manager deployment and classic deployment. However, one of my favorite new features of ARM is the ability to have three Fault Domains per Availability Set rather than just the two Fault Domains you get with the Classic deployment model. This is a critical feature for SQL Server High Availability.

Resource Manager Deployment Model

With three fault domains, you can ensure that each cluster node in a two node cluster and the file share witness all reside in different fault domains. This eliminates the possibility the failure of a single Fault Domain would impact more than one quorum vote in your cluster.

Classic Deployment Model

In the Classic Deployment model with two fault domains you could only put two cluster nodes in an availability set. For maximum availability, you really needed to put your file share witness in a different geographic location. There was no guarantee that it wouldn’t wind up in the same fault domain as one of the cluster nodes and if you kept it in the same geographic location. This means that the failure of a single fault domain could impact 2 out of your 3 quorum votes. It would bring down your entire cluster. ARM’s three Fault Domains eliminates that possibility.

Azure Resource Manager

ARM is definitely the way to go as new Azure features are only being introduced in ARM. However, the documentation is light and some features are not quite there yet.  Including such things as documented support for ExpressRoute. Both of these problems get better almost daily. But early adopters really have to work extra hard until Azure catches up. One other issue is that you can’t mix Classic and ARM deployments. So if you started down the road with Classic deployments, you are basically going to have to start from the ground up with Resource Manager when you make the switch. If you can manage a little pain now, it will help you avoid a larger headache next year. Especially, when you find that you want some new feature only available in ARM.

Getting High Availability SQL Server

I hope this article helps you in at least one of aspect of your ARM deployment – getting highly available SQL Server deployed. As I have documented in earlier articles, deploying both AlwaysOn Availability Groups and AlwaysOn Failover Cluster Instances in Azure “Classic” requires the use of an Azure Load Balancer (internal or external) for client redirection. Getting that configured in Classic Azure is not exactly straight forward. But it is documented well enough that any administrator reasonably familiar with Azure, Failover Clustering, SQL Server and PowerShell can get it to work.

Configuring ILB and updating SQL cluster IP Resource

AlwaysOn Availability Groups and AlwaysOn Failover Cluster Instances using the ARM deployment model still requires the use of an Azure Load Balancer for client redirection. However the steps on creating and configuring that load balancer are completely different. As of today, it is also not exactly documented very well.

In this article, I’m going to highlight the steps required to configure the SQL Server AlwaysOn Internal Load Balancer and update the SQL cluster IP Resource. In the next article I will walk you through the entire process step by step from the ground up from creating the vNet to installing SQL and creating the cluster.

Here We Go

Before we begin, I’m making the following assumptions that you have done the following:

  • Created a vNet using ARM
  • Provisioned 3 ARM based VMs (DC, SQL1, SQL2)
  • Put DC, SQL1 and SQL2 in the same Availability Set and Resource Group
  • Created a cluster with SQL1 and SQL2 and used the DC for the file share witness
  • Created an AlwaysOn Availability Group or AlwaysOn Failover Cluster instance with SIOS DataKeeper Cluster Edition. In either case you will wind up with a client listener, consisting of a name resource and IP resource. The AlwaysOn AG and Failover Cluster Instances configuration up to the point of creating the load balancer is exactly the same as it is in the Azure Classic deployment model. It is documented on the web in many places including my own blog post

A Quick Tip

Now that you have a fully configured AlwaysOn AG or Failover Cluster Instances, you probably notice that you can’t connect to the cluster name from any server other than the node that currently hosts the SQL cluster name resource. I’ve been told that this is because Azure networking does not support gratuitous ARPS. Hence, clients can’t communicate directly with the cluster IP address. Instead the clients need to communicate with the ILB and the ILB will redirect traffic to the active node. So step 1 is to create the ILB. As of now this can’t be done through the Azure Portal, so we will use the following Azure PowerShell command.

[1/6/2016 Update – The directions below assume you are using Azure PowerShell pre-version 1. The script if you are using Azure PowerShell Version 1 or later is detailed in my blog post here.]

Switch-AzureMode -Name AzureResourceManager

Select-AzureSubscription -SubscriptionName "MSDN Azure"
# name whichever subscription you used to create your vNet and VMs

#Declare your variables using values relevant to your deployment

$ResourceGroupName ='SIOS-EAST-RG'
# Resource Group Name in which the SQL nodes are deployed

$FrontEndConfigurationName ='FE'
#Call it whatever you like

$BackendConfiguratioName ='BE'
#Call it whatever you like

$LoadBalancerName ='ILB'
#Provide a Name for the Internal Local balance object

$Location ='eastus2'
# Input the data center location of your SQL VMs

$subname ='PUBLIC'
# Provide the Subnet name in which the SQL Nodes are placed

$ILBIP = '10.0.0.201'
# Provide the IP address for the Listener or Load Balancer

$subnet = Get-AzureVirtualNetwork -ResourceGroupName $ResourceGroupName|
Get-AzureVirtualNetworkSubnetConfig –name $subname

$FEConfig = New-AzureLoadBalancerFrontendIpConfig 
-Name $FrontEndConfigurationName -PrivateIpAddress $ILBIP -SubnetId $subnet.Id

$BackendConfig = New-AzureLoadBalancerBackendAddressPoolConfig 
-Name $BackendConfiguratioName

#create the ILB
New-AzureLoadBalancer -Name $LoadBalancerName -ResourceGroupName 
$ResourceGroupName -Location $Location
-FrontendIpConfiguration $FEConfig -BackendAddressPool $BackendConfig

ILB Is Created

We should see it in the Azure Portal if we list all the objects in our Resource Group as shown below.

SQL Server Alwayson internal load balancer

The rest of the configuration I’m sure can also be done through PowerShell. But I’m going to use the GUI in my example. If you want to use PowerShell, you could probably piece together the script by looking at the article Get started configuring internal load balancer using Azure Resource Manager. Honestly that article gives me a headache. I’ll figure it out some day and try to document it in a user friendly format. For now I think the GUI is fine for the next steps.

Follow along with the screen shots below. If you get lost, follow the navigation hints at the top of the Azure Portal to figure out where we are.

Click Backend Pool setting tab. Selects the backend pool to update the Availability Set and Virtual Machines. Save your changes.

SQL Server Alwayson internal load balancer
Configure Load Balancer’s Probe by clicking Add on the Probe tab. Give the probe a name and configure it to use TCP Port 59999. I have left the probe interval and the unhealthy threshold set to the default settings. This means it will take 10 seconds before the ILB removes the passive node from the list of active nodes after a failover. It also means your clients may take up to 10 seconds to be redirected to the new active node. Be sure to save your changes.
SQL Server Alwayson internal load balancer

Navigate to the Load Balancing Rule Tab and add a new rule. Give the rule a sensible name (SQL1433 or something). Choose TCP protocol port 1433 (assuming you are using the default instance of SQL Server). Pick 1433 for the Backend port as well. For the Backend Pool, we will choose the Backend Pool we created earlier (BE). Next, for the Probe we will choose the Probe we created earlier. We do not want to enable Session persistence but we do want to enable Floating IP (Direct Server Return). I have left the idle timeout set to the default setting. But you might want to consider increasing that to the maximum value. I have seen some applications such as SAP log error messages each time the connection is dropped and needs to be re-established.

SQL Server Alwayson internal load balancer

At this point the ILB is configured. There is only one final step that needs to take place. We need to update the SQL IP Cluster Resource just the exact same way we had to in the Classic deployment model. To do that you will need to run the following PowerShell script on just one of the cluster nodes. And make note, SubnetMask=“255.255.255.255” is not a mistake. Use the 32 bit mask regardless of what your actual subnet mask is.

# This script should be run on the primary cluster node after the 
internal load balancer is created
# Define variables

$ClusterNetworkName = "Cluster Network 1"
# the cluster network name

$IPResourceName = "SQL IP Address 1 (SQLCluster1)"
# the IP Address resource name

$CloudServiceIP = "10.0.0.201"
# IP address of your Internal Load Balancer

Import-Module FailoverClusters

# If you are using Windows 2012 or higher, 
use the Get-Cluster Resource command. 
If you are using Windows 2008 R2, 
use the cluster res command which is commented out.

Get-ClusterResource $IPResourceName
Set-ClusterParameter -Multiple @{"Address"="$CloudServiceIP";
"ProbePort"="59999";SubnetMask="255.255.255.255";
"Network"="$ClusterNetworkName";"OverrideAddressMatch"=1;"EnableDhcp"=0}

# cluster res $IPResourceName /priv enabledhcp=0 
overrideaddressmatch=1 address=$CloudServiceIP probeport=59999 
subnetmask=255.255.255.255

One Final Note

In my initial test I still was not able to connect to the SQL Resource name even after I completed all of the above steps. After banging my head against the wall for a few hours I discovered that for some reason the SQL Cluster Name Resource was not registered in DNS. I’m not sure how that happened or whether it will happen consistently. If you are having trouble connecting I would definitely check DNS. Also, add the SQL cluster name and IP address as a new a record if it is not already in there.

And of course don’t forget the good ole Windows Firewall. You will have to make exceptions for 1433 and 59999 or just turn it off until you get everything configured properly like I did. You probably want to leverage Azure Network Security Groups anyway instead of the local Windows Firewall for a more unified experience across all your Azure resources.

Good luck and let me know how’s your experience configuring the SQL Server AlwaysOn Internal Load Balancer with Resource Manager.

Reproduced with permission from https://clusteringformeremortals.com/2015/10/29/configuring-the-sql-server-alwayson-ilb-for-the-client-listener-in-azure-resource-manager-arm-deployment-model-sqlpass/

Filed Under: Clustering Simplified Tagged With: Azure Resource Manager Deployment Model, SQL Server, SQL Server Alwayson internal load balancer

  • « Previous Page
  • 1
  • …
  • 11
  • 12
  • 13
  • 14
  • 15
  • …
  • 19
  • Next Page »

Recent Posts

  • Eliminating Single Points of Failure
  • 3 Challenges of Maintaining High Availability with a Legacy Infrastructure
  • LifeKeeper Generic Applications for High Availability and Disaster Recovery
  • SIOS Enterprise Support Guide: What Your Plan Covers
  • Why a Sandbox Environment Is Essential for High Availability

Most Popular Posts

Maximise replication performance for Linux Clustering with Fusion-io
Failover Clustering with VMware High Availability
create A 2-Node MySQL Cluster Without Shared Storage
create A 2-Node MySQL Cluster Without Shared Storage
SAP for High Availability Solutions For Linux
Bandwidth To Support Real-Time Replication
The Availability Equation – High Availability Solutions.jpg
Choosing Platforms To Replicate Data - Host-Based Or Storage-Based?
Guide To Connect To An iSCSI Target Using Open-iSCSI Initiator Software
Best Practices to Eliminate SPoF In Cluster Architecture
Step-By-Step How To Configure A Linux Failover Cluster In Microsoft Azure IaaS Without Shared Storage azure sanless
Take Action Before SQL Server 20082008 R2 Support Expires
How To Cluster MaxDB On Windows In The Cloud

Join Our Mailing List

Copyright © 2026 · Enterprise Pro Theme on Genesis Framework · WordPress · Log in