PostgreSQL – Why Use RDS Over EC2?

amazon ec2amazon-rdsawspostgresql

I have a database currently running on EC2. As I have to move it to a bigger machine the question of using RDS came up.

Pricing:

I can get an EC2 c3.large instance with two SSDs (16GB each), two vCPUs and 4GB of memory on demand for $0.132 per hour [1].

The closest (considering price) RDS machine would be db.m3.medium for $0.125 per hour (Single-AZ) [2]. This machine has the same amount of memory but only one vCPU [3]. Additionally I would have to pay for storage and io [2].

So the prices would be very similar for these two.

The advantages for EC2:

  1. As mentioned already, one more vCPU.
  2. I can put the Write-Ahead-Log on the second disc when using EC2 (great performance improvement when writing a lot to the db).
  3. I can run pgbouncer on my EC2 instance (more performance because I can keep connections open).
  4. I can edit the configuration file (will eventually improve performance)

The advantages for RDS:

  1. Automatically does daily backups.

Can RDS cover the advantages that EC2 has (especially 2.)? Is there any other advantages?

Best Answer

Like most things, it's a cost vs effort/complexity trade-off.

RDS is easier, but less flexible, and costs more for the same level of performance.

(In particular, note that there's no way to replicate into or out of RDS)

Related Question