什么是"正道"部署在AWS上一个简单的应用程序/博客?正道、应用程序、简单、博客

2023-09-11 12:00:13 作者:雄霸天下

我是新来的AWS,做我的研究,但没有得到一个很好的答案,所以问一个简单的问题。

I am new to AWS, did my research but didn't get a good answer, hence asking a simple question.

我迄今所做

在我开始一个Linux AMI,安装LAMP和部署我的应用程序,这是工作的罚款 弹性IP是设置AMI 的 域名还指向正确

所以,事实上,如果你 http://example-domain-name.com 你会能够看到该应用,与它进行交互...

So in fact if you http://example-domain-name.com you'll be able to see the app, interact with it...

我的问题是,我现在在做的,是我的应用部署正确?当我听说,包括恐怖故事,AWS AMI崩溃等。

My question is, am I done now, is my app deployed correctly? As I have heard horror stories, of including AWS AMI crashing etc.

能否请你分享你对这个专业知识。

Could you please share your expertise on this.

推荐答案

所有可能的情况下最好的,每对您的问题您的评论,是一个高度可用,多AZ,自动缩放Web层,支持或者用复制的MySQL DB或者,如果你能负担得起,像亚马逊RDS。 下面是一个例子CloudFormation模板,将建立更多或更少我在大约两点击刚才所描述的,在你填写了几个变量。

The best of all possible cases, per your comment on your question, is a highly available, multi-AZ, autoscaling web tier, backed either with a replicating mysql db or, if you can afford it, something like Amazon RDS. Here's an example CloudFormation template that will build more or less what I just described in about two clicks, after you fill out a couple of variables.

这是矫枉过正...我想...但如果​​你担心亚马逊的种种故障模式,高可用性,可过了一个价格。该模板的默认实例(包括多AZ RDS)来约270 $一个月全天候服务。 如果你真的致力于为您的博客,并能保证你会写上了很多年,你可以的使用保留的情况下,节省的钱公平位。

It's overkill... I suppose... but if you are concerned about Amazon's myriad failure modes, high availability can be had for a price. That template's default instances (including multi-AZ RDS) come to about $270 a month for 24/7 uptime. If you were really dedicated to your blog, and could guarantee you'd be writing on it for years, you could save a fair bit of money using reserved instances.

这是一个很多钱,是的。但它比我每月的车险费率在纽约也少。这表示更多关于我半信半疑的保险人或比亚马逊的价格我的驾驶记录,但在一些个人应用的高可用性设计可能是值得的成本。有多少是你的时间值得吗?怎么样的博客?

That's a lot of money, yes. But it's also less than my monthly car insurance rate in NYC. That says more about my dubious insurer or my driving record than Amazon's prices, but in some personal applications highly available designs might be worth the cost. How much is your time worth to you? How about the blog?

呼叫的黄金标准,因为你必须有一个泥头车全是金子负担得起,仍然吃。什么,当你开始出血的作品,你失去什么呢?

Call that the gold standard, because you have to have a dump truck full of gold to afford it and still eat. What do you lose when you start hemorrhaging pieces?

AZS:拍摄多AZ部署和你的风险的AZ停运。这不会发生,往往不过然后再也不做derechos直流地铁。请不要担心,如果你设计围绕一个AZ,你在一些巨大的,也许是意外的公司。

AZs: Shoot multi-AZ deployment and you risk an AZ outage. This doesn't happen that often but then again neither do derechos in the DC metro. Don't worry though, if you design around a single AZ, you're in some huge and perhaps unexpected company.

RDS / MySQL的复制:失去高度可用的数据解决方案,你可能会失去自己的数据。这是这样一个痛苦的恢复从你心中倒是最好的设计有了它,即使它的简单,只要偶尔EBS快照。

RDS / replicated MySQL: Lose highly available data solutions and you risk losing your data. This is such a pain to recover from you'd best design with it in mind, even if it's as simple as the occasional EBS snapshot.

多个Web服务器:像MySQL数据库,如果你把你的Web层在一台机器,你问一个中断。你可以设计围绕它,如果你能负担得起的替代品。否则,你会想要一个简单的编程方法来构建你的网络服务器。

Multiple webservers: Like the MySQL database, if you put your web tier on one machine, you're asking for an outage. You can design around it, if you can afford alternatives. Otherwise you'll want a simple programmatic way to construct your webserver.

自动缩放:我不明白为什么有人设计了一个AWS应用程序,而通过 CloudFormation 或CLI工具,即使最小数量和最大数量的实例是恰好一个。该自由层​​包括大量的CloudWatch指标,使实例监测容易,当然这要看对...

Autoscaling: I don't understand why anyone designs an AWS application without using autoscaling via CloudFormation or the CLI tools, even if the minimum number and maximum number of instances is exactly one. The free tier of AWS pricing includes plenty of CloudWatch metrics to make instance monitoring easy, but of course this depends on...

配置管理:在每一个AWS设计的共同点是配置管理。这是你的部署过程中最重要的组成部分,无论你实际部署多少台机器。无论您是使用CloudFormation,厨师,木偶,一些其他服务,或它们的组合,你现在的配置管理花时间,当机器施工犹在你的心中,将在以后的回报。

Configuration management: The common thread in every AWS design is configuration management. It's the most important component of your deployment process regardless of how many machines you actually deploy. Whether you're using CloudFormation, Chef, Puppet, some other service, or a combination thereof, any time you spend on configuration management now, when the machine construction is still fresh in your mind, will be rewarded later.

每一个组件都有助于您的应用程序的稳定性,和他们都花费金钱和时间。这是你想要的东西用上了,只是一个问题的时候。

Each of these components contributes to your application's stability, and all of them cost money or time. It's just a matter of what you want to spend, and when.

您可以得到的方式部分的金标准与亚马逊的自由层​​。它包括足够小时,以在一个单一的AZ连续运行一个微例如,一个ELB,和一个小的RDS实例。它还允许在写这篇文章的时候使用10个自定义CloudWatch的指标。自由层是只提供给新客户使用的第一年。假如你自己的产品结合一些基本的配置管理,可以合理地在避免了许多停机时间场景的方式运行在AWS上的小博客。

You can get part of the way to the gold-standard with Amazon's free tier. It includes enough hours to run a micro instance, an ELB, and a small RDS instance continuously in a single AZ. It also allows the use of 10 custom CloudWatch metrics at the time of this writing. The free tier is available only to new customers for their first year of use. Were you to combine its offerings with some basic configuration management, you could reasonably run a small blog on AWS in a way that avoids many downtime scenarios.