部署到 Amazon EC2

发布于 2024-07-06 20:18:54 字数 78 浏览 7 评论 0原文

有人在将应用程序部署到 Amazon EC2 方面有丰富的经验吗? 我正在考虑将来这样做,并想知道与共享托管和专用服务器托管相比人们的体验。

Has anyone got much experience deploying applications to Amazons EC2? I am considering doing this in future and wonder about peoples experiences compared to shared hosting and dedicated server hosting are.

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

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

发布评论

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

评论(4

飘然心甜 2024-07-13 20:18:54

到目前为止,一切都很好。 能够同时打开 5/10/50/100 多台机器真是太棒了。 最好能够将它们关闭并忘记它们。 您需要改变关于如何存储持久数据的思维方式,但一旦您拥有了天空,那就是极限。

性能方面,小实例速度很慢。 它们非常适合负载均衡器和提供静态内容等,但如果您正在执行任何处理器密集型操作,则至少需要一个 m1.medium 实例。

这一切都很新,所以还没有很多工具可以提供帮助。 我正在使用 Puppet 来配置我的主机,并且我有一组用于启动集群的 PHP 脚本。 我使用 LDAP 作为主机清单数据库。

如果您没有必要/渴望构建自己的工具,请参阅 Rightscale 了解一些非常棒的部署工具/不断增长的应用程序。

So far, so good. Being able to turn on 5/10/50/100+ machines at a time is awesome. It's even better being able to turn them off and forget about them. You need to change your mindset about how you store your persistent data, but once you have the sky is the limit.

Performance wise, small instances are slow. They're fine for load balancers and serving static content, etc, but if you are doing anything processor intensive, you need at least a m1.medium instance.

It's all pretty new, so there aren't many tools to help out yet. I'm using Puppet to configure my hosts and I have a set of PHP scripts for starting up clusters. I use LDAP as a host inventory database.

If you don't have the need/urge to build your own, see Rightscale for some really awesome tools for deploying/growing apps.

偏爱你一生 2024-07-13 20:18:54

一种方法是使用 VMWare 映像在本地按照您想要的方式设置实例,然后将其转换为 AMI。 例如,使用 此脚本

One approach is to setup your instance exactly how you want it locally, using a VMWare image which is then converted to AMI. For example, using this script

2024-07-13 20:18:54

我有一个包含完整堆栈的映像,每个堆栈上都有一个脚本,用于自动将 wars (java) 从 S3 存储桶部署到本地文件系统。

当映像启动时,rc2.local 会运行此脚本以在启动 tomcat 之前获取最新的战争。 这对我来说很有效

I have an image that has my full stack and a script on each that automates the deployment of wars (java) from an S3 bucket to the local file system.

When an image starts the rc2.local runs this script to get the latest wars before starting tomcat. This works well for me

姜生凉生 2024-07-13 20:18:54

成本是我最初在使用 EC2 时忽略的一个重要因素。 最便宜的小型实例每个实例小时的费用为 10 美分,如果您让它一直运行,则每月约为 70 美元。 这比最便宜的托管解决方案的报价要高一些。

当然,使用 EC2,您可以选择操作系统并安装您喜欢的任何软件,如果您需要大量服务器,它绝对比专用托管更具成本效益。

我读过有关混合模型的文章,其中人们使用专用服务器来处理常规工作负载,但在需求高峰时添加额外的 EC2 实例。

Cost is quite a big factor that I initially overlooked with EC2. The cheapest small instance costs 10c per instance hours, which comes to about $70 / month if you keep it running all the time. That's quote a bit more than the cheapest hosting solutions.

Of course, with EC2 you can choose your operating system and install any software you like, and it's definitely way more cost effective than dedicated hosting if you need a large number of servers.

I've read about a hybrid model where people use dedicated servers for their regular workload, but add in extra EC2 instances at times of peak demand.

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