Editorials

Always On Availability Groups

Always On Availability Groups (AOAG), add in SQL Server 2012, provide you with more than just failover. I look at AOAG as a combination of the best from database mirroring and clustering. Mirroring and clustering are two distinctly different failover implementations.

Mirroring allows you to have two distinct copies of a database, and all database activity is sent to both databases when modifications are made. The client is aware of both databases, and will automatically fail over to the mirror should the primary database not be responsive.

Clustering has two distinct instances of SQL Server, pointing to the same database files on a shared device, usually a SAN, where one instance is online, and the other SQL instance waits to take over the management of the database files should the primary instance be disabled. Clustering services handles the direction of the client to the correct instance of the database. Unlike mirroring, clustering allows you to manage more than on database in a failover scenario.

AAOG is like a combination of Clustering and Mirroring. Like clustering, it allows for failover of more than one database. Like mirroring, AAOG has nothing shared. Each database instance has its own database files. There is nothing shared on a SAN.

What makes AAOG even more impressive is that you have a primary instance and a secondary instance, like mirroring. Unlike mirroring, you can have up to 8 additional secondary replicas. An additional secondary replica can be used for read only access, or database backups. This can reduce the load on your primary database instance in an AAOG.

While this might seem like a great way to get a reporting database, you need to remember that the different instances are mirrors of the active database. So, even if you want to use a secondary database for reporting, it will have the same schema and indexes as the primary database. So, the indexes may not be tuned for reporting purposes in order to have good data modification performance on the primary database.

If you have the resources, and the cash, AAOG is a really powerful way to setup failover in a manageable environment. The tools to manage AAOGs make the creation and management straightforward once the groups are fully configured. It’s the configuration that takes the time to learn.

Cheers,

Ben