0 votes
1 view
in AWS by (19.2k points)

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.

1 Answer

0 votes
by (44.6k points)

First of all, you need EC2 service so as to have a virtual machine, where you'll install Apache, PHP and your web Application.

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

Initially, none of the above services (RDS, CloudFront and even EBS) was offered. Developers don't have any way to use a MySQL database, because though 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 lost. For this reason, EBS was introduced. It created mounted storage with absolute persistence that you could access from the EC2 instance. Theoretically, you'll install MySQL there and use it to store the flash files. If you only need to serve files through the HTTP protocol, there's no drawback using EBS.

CloudFront, however, has some advantages:

  • Users are automatically routed to the closest edge location a low latency and high-performance delivery of your content.
  • You can also use it to stream content through the RTMP protocol.
  • You don't have to worry about the size of the storage. With EBS you create storage with a particular size. This could be a problem if you later find out that you need more storage. With CloudFront, the files are put in in S3 and you do not need to worry concerning their size.
  • You do not waste web server capacity. If you utilize 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 additionally has some benefits over installing MySQL in EC2, EBS:

  • automated database backups
  • You can monitor your information with Amazon CloudWatch which is a free service
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...