The XenDesktop Site Configuration Database is an important part of your infrastructure, when it’s is down, users won’t be able to connect and IT won’t be able to make any configuration changes. Because of this you’ll probably want to implement some kind of high availability mechanism keeping your database up and running at all times, or at least to try and keep downtime at a minimum. During one of my recent presentations in which I talked about XD7 including it’s database dependency, a discussion around which type of (SQL) HA mechanism we should implement quickly formed… What options do we have?
A short intro
One of the main reasons why this database (which as of XD7 can only be SQL) has become, or is, so important, is because servers within a Flexcast Management Architecture (XenDesktop) don’t have a Local Host Cache as opposed to XenApp servers which are build upon the Independent Management Architecture. One of the main differences between IMA and FMA. With IMA all servers, although there are exceptions, have a Local Host Cache holding a recent copy of the central database, it gets synchronized every 30 minutes by default. So if the central database, for whatever reason might become unreachable, these servers will simply use the information stored in their LHC. This way new users can still connect and (almost) everything will keep working as normal, with the exception of IT being able to make any configuration changes to the Farm, no changes there.
Now that we’ve established it’s importance and the need to keep it online as close to a 100% as possible, let’s see what options we have in accomplishing this. Note that I just want to point out some of the technologies available, so no deep dives or detailed configurations. I’ll probably leave some out as well, so feel free to jump in anytime. There are tons of excellent Blogs and other types of websites that describe these technologies in great detail, I’ll reference some throughout this article.
Microsoft SQL solutions
Citrix recommends to implement SQL mirroring, with SQL Clustering coming in second. Mirroring the Database ensures that, should you lose the active database server, the automatic failover process happens in a matter of seconds, so that users are generally unaffected. Be aware that full SQL Server licenses are required on each database server, but this goes for some of the other solutions as well. Due note that SQL Server Express edition can’t be mirrored and clustering isn’t supported as well. But then again, who want’s to use SQL Express in a production environment anyway right?!
Microsoft’s SQL clustering technology can be used to automatically allow one server to take over the tasks and responsibilities of another server that has failed. However, setting up a clustered solution is more complicated, and the automatic failover process is typically slower than with alternatives such as SQL Mirroring. Again, as mentioned SQL Server Express doesn’t support clustering, at least not out of the box, but with a little creativity it sure is possible, Google is your friend!
When using SQL Server 2012 (Enterprise Edition) or later, you could also opt for something called AlwaysOn Availability Groups. A high-availability and disaster recovery solution first introduced in SQL Server 2012 to enable you to maximize availability for one or more user databases. AlwaysOn Availability Groups requires that the SQL Server instances reside on Windows Server Failover Clustering (WSFC) nodes, see below:
Using one of the above methods, in combination with regular (daily) back-ups, will ensure that your database will (almost) always be online. If anything, it will at least narrow your chances of running into any issues. Have a closer look and decide for yourself which one might work best for you. The above is partly referenced from the Citrix E-Docs website:
http://support.citrix.com/proddocs
VMware HA
At this point during the presentation some people were wondering if VMware HA could also be an option with regards to keeping SQL safe. After a short debate, the short and simple answer was no. Although VMware HA is a great feature on itself, it has no clue with regards to what’s running on the VM it’s protecting. I mean, your VM will stay online without to much trouble, even if one of the underlying physical host goes down, but HA doesn’t know when your SQL database goes down or stops responding due to updates gone bad, drives filled up, services stopped or something alike. You could say that VMware HA, and I guess the same goes for Hyper-V or XenServer as well, simply isn’t application oriented. That got me thinking, what other options do we have?!
VMware App HA
As part of the Enterprise Plus edition, VMware offers Application High Availability. App HA is more intelligent, it can restart failed application components or use the Application Awareness API through VMware HA to reset the VM if needed (no OS reboot). VMware App HA provides support for SQL, Tomcat, Apache, TC Server and IIS. For now no other ‘big’ applications, like Exchange, SharePoint, ShareFile and Oracle are supported. But since it’s SQL we’re interested in, it could work. When compared to similar solutions like Symantec Application HA it’s still considered a 1.0 product, as stated here:
Make sure to check it out, it’s an excellent detailed article discussing both VMware App HA and Symantec Application HA. VMware App HA is relatively complex to set up, it requires multiple VM’s and points of management. Also, as an addition to the applications already mentioned, no custom or generic applications are supported and as far as I could tell it’s only supported on vSphere 5.5. On the other hand, if you are already using VMware combined with Enterprise Plus licenses you’ll have, not only App HA, but a whole bunch of other cool features and technologies as well. And if it’s SQL you’re supporting, then this is probably the most logical and cost effective step to take, especially for smaller and mid sized companies. However, when using ‘lighter’ editions of VMware or when real enterprise functionality is needed, more on this in a bit, then this probably won’t be your first choice.
VMware Fault Tolerance
One of my favorites, if it wasn’t for one big drawback, it only supports one vCPU! A shame, because this technology is lightning fast. This comes from the VMware website: Fault Tolerance (FT) provides continuous availability for applications in the event of server failures by creating a live shadow instance of a virtual machine that is always up-to-date with the primary virtual machine. In the event of a hardware outage, vSphere FT automatically triggers failover ensuring zero downtime and preventing data loss. After failover, vSphere FT automatically creates a new, secondary virtual machine to deliver continuous protection for the application. More information can be found here:
http://www.vmware.com/products/vsphere/features/fault-tolerance.html
If your SQL server is virtual and has only one vCPU (I’m sure it won’t be long till multiple vCPU’s will be supported) then I suggest to give this feature a closer look. It’s part of VMware’s Standard edition and higher. Again, if you already have VMware in place and your SQL server is up for it, and of course the rest of your infrastructure needs to be well, this is probably the way to go.
Symantec Application HA
Already mentioned earlier, this is probably the most Enterprise product of them all. It supports all major applications, including custom and or generic applications as well. Over 23 tier 1 applications in total. It’s based on Symantec Cluster Server, powered by Veritas agents to monitor and control applications, and we know, they know what they are doing right? It can restart failed application components, restart the underlying Operating System or restart the VM itself. And if all else fails it can use the last known good backup for restore purposes. The Symantec HA console communicates with VMware through a vCenter plugin providing centralized managed for all protected VM’s.
Of course Symantec App HA would be a separate purchase, and if you already have VMware running (with proper licensing) you’ll probably need a strong business case to get the funds. If it’s more than SQL that needs to be supported, if you’re going ‘Greenfield’ or you may have a specific need for one, or multiple, of the enterprise class features that the Symantec product has to offer, like the number of supported applications or VM’s / agents for example (think big, one of my former colleague always just to say: www.kraak.com) then Symantec Application High Availability might just fit the bill!
Conclusion
Again, an overview without to much technical details, I simply don’t know the products well enough. Hopefully this does give you an idea on some of the options we have when it comes to ‘securing’ the SQL Site database within our XenDesktop 7 deployments. Also, I’m sure I must have left out some other options, please feel free to comment and share your experience if any. Several factors will play a role in which solution will best fit your needs, with costs probably just being just one of them.
A lot of companies will already have SQL up and running, making the decision to implement or use existing mirroring and or clustering configurations a lot easier. The same can be said for VMware. Depending on the licenses used, implementing fault tolerance or App HA might be a logical and small step to take keeping expenses low and management known. However, even when some, or all, of the above is already in place there still might be some valid reasons to look at other solutions as well.