EC2 Small vs Amazon RDS - which is faster for MySQL?
(I have one database, well-indexed and tuned. About 10,000 rows on each table.)
How's the performance like?
EC2 Small vs Amazon RDS - which is faster for MySQL?
(I have one database, well-indexed and tuned. About 10,000 rows on each table.)
How's the performance like?
Firstly, I don't use RDS - so don't take this as an absolute. As with EC2, RDS is classed by instance type, so in terms of computing you get the same thing. The difference comes down to 'configuration' and the degree to which the hardware is dedicated.
RDS advantages:
RDS disadvantages:
EC2 advantages:
EC2 disadvantages:
I'd suggest the following:
For any specific use case, the best option is probably to benchmark each and see how they stack up - performance will vary for each setup afterall.
Further reading:
I am unable to comment on @cyberx86's answer so I'm forced to chip in with an answer of my own. Re: RDS DB performance being north of EC2 DB out-of-the-box performance...
I've been gradually paring down my AWS resources - changing medium to small instances when possible, optimizing on the application level, etc. My current effort is testing an RDS small instance of MariaDB vs an EC2 small instance with MariaDB (possibly saving $8/mo). I have not attempted to optimize MariaDB on the EC2 instance beyond setting the default charset and collation I want and making Aria the default table type.
My test set is a database containing 150 tables, most with less than 1000 rows, one with roughly 500k and one with 10mil. Archival size, tarred and gzipped sql with drop if exists/create boilerplate, is just under 90m. Installed in a DB, it's 1.4GB. All operations below run from an additional EC2 instance in the same region (us-east) using either
mysql
ormysqldump
as appropriate. The RDS instance and calling EC2 instance are us-east-1a and the EC2 MariaDB instance is us-east-1c.This is not a scientific test, but I've tried to be consistent in my execution. This result was not what I expected. I'd suggest anyone asking the question "EC2 with DB or RDS?" find a benchmark or two from among their application's operations and test... then maybe find another couple, which is what I'm going to do today.