RDS vs Local Database Speed
I am going back and forth between using an Amazon RDS database and just using the local db on my EC2 instance for my Laravel 5.2 eCommerce app.
I am running a db.t2.micro instance, and it doesn't appear to be maxed out by any means. I haven't driven any traffic to the site yet, but this is what it looks like with the current load of me clicking around on it to test out speed:
CPU --> 0.915%
Freeable Memory --> 507 MB
Storage --> 4,520 MB
Read IOPS --> 0/sec
Write IOPS --> 0/sec
Swap Usage --> 0 MB
I really like the idea of using the RDS server for it's expandability, reliability, and automatic backups. But it seems about 25 - 30% slower than using the local database on my EC2 instance. For example, one query-heavy page with product reviews and product information loads in just 1.5 seconds on average using the local database vs. 1.9 seconds on average using the RDS database. The RDS database seemed even slower when I had Multi AZ turned on for failover availability in multiple regions.
I know that there's always going to be a decrease in speed when the database is not on the same machine. But I have checked and both my EC2 server and my RDS database are in the same availability zone (us-east-1e), so you wouldn't think the slowdown would be as significant as it is.
Has anyone had any similar experiences with RDS databases? Do you have any recommendations on how I might speed up my RDS instance? Should I just go with the local database?
I want to make sure I make the right decision now because I don't want to have to go through the pain of moving the database at a later date.
Please or to participate in this conversation.