patternsqlModerate
Why use RDS over EC2 for Postgres?
Viewed 0 times
whypostgresec2forrdsuseover
Problem
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
The closest (considering price) RDS machine would be
So the prices would be very similar for these two.
The advantages for EC2:
The advantages for RDS:
Can RDS cover the advantages that EC2 has (especially 2.)? Is there any other advantages?
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:
- As mentioned already, one more vCPU.
- I can put the Write-Ahead-Log on the second disc when using EC2 (great performance improvement when writing a lot to the db).
- I can run pgbouncer on my EC2 instance (more performance because I can keep connections open).
- I can edit the configuration file (will eventually improve performance)
The advantages for RDS:
- Automatically does daily backups.
Can RDS cover the advantages that EC2 has (especially 2.)? Is there any other advantages?
Solution
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)
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)
Context
StackExchange Database Administrators Q#76273, answer score: 10
Revisions (0)
No revisions yet.