Question: I need to get clustering setup when using EC2 to host my SQL Server databases. How can I do this?
Answer: If you use native functionality, you can’t because Amazon’s EC2 service doesn’t offer a way to present the same disks to multiple virtual servers at the same time.
But thankfully, we aren’t linked to native functionality. A while back I wrote about DataKeeper Cluster Edition from SIOS Technology and how you can use it to build a high speed highly availability storage platform using Fusion ioDrive PCIe cards. The same software can be used to provide a high availability solution within the Amazon EC2 environment.
Setup DataKeeper Cluster Edition On 2 Amazon EC2 Servers
You need to setup a few things in before you can put DataKeeper Cluster Edition on two Amazon EC2 servers. The first thing that you need to setup is an Active Directory domain, or at least extend the Active Directory domain from your office to your Amazon EC2 servers. Now, this requirement isn’t actually a requirement of the DataKeeper Cluster Edition software, but it is a requirement of Microsoft Windows Failover Clustering.
When setting up the two virtual machines that you wish to cluster, it's required that the drive letters and the disk sizes of the two machines be the same. Using identical drive letters is again a Microsoft requirement as the SQL Server needs to have the same drive configuration on both nodes of the cluster.
Getting High Level Performance
The great thing with DataKeeper Cluster Edition is the fact that the SQL Server will perform at basically the same speed as the disk would perform without clustering and DataKeeper Cluster Edition installed. When it comes to getting the most speed out of your Amazon EC2 storage, DataKeeper Cluster Edition supports this as well. Getting this high level of performance is done in Amazon EC2 by adding many different disks to the server, then striping across those many disks in Windows using a RAID 0 stripe. This maximizes the amount of storage available to you in the Amazon EC2 virtual machine.
Setting up stripes to work with DataKeeper Cluster Edition is just as easy as setting up for a single virtual list. Once the stripe has been created on each of the two nodes, simply install the DataKeeper Cluster Edition software on each machine and setup the mirroring. The configuration of DataKeeper Cluster Edition is simple because DataKeeper Cluster Edition works at the disk letter level, not at the "physical" device level. so the configuration is extremely easy to get through.
Build a Stretch Cluster in Amazon EC2
Need to build a stretch cluster in Amazon EC2 because you want to be able to fail over from the U.S. East region (Northern Virginia) to the U.S. West region (Oregon)? That will require the ability to do asynchronous data movement between those two sites. DataKeeper Cluster Edition can handle that without issue, giving you the same level of functionality that you would have if you had two storage arrays: one in a data center in Virginia and one in a data center in Oregon.
Depending on what Amazon EC2 regions you use, even if they aren’t in the same state (or country), you may be able to use synchronous replication across longer distances than normal thanks to the data compression option which DataKeeper Cluster Edition includes. As we compress data, we trade CPU cycles on the SQL Server instances for time transmitting data. The less data that we have to transmit, the easier it is for the network to get the data transmitted to the remote site.
Bottom line: DataKeeper Cluster Edition is an easy, cost-effective way to protect your SQL Server databases when using EC2 to host them.