SQL 2012 AlwaysON Feature….What is it? How does it work?

As a Microsoft Solutions Architect, part of my job is to help the teams with solutions around the Microsoft stack.  Today, a colleague of mine reached out to me about the new SQL Server AlwaysOn feature that part of SQL 2012 and how it compared to SQL 2008 clustering….So I started with this topic to bring some understanding around it:

SQL Server AlwaysON
Prior to SQL Server 2012, SQL Server had several high availability and disaster recovery solutions for an enterprise’s mission critical databases such as failover clustering, database mirroring, log shipping or combinations of these. Each solution typically has a major limitation, in the case of failover clustering for example, its configuration is very tedious and complex and you arguably have single shared storage or single point of failure.

Database mirroring is relatively easy to configure in comparison with failover clustering, but you can have only one database in a single mirroring setup and you cannot read from the mirrored database. Log shipping does not provide automatic failover (higher availability) though it be used for disaster recovery with some expected data loss.

SQL Server AlwaysOn

SQL 2012 AlwaysOn Diagram

SQL Server 2012  introduced a new feature called AlwaysOn which combines the best of failover clustering and database mirroring and overcomes major of the limitations imposed in failover clustering or a database mirroring setup.

AlwaysOn is a High Availability (HA) and Disaster Recovery (DR) solution in SQL Server 2012 which improves high availability and protects data of your mission critical applications. AlwaysOn is the common name for two high availability and disaster recovery solutions:

AlwaysOn Failover Cluster Instance (FCI)
This is an enhancement to the existing SQL Server failover clustering (which is based on Windows Server Failover Cluster (WSFC)) which provides higher availability of SQL Server instance after failover. Some of the enhancements in AlwaysOn Failover Cluster Instance over the existing SQL Server failover clustering are:

  • Multisite failover clustering
  • Flexible failover policies to better control instance failover
  • Improved diagnostics capabilities out of the box

AlwaysOn Availability Group (AG)

This is a new HA/DR feature  in SQL 2012 and combines best of failover clustering and database mirroring. It allows you to create a group of databases which failover together as a unit from one replica/instance of SQL Server to another replica/instance of SQL Server in the same availability group. Each availability group that we create, allows you to create one (and only) availability group listener which is nothing but a Virtual Network Name (VNN) to be used by clients to connect to the availability group.

The AlwaysOn availability group is based on Windows Server Failover Cluster (WSFC) and hence you need to install the failover clustering feature on each server/replica and create a failover cluster adding all these server/replicas before you can start enabling/creating the availability group.

Availability Groups Compared To Traditional SQL Server Failover Clustering
In a typical SQL Server failover cluster (at the instance level), you will have two nodes/instances (Active-Passive or Active-Active) connected to shared storage drives. Though SQL Server failover clustering has been good and is used in many deployments for higher availability and disaster recovery, it has several limitations and pain points, such as:

  • The process of setting up SQL Server failover clustering is tedious and complex – there are some 30-40 steps that you have to perform missing any of those steps can result in hours of additional work. This is why setting up SQL Server failover clustering is only recommended to be performed by highly experienced professionals.
  • Both the nodes are connected to a shared storage drive; though these drives might have their own failover mechanisms we still can have a single point of failure.
    One of the nodes is idle all the time in case of Active-Passive cluster (recommended) and hence resources are underutilized. Though you have an Active-Active failover cluster this is not recommended as after failover one node will have double the load from both the cluster setup/applications.
  • The infrastructure and configuration of each node should be exactly same as other nodes and mimic each other.
  • You cannot distribute or load balance your read-write load from read only load on multiple nodes.
  • An AlwaysOn availability group is superior to SQL Server failover clustering because the configuration, deployment and management is relatively simple and all the nodes/replicas will a copy of the databases and hence there is no shared storage or a single point of failure. You can have readable secondary and hence you can route your read-only load to a secondary replica and the read-write load to primary replica and hence have better utilization of your hardware resources.

How Availability Group differs from database mirroring
Database mirroring (at database level) can be set up in either synchronous mode or asynchronous mode but not both in a single mirroring setup.

  1. Synchronous Commit mode (high-safety) : The transaction logs are hardened at both the principal server as well as at the mirror server before commit acknowledgement is returned to the client; it may introduce some latency but ensures no data loss after failover. In this mode you can also set automatic failover and for that you need another instance which will work as a witness and performs the job of role switching.
  2. Asynchronous Commit mode (high performance) : The principal server hardens the transaction log at the principal server and returns the commit acknowledgement to client without waiting for transaction log hardening acknowledgement to be received from the mirror server. Transaction log hardening at the mirror server happens in an asynchronous manner.

These all sound like good solutions, but like SQL Server failover clustering, it has also several limitations:

  1. You can have only one database in a single mirroring session/setup, though you can define multiple mirroring sessions/setups (one for each database) but it is not possible to have a group of databases failover together.
  2. Databases on mirror server are always in recovery mode and hence you cannot read from a mirrored database (though you can create a database snapshot and read from it but but would only reflect data till the particular point in time when it was created).
  3. You cannot load balance your read-write requests on one server and read-only on another server.
  4. You can have only one mirror server; you cannot have one for higher availability (synchronous commit mode) and one for disaster recovery (asynchronous commit mode) in one single mirroring session, although you can combine it with log shipping for disaster recovery.

An AlwaysOn availability group is recommended over database mirroring as this overcomes several limitations imposed in database mirroring, for example with an AlwaysOn availability group:

  1. You can have multiple mirrored instance/nodes/replicas (up to four secondaries apart from one primary replica) with a combination of synchronous commit mode and asynchronous commit mode both at the same time. The replica set up in synchronous commit mode can be used for higher availability (or for automatic failover) and the replica set up in asynchronous commit mode can be used for disaster recovery.
  2. You can combine two or more database together and failover them as a unit, you don’t need to do it for each database separately as you were doing in case of database mirroring.
  3. You can offload the read-only load from the primary replica to the secondary by configuring the secondary as readable. In this way you can have better utilization of secondary replica’s hardware resources.
  4. You can also offload backup operations from the primary replica to the secondary replica and hence have less workload/IO on the primary replica and better utilization of the secondary replica’s hardware.

So…as you can see….it is a welcomed feature in SQL Clustering technologies.  It reminds me a lot of the Exchange Available Groups for DB introduced in Exchange 2010.  There are some new upcoming features being announced for SQL AlwaysON at Ignite from what I hear.  Do we have SQL Azure integration coming?

Until next time, Rob…

Windows 2012 Feature…ODX….What is it?

Here is a little piece of tech that not many people know about….Offloaded data transfers…it brings fast file transfers on your storage devices. This feature will only work on storage devices with SPC4 and SBC3 specification implementation.  Also, this feature is for Windows 8 or Windows 2012 Server or above.

Offloaded data transfers (ODX)

To advance the storage data movement, Microsoft has developed a new data transfer technology – offloaded data transfer. Instead of using buffered read and buffered write operations, Windows ODX starts the copy operation with an offload read and retrieves a token representing the data from the storage device, then uses an offload write command with the token to request data movement from the source disk to the destination disk. The copy manager of the storage devices performs the data movement according to the token.

In the Windows 8, the IT manager and storage administrator are able to use the Windows ODX feature to interact with the storage device to move large files or data through the high-speed storage network. Windows ODX will significantly reduce client-server network traffic and CPU time usage during large data transfers because all the data movement is at the backend storage network. ODX can be used in virtual machine deployment, massive data migration, and tiered storage device support, and can lower the cost of physical hardware deployment through the ODX and thin provisioning storage features.

Take a look at this YouTube video of technology being demonstrated on the Nutanix Platform. This video was made by one of my colleagues at Nutanix. Great job Mike M….

Until next time, Rob…


My First Blog Post

My First Blog PostThis is my first blog post….Some of you make think this a little odd, but I have been in technology my entire life living it, but not telling my story….Well, that is going to change now going forward.

Well, here is a little about me….For more details review my professional profile on LinkedIn, www.linkedin.com/in/rcorradini. But to summarize, I am a Solutions Architect, specifically around Microsoft workloads.  I thrive to be the best in understanding Microsoft workloads, and sometime is pays off.  I was one of the first chosen as a VTSP\VTA for Microsoft over 4 years ago.

Microsoft Virtual Technology Sales Professional – A Virtual TSP is an employee of a Microsoft partner working on a joint sales effort with Microsoft. They possess excellent technical and customer skills. Virtual TSP are individuals within partners that are typically the best in their field and are chosen by Microsoft. These resources have: Microsoft purple badge holders , have vendor RAS access to Microsoft systems The role included doing technology presentations for the Microsoft CTM/CAM/EPG teams. Specializing in Lync, Exchange, MDOP, Azure, Office 365, System Center, Mobility, Intune, Server, and Windows 8.

In January of 2014 I was invited to the vTA program (Virtual Technology Architect). I was part of a small group trained in the use of the Microsoft Technology Centers in NYC and Cambridge, MA. I will be able to use the center to demonstrate the value of the Microsoft solution set to both technology professionals as well as business executives.
I have worked for Microsoft Gold partners for past 4 years as a Lead Microsoft Architect building  highly available solutions for customers.  My latest role has taken me out of delivering solutions. The next part of my journey has taken me from delivering solutions, but to teach and evangelist solutions. For me, this is a win-win situation. Teaching Microsoft Workloads on high performance, hyper converged technology. My current role is a Microsoft solutions architect for Business Development.at Nutanix.
So a little about Nutanix….

The Nutanix solution consists of the “Nutanix Virtual Computing Platform” which delivers enterprise compute and storage through the deployment of commodity computing servers (called nodes) which each run a standard hypervisor and the Nutanix Operating System (NOS). Each server contains Intel processors, memory, solid-state drives and traditional hard drives, and when added into a cluster aggregates storage resources into a single storage pool. Capacity is added by adding a node to the computing cluster.

Nutanix nodes run an industry standard hypervisor, such as ESXi, Hyper-V or KVM. On this hypervisor the Nutanix Controller VM (CVM) is deployed as a virtual machine. The CVM will service all the I/O for the hypervisor and its associated virtual machines. When clustered together, Nutanix nodes form a distributed computing platform called the “Nutanix Distributed File system” (NDFS). This is presented back to the hypervisor as NFS, iSCSI or Server Message Block depending on the hypervisor deployed.

So, as you can see, this is where I believe the future of Datacenter and Hybrid Cloud. and most recently, we have been rated the market leader as shown below:
“IDC (leading analyst firm) has published the first-ever market share report for HyperConverged solutions. We’re excited to report that Nutanix is credited with a dominate 52% market share – overwhelming all other vendors, including Simplivity, VSAN, Scale Computing, Pivot3, EMC ScaleIO and Maxta. (Old school “converged infrastructure” solutions, such as VCE and Flexpod are not included in this report)

IDC’s MarketScape is equivalent to Gartner’s Magic Quadrant, and ranks vendors based on execution, strategy, and market share. In addition to having 52% share, Nutanix is the only company to be placed fully in the leaders region.”

Report Highlights
• Nutanix market share: 52%
• “Nutanix has been a key player in the emergence of the hyperconverged market and was early to demonstrate demand for the technology. The result has been a leading position in mind share, as well as market share.”
• “Nutanix systems have diversified from targeted or specialized workloads like VDI to Tier 1 applications and highly virtualized general business workloads like SAP, Oracle, Microsoft Exchange, SQL Server, SharePoint, Splunk, and Unified Communications
So…Join me on Microsoft-Nutanix Journey…and reach for the cloud…..and beyond with HyperConverged……

Until next time, Rob