CREATING SQL SERVER DISASTER RECOVERY SOLUTIONS WITH SIOS DATAKEEPER Learn how DataKeeper Cluster Edition can be used to create disaster recovery solutions for SQL Server deployments. By Allan Hirt, SQLHA LLC
The Current State of SQL Server Disaster Recovery Most companies architect solutions to be highly available, but do not always account for disaster recovery. The concepts behind both high availability and disaster recovery are similar make your systems available when you need them. Disaster recovery is for when an event like your data center being down occurs, you need to flip a proverbial switch and get up and running elsewhere. One of the reasons that many do not pursue disaster recovery is that it can get to be complicated, expensive, and hard to implement depending on the solution. Built into SQL Server, there are four common options for creating a disaster recovery solution: Geographically dispersed failover cluster Database mirroring Availability groups Log shipping A geographically dispersed failover cluster involves mirroring of the storage at the hardware level, which means the solution is essentially not being controlled by the DBAs. Database mirroring is depreacated in SQL Server 2012 and is not really a recommended solution. Availability groups is a feature introduced in SQL Server 2012 and has aspects of both a clustered implementation of SQL Server as well as database mirroring. Depending on the solution desired, availability groups could potentially be a complex deployment. Last but not least, log shipping is based on backup and restore and is arguably the most common method of creating a disaster recovery solution. There is also another option available to you: use a non-microsoft solution such as DataKeeper Cluster Edition. This paper will discuss how DataKeeper can be used to create disaster recovery for SQL Server deployments. DataKeeper Cluster Edition Disaster Recovery Solutions for SQL Server There are three ways that DataKeeper Cluster Edition can be part of a disaster recovery solution for SQL Server Geographically dispersed failover cluster Amazon EC2 Cloud-based high availability and disaster recovery Hybrid solution for an on-premise/cloud solution Geographically Dispersed Windows Server Failover Cluster The concept of a geographically dispersed Windows Server failover cluster (WSFC) is simple: the cluster nodes are split across two different sites. If shared storage is used as part of the cluster, the storage must somehow be mirrored from Site 1 to Site 2. Since the most common method to create a clustered instance of SQL Server on a WSFC, also known as an FCI, is to use shared storage for its databases and backups. DataKepper Cluster Edition has already been able to be used as part of this type of configuration for a long time, so it is already a proven solution. It would look something like what is shown in Figure 1. www.us.sios.com - 2 - Email: sales@us.sios.com
Figure 1. Example geographically dispersed WSFC This solution is also similar to the one described in the paper Creating Non-Shared Storage SQL Server Failover Cluster Instances with SIOS DataKeeper and Fusion-io, so that solution can be extended to be a diaster recovery one as well.one thing that has not yet been discussed in the prior paper or this one is that DataKeeper Cluster Edition can have multiple targets from a single source. So it can not only be used to create disaster recovery, but in the case of something like the Fusion-io solution with SQL Server, it can create both high availability and disaster recovery without ever needing shared storage. For SQL Server professionals, the biggest difference with a solution like this is that it is block level, not transactional. This means that the bits on the disk are transferred from A to B at a low level and SQL Server has no interaction with it. Solutions like availability groups and log shipping are based on SQL Server transactions. Both are valid, and SQL Server will be consistent if you bring up your disaster recovery solution (meaning that if there is an incomplete transaction, it will not get applied). It is also worth noting that while it is a WSFC, when switching sites, there generally is some manual intervention somewhere in the process to get the disaster recovery site functional. You need to understand the pros and cons of each type of solution before embarking on the right solution for you. The biggest challenge in any geographically dispersed WSFC solution is networking. Discussing networking at length is outside the scope of this paper, but realize that to have a reliable and performing solution, dedicated networks will be required for things like DataKeeper traffic and WSFC communication. If the sites will span multiple subnets, that can also complicate things. The bottom line is that planning your geographically dispersed cluster solution is not necessarily a trivial matter. DataKeeper Cluster Edition makes the I/O mirroring part easy, but anything underneath that must be carefully thought out. www.us.sios.com - 3 - Email: sales@us.sios.com
Amazon EC2 Cloud-based Disaster Recovery DataKeeper can also make SQL Server instances ready for disaster recovery if you are using Amazon EC2. Just because what you are doing is in the cloud does not mean you can avoid planning for disaster recovery. EC2 has the concept of regions and availability zones. A region is a geographically different location where your EC2 servers may be, whereas an availability zone is contained within a single region. For more detailed information on regions and availability zones, see http://amzn.to/12jbkm7. Assume for a moment you have a SQL Server deployment in EC2 that you want to ensure has protection.you do not plan on going across regions because you feel one is fine, but you would like to span availability zones. While you could use some of the aforementioned SQL Server features, one option would be to use DataKeeper Standard Edition. The solution would look like Figure 2. Figure 2. Using DataKeeper to make SQL Server available in EC2 in the same region Figure 2 assumes that the standby SQL Server instance is not online and it would only be brought online in the event of an emergency. The proper processes would need to be in place to ensure that the instance which is offline could be brought online properly. By lowering the utilization of the standby server, you may be able to save some cost at the tradeoff of some time and processes needed to get up and running. Another option is to use DataKeeper Cluster Edition to create a WSFC with an FCI in the cloud. SIOS is an Amazon Web Services Technology Partner. While creating a cluster may add a bit of complexity to an EC2 deployment, it allows you to use familiar deployment methods for SQL Server FCIs in the cloud. The solution would look something like Figure 3 if staying within the same Amazon EC2 region. www.us.sios.com - 4 - Email: sales@us.sios.com
Figure 3. WSFC and FCI in EC2 If you did want to span regions and use the same region primarily for high availability and the second region for disaster recovery just like a geographically dispersed cluster the solution would look like Figure 4. The biggest concerns in this architecutre would be the placement of the file share witness (if applicable depending on the number of nodes) for quorum and if the node in the second EC2 region would be considered a vote in the WSFC. Figure 4. Spanning regions with DataKeeper and EC2 As noted in the last section, keep in mind that DataKeeper provides block level protection and transfers I/Os, but does not transfer SQL Server transactions. EC2 s different instance sizes have varying amounts of network bandwidth associated with them. The amount of network throughput would affect DataKeeper. Therefore you would need to ensure that you choose the right instance size based on your usage of SQL Server. For more information on selecting an Amazon EC2 instance, see http://amzn.to/172weuf. Hybrid On-Premise/Cloud Disaster Recovery The last scenario where DataKeeper Cluster Edition could help with SQL Server disaster recovery is with solutions that have both on-premise servers (physical or virtual) as well as ones up in the cloud. The cloud, and in the case of DataKeeper, the ability to support Amazon EC2 (among many other public cloud vendors) opens up new possibilities for you. For some solutions, the cloud can be a very cost-effective way to achieve disaster recovery. The solution can essentially sit dormant in the cloud and be ready when and if you need it. For example, in the case of a standalone server with an instance of SQL Server, you can use DataKeeper to mirror the storage to a cloud-based server with SQL Server not online. www.us.sios.com - 5 - Email: sales@us.sios.com
The real challenge, not unlike a geographically dispersed cluster, comes in with networking. How do you span a physical network in your data center with servers that are up in Amazon EC2? One such method is documented in this link http://amzn.to/18ula4t. Obviously this is important because DataKeeper Cluster Edition requires networking for its replication. One of the nice things about DataKeeper is that even if you are using a traditional SQL Sever feature for high availability, you can still take advantage of DataKeeper Cluster Edition to create a hybrid disaster recovery solution; you do not have to necessarily pick one over the other. For example, if you were using a FCI in your data center, you could configure DataKeeper to mirror the storage with the application databases up to EC2 where they could easily be attached to a dormant SQL Server instance. Comparing the SIOS Cluster Products While DataKeeper Cluster Edition is the focus of this paper, SIOS also has two other products that could help you achieve high availability and disaster recover with SQL Server SIOS Protection Suite and DataKeeper Standard Edition. SIOS Protection Suite is different from both DataKeeper editions because it uses SIOS proprietary clustering technology and does not integrate with nor can it utilize a WSFC. DataKeeper Standard Edition also does not require WSFC. Standard Edition can provide protection akin to the scenario shown in Figure 2 in the cloud where the secondary SQL Server instance would be not be online but the disks would be replicated. The instance could then be brought online manually and the databases attached in SQL Server. These other two editions are options for those where Cluster Edition may not fit either the budget or solution that you are trying to put in place. For more information on DataKeeper Standard Edition, see http://bit.ly/1af57j7, and for more information about SIOS Protection Suite, consult http://bit.ly/198bcgt. SIOS Protection Suite DataKeeper Standard Edition DataKeeper Cluster Edition Multi-Subnet Failover Yes Yes manual failover only Only with SQL 2012 Enterprise Edition Integrates with Windows Server Failover Clustering No No Yes Windows Server Versions and Editions Supported 2003/R2 (Standard, Enterprise, 2008/R2 (Standard Enterprise, 2012 2003/R2 (Standard, Enterprise, 2008/R2 (Standard Enterprise, 2012 (Standard, 2003/R2 (Enterprise, 2008/R2 (Enterprise, 2012 (Standard, Requires Active Directory No No Yes Supports Automated Failover Supports Cloud Deployments Yes No Yes Yes Yes Yes Table 1. Comparison of the SIOS clustering products www.us.sios.com - 6 - Email: sales@us.sios.com
Conclusion DataKeeper Cluster Edition has already been used for years for diaster recovery in the form of geographically dispersed WSFCs by being utilized to mirror the storage. This in effect makes any clustered instance of SQL Server configured on that WSFC part of the disaster recovery solution. Today, DataKeeper can be extended in other scenarios such as protecting installations in Amazon EC2 between availability zones as well as help you build hybrid solutions where the cloud is your disaster recovery story. Whether you are a traditional IT shop or one blazing trails with the cloud, SIOS has a disaster recovery solution for your SQL Server deployments. 2013 SIOS Technology Corp. All rights reserved. SIOS, SIOS Technology, DataKeeper and SIOS Protection Suite and associated logos are registered trademarks or trademarks of SIOS Technology Corp. and/or its affiliates in the United States and/or other countries. All other trademarks are the property of their respective owners. www.us.sios.com - 7 - Email: sales@us.sios.com