我需要 Amazon EC2、Cloudfront、RDS 吗?

发布于 2024-08-26 03:24:27 字数 248 浏览 7 评论 0原文

我想在 Amazon 的服务器上发布一个网站,该网站:

  1. 运行 CakePHP
  2. 使用 MySQL 存储数据
  3. 让用户通过 Flash 上传音频(当前使用托管 Flash Media Server),并稍后收听文件

该网站是否需要 Amazon EC2 、用于 MySQL 数据库的 RDS 以及用于 FMS 的 CloudFront?我真的很想了解我应该使用哪些服务。

谢谢。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

裂开嘴轻声笑有多痛 2024-09-02 03:24:27

首先,您需要 EC2 服务才能拥有虚拟机,您可以在其中安装 Apache、PHP 和 Web 应用程序。

然后,您还需要一个数据库服务器和媒体文件的数据存储库。推荐的方式正是您所建议的:RDS for MySQL 和 CloudFront 作为文件存储库。

最初,上述服务(RDS、CloudFront 甚至 EBS)均不可用。开发人员无法使用MySQL数据库,因为即使它安装在EC2实例中,也不能保证该实例保持正常运行,如果实例丢失,数据也会丢失。为此,引入了 EBS。它创建了一个具有持久性保证的已安装存储,您可以从 EC2 实例访问该存储。理论上你可以在那里安装 MySQL 并用它来存储闪存文件。如果您只想通过 HTTP 协议提供文件服务,那么使用 EBS 没有问题。

然而,CloudFront 具有一些优势:

  • 用户会自动路由到最近的边缘站点,以高性能地交付内容。
  • 您还可以使用它通过 RTMP 协议传输内容。
  • 您不必担心存储空间的大小。使用 EBS,您可以创建具有特定大小的存储。如果您后来发现需要更多存储空间,这可能会成为问题。使用 CloudFront,文件安装在 S3 中,您无需担心它们的大小。
  • 您不会浪费网络服务器的容量。如果您使用 EBS,文件将由 EC2 中的服务器提供服务。

您也可以使用 S3,但无法使用 RTMP 协议,并且需要手动创建文件的链接。此外,也无法将您的域名用于这些文件。

与在 EC2、EBS 中安装 MySQL 相比,RDS 还具有一些优势:

  • 自动数据库备份
  • 您可以使用 Amazon CloudWatch(免费服务)监控您的数据库

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)
心的位置 2024-09-02 03:24:27

您需要 EC2 来启动实例并创建 LAMP 服务器。如果您不需要自己管理 MySql 数据库,RDS 是很好的选择,但 RDS 的限制因素之一是您无法进行数据库复制。

对于持久存储,您可以使用EBS或S3作为数据文件。

You need EC2 to launch instance and create your LAMP server. RDS is good if you don't need to manage MySql db yourself, but one limiting factor of RDS is you can't have DB replication.

For persistent storage, you can make use EBS or S3 for data file.

电影里的梦 2024-09-02 03:24:27

这些回复中没有提到的一件事是您的文件访问可能需要(也可能不需要)的安全性。云网络非常适合公开访问数据,但我还没有看到能够为每个用户提供细粒度文件访问的云网络。虽然您可以混淆访问文件的 url,以便不容易连续猜测音频文件 ID,但如果人们保留私人音频,这可能还不够。不是说不做,而是谨慎做决定。

One thing not mentioned in any of these replies is the security that may (or may not) need to go around your file access. Cloud networks are good for publicly accessible data, but I haven't seen a cloud network yet that will provide a granular level of file access on a per user basis. While you may be able to obfuscate the url's to access files so that it isn't easy to sequentially guess audio file IDs, that may not be enough if people are keeping private audio. Not saying don't do it, just make the decision with care.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文