Wednesday, May 9, 2012

Amazon RDS for SQL Server

Amazon Relational Database Service (RDS) now supports Microsoft SQL Server. With this, RDS now supports the three major databases, viz, MySQL, Oracle and MS SQL Server. RDS for SQL Server brings the same Automated backup, Multi-AZ features available with MySQL and Oracle RDS and it is entirely managed by AWS. Developers can now simply setup a Highly Available and Scalable (manually) SQL Server with few clicks through the AWS Management Console. The entire database management overhead is taken away since AWS will do that work behind the scenes. One need not worry about disks failing, installing patches, etc...

Of course, every one saw that this was coming sometime soon. Most of the enterprise deployments have SQL Server as their relational database and it is a natural move for AWS to tap in to their enterprise customers (who have started utilizing public cloud). One would appreciate this more with a little drive to the past.

July 2011 - this is when Microsoft extended Microsoft License Mobility or Bring Your Own Licenses (BYOL) to AWS. Prior to this, AWS did not have an official partnership with Microsoft to bring licensed products into AWS. Different Microsoft products had different licensing models and within a product itself you will have different licensing models. Not all of the licensing models work fine with AWS. For example, some of the licenses were CPU based and some were tied to the host name. Customers that I had worked with had purchased multi-year licenses already and they wanted to use those licenses in the Cloud. Of course, the perception that they had was that AWS is offering Infrastructure and they can simply rent a server and use their own licenses. I as a consultant had to find out what type of licenses customers had and validate if they worked well with AWS. One can do such a validation only by actually doing it. And it doesn't stop with just installing once. One has to verify if you build out a server image out of the Installation and relaunch it (of course you need to be prepared if your EC2 Instance goes down) whether it works fine.

Did you know that there is a separate way to bring your Microsoft Bizspark licenses? Licenses. Uff.

I personally had such problems with SQL Server setup. Many of the enterprise customers I had worked with invariably had SQL Server as the relational database. With many available licensing models and the different editions, it was a nightmare to setup SQL Server on an EC2 Instance. Most likely, the database Instance will not start on the first attempt. If you happen to restart the EC2 Instance after installation, SQL server might report an error about an invalid host name. That' when I probably would realize that I forgot to set in EC2 Config Service to retain host name on restart.

Now all these frustrations went away when AWS introduced Microsoft Windows Running SQL Server. And it had support for SQL Server Express, Web and Standard editions (2005,2008,2012). With this option, one can directly launch a Windows EC2 Instance with SQL Server pre-installed and configured. This took away all the worries associated with installing and configuring a SQL Server. And one moved to a pay-as-you-go model since the licensing is tied to per hour Instance cost. Of course, if some one had purchased a multi-year license, they still need to come through BYOL. Though, the installation part is taken care by AWS, this option still did not solve the following problems:

  • High Availability - We cannot setup SQL Server Clustering on EC2. Only Mirroring, Replication and Log Shipping are possible
  • Backup - setup backup on the SQL Server Instance and have additional scripts to move the backup to Amazon S3
  • Patches/Updates - completely managed by us
With RDS for SQL Server, AWS addresses the above concerns. One gets a SQL Server database Instance automated backups and completely managed by AWS. We can manually scale up (one click) the database if we need to go for a higher capacity without the need to re-install and re-configure. The database can also be restored to any of the automated backup on a single click (through AWS Management Console).

What's not available?
Currently RDS for SQL Server does not provide the following:
  • Multi-AZ - an option that is available for both RDS for MySQL and RDS for Oracle. A standby database Instance runs on another Availability Zone and in case of any failure at the primary, RDS will initiate an automatic fail over. There is no manual intervention though there will be about 5 minutes of downtime seen by the application tier. If Amazon can offer the same for SQL Server as well, then the offering becomes a killer
  • Read Replicas - an option available only for MySQL RDS and not in Oracle and SQL Server RDS. Most of the web applications are read intensive. This feature can be used to scale out multiple read replicas on demand and increase the database read throughput.
  • VPC - Only MySQL RDS can be provisioned with a VPC. Oracle and SQL Server RDS Instances cannot be setup in VPC. Something that enterprise customers will love to have
I am sure AWS is already working on bringing out all these features and it is only a matter of time till these become available for SQL Server as well. Considering the pace at which they are adding and enhancing services, it isn't very far.

No comments: