Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I need Amazon's EC2, Cloudfront, RDS?

I want to publish a web site on Amazon's servers, that:

  1. Runs CakePHP
  2. Uses MySQL to store data
  3. Lets users upload audio through flash (currently using a hosted Flash Media Server), and listen to the files later

Do I need Amazon's EC2 for the website, RDS for the MySQL database, and CloudFront for the FMS? I'd really like a walkthrough of which services I should use.

Thanks.

like image 975
atp Avatar asked Mar 20 '10 19:03

atp


People also ask

Should I use RDS or EC2?

TL;DR: Amazon RDS enables you to run a fully featured relational database while offloading database administration. Whereas, for more control and flexibility, EC2 will be better for your relational database. If you want an automated and cost-effective solution, go for RDS.

Which are benefits of using Amazon RDS over Amazon EC2?

In comparison to EC2, RDS has the following advantage: The database solutions come with highly optimized configurations, and you do not have to set up the database and failover clusters manually. You might not need any DBAs to perform tasks like database provisioning, security, and updating versions.

Does RDS use EC2?

Amazon RDS enables you to run a fully managed and fully featured relational database while offloading database administration. Using one of our many relational database AMIs on Amazon EC2 allows you to manage your own relational database in the cloud.

Can you use CloudFront with RDS?

To integrate Amazon cloudfront and Amazon RDS with your monitoring system, sign up for a free trial with MetricFire. Talk with the MetricFire team about how to integrate Amazon cloudfront and Amazon RDS and get Amazon cloudfront and Amazon RDS interacting with your MetricFire dashboards directly.


1 Answers

First of all you need EC2 service in order to have a virtual machine, where you can install Apache, PHP and your Web Application.

Then you also need a database server and data repository for the media files. The recommended way is exactly what you suggest: RDS for MySQL and CloudFront as the file repository.

Initially none of the above services (RDS, CloudFront and even EBS) were available. Developers have no way to use a MySQL database, because even if it was installed in an EC2 instance, the instance isn't guaranteed to stay up and running and if the instance is lost, the data is also lost. For this reason EBS was introduced. It created a mounted storage with guaranteed persistence that you could access from the EC2 instance. Theoretically you could install MySQL there and use it to store the flash files. If you only want to serve files through the HTTP protocol, there is no problem using EBS.

CloudFront however has some advantages:

  • Users are automatically routed to the nearest edge location for high performance delivery of your content.
  • You can also use it to stream content through the the RTMP protocol.
  • You don't have to worry about the size of the storage. With EBS you create a storage with a specific size. This could be a problem if you later find out that you need more storage. With CloudFront the files are installed in S3 and you do not need to worry about their size.
  • You do not waste web server capacity. If you use EBS, the files will be served by the server in EC2.

You could also use S3, but you wouldn't able to use the RTMP protocol and you would need to manually create links to your files. Also, it wouldn't be possible to use your domain name for the files.

RDS also has some advantages over installing MySQL in EC2, EBS:

  • automated database backups
  • You can monitor your database with Amazon CloudWatch (free service)
like image 177
kgiannakakis Avatar answered Oct 02 '22 13:10

kgiannakakis