Newsletters




To RDS or EC2—Where Will Your Database Be Happier?


Bookmark and Share

Four years ago, moving a database to the cloud required courage, optimism, and confidence (or ignorance). Cloud platforms were young, and fundamental security, performance, and management issues were far from solved.

How much things have changed. Today, public clouds offer very solid platforms to run applications and databases. For example, AWS offers two good options for running a SQL database in the cloud: RDS and EC2.

Both enable building a database in a VPC secure environment, support applications with high performance requirements, and are highly scalable. Also, those with existing Oracle or SQL Server licenses can bring them over to reduce cloud costs.

However, there are some important differences between RDS and EC2 databases.

RDS for Simplicity and Reduced Maintenance and Management

The main advantage of RDS is that AWS will take responsibility for the database. There’s almost no configuration, management, or maintenance requirements—AWS even handles software patches automatically.

RDS supports Oracle, SQL Server, MySQL, PostgreSQL, and Aurora (AWS’ proprietary database in preview, which promises MySQL compatibility and five times the performance).

It’s also easy to get good baseline performance with RDS. Each RDS instance is pre-configured and optimized based on the selected size. RDS instances scale by adjusting memory or compute power up or down as needed. It’s also simple to configure read replicas or set up synchronous replication across availability zones for enhanced performance, availability, and durability.

You can choose between standard magnetic storage—which bursts up to 3,000 IOPS—SSD drives or provisioned, which is guaranteed up to 10,000 IOPS, depending on what your application needs. Finally, RDS offers automatic backups and optional encryption at rest and in transit.

EC2 for Full Control

One of the key benefits of EC2 is complete control. For example, a database running on EC2 could use EBS RAID and striping configurations to reach higher performance and go beyond the current 1Tb capacity limitation. With striping, provisioned IOPS and the right EC2 instance, you can get up to 48,000 IOPS and 800MBps throughput per instance. EBS volumes are also automatically replicated and can be encrypted to protect data at rest and in motion as it travels between EBS volume and the EC2 instance.

With EC2, you have full control over maintenance windows, use of ports, number of instances per database, and the option to run alternative versions of database engines, including those not supported by RDS: SQL Server 2014 and IBM DB2, for example.

So, EC2 provides more flexibility to meet unique performance, replication, archival or DR requirements, and is therefore a good option if RDS limitations impact application performance.

Where to Start with Database in the Cloud

While EC2 offers some real benefits, for most applications, RDS makes sense as the first choice. Having more control is always nice, but think about the value of your time and the skills readily available. For example, do you really want to spend time on things such as InnoDB buffer pool size optimization to get better performance? With RDS, the time you save managing your database engine can be spent optimizing it.

Beyond that, and before actually moving anything to the cloud, a performance and response time analysis tool should be used to understand the performance profile of the application and database, and to determine the role every infrastructure element—CPU, memory, read/write speed, latency, etc.—plays in performance. This information is essential to make sizing decisions and avoid resource overprovisioning or performance degradation.

Next, always remember that scaling CPU and memory will not solve all performance problems and that adding resources can quickly get expensive. Response time analysis is essential to understanding what drives performance and to inform better decisions, whether databases reside in the cloud or on-premises.

Finally, it’s important to understand all of the elements that make up the cost of running a database in the cloud—such as instance class, running time, primary and backup storage, I/O requests per month, and data transfer—their growth expectations over time, and how all of this compares to your costs today, including the cost of people needed to manage and monitor.

At the end of the day, running databases in the cloud can result in greater flexibility and agility. More importantly, it can reduce the time spent on routine and administrative tasks, giving you more time to do the fun stuff—such as improving application performance.


Sponsors