aws部署web

by Kevin Kononenko

凯文·科诺年科(Kevin Kononenko)

运营酿酒厂解释了Amazon Web Services(AWS) (Amazon Web Services (AWS) explained by operating a brewery)

如果您了解啤酒厂的工作方式,那么您可以了解Amazon Web Services(AWS)。 (If you understand how a brewery works, then you can understand Amazon Web Services (AWS).)

When you are working on building your first web app, you ALWAYS hear about the ease of launching a new product compared to past years.

在构建第一个Web应用程序时,您总是会听到与过去几年相比发布新产品的难易程度。

People will say things like, “Back in my day, you had to buy your own server and configure it yourself!”

人们会说: “回到我的时代,您必须购买自己的服务器并自行配置!”

Or, “We would stay up all night debugging the latest issue with our server infrastructure.”

或者, “我们将整夜调试服务器基础结构的最新问题。”

Fortunately, those days are long gone. You can deploy your new web app for $10 a month within an hour, if you know what you are doing.

幸运的是,那些日子早已一去不复返了。 如果您知道自己在做什么,则可以在一个小时内以每月10美元的价格部署新的Web应用。

But, there is one small problem. Standard tools like Amazon Web Services (AWS) can be pretty complicated, at least to a newbie. Although they offer the incredible ability to scale from your first users to hundreds of millions of users… they also require some configuration.

但是,有一个小问题。 诸如Amazon Web Services(AWS)之类的标准工具可能非常复杂,至少对于新手而言。 尽管它们提供了令人难以置信的从最初的用户扩展到数亿用户的能力……但它们还需要一些配置。

I wanted to learn about all the major options that AWS offers. After thinking about it for a few hours, I realized that the AWS ecosystem is similar to all the different parts of a large-scale brewery.

我想了解AWS提供的所有主要选项。 在考虑了几个小时之后,我意识到AWS生态系统类似于大型啤酒厂的所有不同部分。

Here’s a quick preview:

快速预览:

So, here is how 5 popular AWS tools work behind the scenes of a web app. I’ll also explain Heroku, a popular tool for deploying web apps that offers less flexibility but is easier to get started with.

因此,这是5种流行的AWS工具在Web应用程序背后的工作方式。 我还将解释Heroku ,这是一种用于部署Web应用程序的流行工具,其灵活性较差,但较容易上手。

The official video from AWS gives some context about the tools we will be discussing:

AWS的官方视频提供了有关我们将要讨论的工具的一些背景信息:

In order to understand this tutorial, you just need to understand the concept of the client-server model, which you can learn more about here.

为了理解本教程,您只需要了解客户机-服务器模型的概念,就可以在此处了解更多信息 。

Amazon Web Services的上下文 (The Context of Amazon Web Services)

Let’s imagine that you are passionate about brewing beer. You start in your kitchen by brewing for yourself and friends. Soon, word escapes about your delicious work. In order to meet the growing demand, you decide to rent some equipment and space in a warehouse to see if you can create a full-blown company. You will take orders from distributors, restaurants, and independent businesses.

假设您对酿造啤酒充满热情。 您可以通过为自己和朋友冲泡来开始自己的厨房。 很快,关于您的美味工作的消息便逃脱了。 为了满足不断增长的需求,您决定在仓库中租用一些设备和空间,以查看是否可以创建一家成熟的公司。 您将接受分销商,饭店和独立企业的订单。

In the example above, an order comes in from a client — one of the restaurants or distributors. That’s called a request. Your brewery will provide the order and collect payment via an invoice. That’s called the response.

在上面的示例中,订单来自客户 - 餐厅或分销商之一。 这就是所谓的请求 。 您的啤酒厂将提供订单并通过发票收取付款。 那就是响应

Similarly, web browsers send requests to servers based on actions taken by users. The server returns the required information via a response.

同样,Web浏览器根据用户采取的操作将请求发送到服务器。 服务器通过响应返回所需的信息。

This is just a high-level view, of course. We are going to dig into all the different processes that happen on the server side in our exploration of AWS. In our brewery analogy, we are assuming that the orders are already coming in left and right. It is now our job to organize a whole brewery so we can deliver those orders reliably.

当然,这只是一个高级视图。 在探索AWS时,我们将深入研究服务器端发生的所有不同流程。 在我们的啤酒厂类比中,我们假设订单已经左右发出。 现在,我们的任务是组织整个啤酒厂,以便我们能够可靠地交付这些订单。

Heroku解释了—一种比AWS更简单的替代方法 (Heroku Explained — A Much Simpler Alternative to AWS)

Before we get into the 5 parts of AWS, you probably should know about the simpler alternative. Heroku manages many of these systems for you. In fact, it is built on top of AWS infrastructure.

在介绍AWS的5部分之前,您可能应该了解更简单的选择。 Heroku为您管理许多此类系统。 实际上,它是建立在AWS基础架构之上的。

Heroku allows you to deploy new versions of your app straight from your command line using git push heroku master. It also has a rich library of add-ons that allow you to add new functionality to your dynos, or virtual servers.

Heroku允许您使用git push heroku master直接从命令行部署应用程序的新版本。 它还具有丰富的加载项库 ,可让您向dynos或虚拟服务器添加新功能。

Heroku is kind of like hiring a 3rd party contractor to manage your brewery. All you need to do is provide the recipes, and this contractor will use their expertise in brewery operation to produce the beer. They provide the team, the equipment, and relationships with suppliers.

Heroku有点像雇用第三方承包商来管理您的啤酒厂。 您所需要做的就是提供食谱,该承包商将利用他们在啤酒厂运营中的专业知识来生产啤酒。 他们提供团队,设备以及与供应商的关系。

This may feel miraculous. Now you can skip all that painful time and energy that you would need to spend on learning how to run a brewery! But there are two reasons to be cautious.

这可能感觉很神奇。 现在,您可以省去学习如何经营啤酒厂所需的所有痛苦时间和精力! 但是有两个理由要谨慎。

  1. This approach will be more expensive. You are paying the firm for their expertise alongside the cost of salaries, raw materials, etc.这种方法将更加昂贵。 您需要向公司支付他们的专业知识以及工资,原材料等费用。
  2. They may not scale up like you would like them to. Let’s imagine that you start receiving millions of dollars in orders, and you need to grow your operation. They may not be prepared to scale as quickly as you are.它们可能无法像您希望的那样扩大规模。 假设您开始收到数百万美元的订单,并且您需要扩大运营。 他们可能没有准备好像您一样Swift扩展。

Heroku has the same pros/cons. It is a little more expensive but allows you to get started immediately. If you scale up, you may need to migrate your services to AWS, which will mean that you will need to learn the AWS system anyways.

Heroku具有相同的优点/缺点。 它有点贵,但可以让您立即开始使用。 如果扩大规模,则可能需要将服务迁移到AWS,这意味着无论如何都需要学习AWS系统。

With that, let’s get into the different tools within AWS.

这样,让我们​​进入AWS内的不同工具。

AWS存储工具 (AWS Storage Tools)

This is the first of three categories that are going to seem similar, so buckle up! Within our brewery, there are plenty of static assets that do not change but are necessary for any type of brewing. Think about the machinery, the assembly line or the power tools that the workers use. You cannot take these items apart and recombine them. But, they can be used over and over again and still be useful.

这是看起来相似的三个类别中的第一个,所以请系紧安全带! 在我们的啤酒厂中,有许多静态资产不会改变,但对于任何类型的啤酒而言都是必需的。 考虑一下工人使用的机械,装配线或电动工具。 您无法拆开这些物品并重新组合它们。 但是,它们可以反复使用,仍然有用。

This is kind of like Amazon S3. S3 is the cloud service that allows you to store static assets like images. It stands for Simple Storage Service.

这有点像Amazon S3 。 S3是一种云服务,允许您存储静态资产(例如图像)。 它代表简单存储服务。

The concept of “storage of static assets”, in this case, is a little different than what you might think about in real life. In real life, storing static items might mean putting something in an attic and forgetting about it. But when it comes to cloud services, it means preparing an object or image to be used within milliseconds.

在这种情况下,“静态资产存储”的概念与您在现实生活中可能会想到的有所不同。 在现实生活中,存储静态物品可能意味着将某些物品放到阁楼中而忘了它。 但是,对于云服务,这意味着准备要在毫秒内使用的对象或图像。

This is different than database storage, because data in a database can be queried. Static assets can only be requested.

这与数据库存储不同,因为可以查询数据库中的数据。 只能请求静态资产。

AWS数据库服务 (AWS Database Services)

Amazon Relational Database Service (RDS) allows you to set up and operate your relational database within AWS. Some common examples include MySQL, PostGreSQL and Microsoft SQL Server.

Amazon Relational Database Service(RDS)允许您在AWS内设置和操作关系数据库。 一些常见的示例包括MySQL,PostGreSQL和Microsoft SQL Server。

In our brewery example, this is kind of like the parts of the brewery that store bottles, labels, hops, malt and any other ingredients you will need to make the beer. And I guess it would also include your company bank account, since that is a form of dynamic storage.

在我们的啤酒厂示例中,这类似于啤酒厂的部分,用于存储瓶子,标签,啤酒花,麦芽和制作啤酒所需的任何其他成分。 而且我猜它也将包括您的公司银行帐户,因为这是动态存储的一种形式。

You might be wondering why we are discussing storage AGAIN after the previous section. It’s because all of these elements are much more dynamic- they are being constantly combined or modified to handle requests from the users/customers.

您可能想知道为什么我们在上一节之后再次讨论存储。 这是因为所有这些元素都更加动态-它们不断地被组合或修改以处理来自用户/客户的请求。

This is the type of data that you will query, rather than request, like in the previous example. If you were managing the databases for Facebook, for example, this would be user data and posts that would later be included in the News Feed.

就像上一个示例一样,这是您将查询而不是请求的数据类型。 例如,如果您正在管理Facebook的数据库,则将是用户数据和帖子,这些帖子和帖子稍后将包含在新闻源中。

One more final note: this data (or hops/malt/bottles) is only useful for actually delivering a response to the user. If you wanted to measure your brewery’s performance, you would need to set up a new process for your operations team.

最后一点:该数据(或啤酒花/麦芽/瓶)仅对实际向用户传递响应有用。 如果要衡量啤酒厂的绩效,则需要为运营团队建立新的流程。

Imagine if your operations team was frantically running around your brewery, trying to keep track of your performance while the normal workers were trying to produce and bottle as much beer as possible. These two teams have separate interests.

想象一下,如果您的运营团队在您的啤酒厂附近疯狂地奔波,试图跟踪您的表现,而普通工人则试图生产和装瓶尽可能多的啤酒。 这两个团队有不同的兴趣。

That is where the data warehouse comes into play.

这就是数据仓库发挥作用的地方。

AWS数据仓库工具 (AWS Data Warehouse Tools)

Let’s make one thing clear here: “data warehouse” is a terrible name for cloud service. Okay sure, it might make sense to a developer with years of experience, but to a newbie… how many things in web development are similar to a warehouse? MANY.

让我们在这里澄清一件事:“数据仓库”是云服务的一个糟糕名称。 好的,对具有多年经验的开发人员而言,这可能是合情合理的,但对于新手来说……Web开发中有多少东西类似于仓库? 许多。

One common example of a data warehouse product is Redshift. These types of tools make it easy for developers to analyze their data. They include data from relational databases, as well as ERP, CRM and marketing automation data.

数据仓库产品的一个常见示例是Redshift 。 这些类型的工具使开发人员可以轻松地分析其数据。 它们包括来自关系数据库的数据,以及ERP,CRM和市场营销自动化数据。

Let’s return to our brewery analogy. So far, in our brewery, all of our “data” is not in a very accessible form. It’s in the format of bottles, hop bags and whatever other raw materials are lying around the facility. An analyst would need to manually count all of these physical items if they wanted to analyze the factory’s efficiency.

让我们回到啤酒厂的比喻。 到目前为止,在我们的啤酒厂中,我们所有的“数据”都不是很容易获得的形式。 它采用瓶子,啤酒花袋和工厂周围任何其他原材料的形式。 如果分析人员想分析工厂的效率,他们将需要手动计算所有这些物理项目。

You need a way to convert that physical data into machine-readable data, which your ops team can use to make the brewery more efficient. Think of it like a sensor system around the facility. The sensors convert the physical movement of raw materials into machine-readable data, which can later be analyzed.

您需要一种将物理数据转换为机器可读数据的方法,您的运营团队可以使用该方法来提高啤酒厂的效率。 可以将其视为设施周围的传感器系统。 传感器将原材料的物理运动转换为机器可读的数据,以后可以对其进行分析。

So now, as our factory operates, data is automatically collected and shared with the factory ops team so they can analyze efficiency.

因此,现在,随着我们工厂的运营,数据将自动收集并与工厂运营团队共享,以便他们可以分析效率。

See how this reduces stress on both the factory and production team? The production team can focus on making beer on the floor while the operations team can analyze from their office. This is a good reason to use a data warehouse tool as well. It reduces the number of queries on your database, which can slow performance.

看看这如何减轻工厂和生产团队的压力? 生产团队可以专注于在地板上制作啤酒,而运营团队可以在办公室进行分析。 这也是使用数据仓库工具的一个很好的理由。 它减少了数据库查询的数量,这可能会降低性能。

Hopefully, you see why “data warehouse” tool is slightly misleading. Yes, this does create a new dataset strictly for analysis. But, it is hard to tell why it is more “warehouse-like” than any other part of the system.

希望您能理解为什么“数据仓库”工具会引起误导。 是的,这确实创建了一个严格用于分析的新数据集。 但是,很难说为什么它比系统的任何其他部分更像“仓库”。

AWS计算工具 (AWS Computing Tools)

In all of the diagrams so far, have you noticed that “brewery” is in the middle, regardless of whether the diagram shows an actual brewery or a cloud computing environment?

到目前为止,在所有图表中,您是否都注意到“酿酒厂”在中间,无论该图表显示的是实际的啤酒厂还是云计算环境?

That is because we haven’t yet covered the service that ties this all together: EC2, or Elastic Compute Cloud. EC2 allows you to launch virtual instances, which are kind of like the brewery in this analogy.

这是因为我们尚未涵盖将这一切联系在一起的服务: EC2或Elastic Compute Cloud 。 EC2允许您启动虚拟实例,在这种情况下,虚拟实例有点像啤酒厂。

Instances are virtual servers. Unlike previous technologies, where your code was tied to one physical server, virtual servers allow you to launch your own environment in the cloud, which is composed of many connected servers. This is the part that ties all the other AWS services together.

实例是虚拟服务器 。 与以前的技术(将代码绑定到一台物理服务器)不同,虚拟服务器使您可以在由许多连接的服务器组成的云中启动自己的环境。 这是将所有其他AWS服务联系在一起的部分。

It’s kind of like being able to start up or shut down a new brewery at any time in any part of the world by copying your existing brewery. That may not be possible in real life, but it is possible in the AWS ecosystem. EC2 provides similar functionality to both the physical space and the workers in the brewery.

这就像通过复制您现有的啤酒厂,可以随时在世界任何地方启动或关闭新的啤酒厂一样。 在现实生活中这可能是不可能的,但在AWS生态系统中是可能的。 EC2为啤酒厂的物理空间和工人提供了类似的功能。

The diagram may be slightly misleading, because a virtual server does not take up a whole server. It exists within a network of servers. But that was too complicated to show in a small diagram. So I kept it.

该图可能会引起误解,因为虚拟服务器不会占用整个服务器。 它存在于服务器网络中。 但这太复杂了,无法以小图显示。 所以我保留了它。

AWS管理工具 (AWS Management Tools)

The final category of tools is management tools, like Elastic Beanstalk or CloudWatch. These tools can:

最后一类工具是管理工具,例如Elastic Beanstalk或CloudWatch。 这些工具可以:

  1. Monitor other tools listed above监视上面列出的其他工具
  2. Set up processes to help tools from multiple categories work together设置流程以帮助多个类别的工具协同工作

In the graphic above, you can see how many tools can help with deploying and maintaining your app. That’s why these tools are similar to the company’s management team. They are not personally producing beer for your company, but instead, they help all the divisions work together.

在上图中,您可以看到多少工具可以帮助您部署和维护您的应用程序。 这就是为什么这些工具与公司的管理团队相似的原因。 他们不是亲自为您的公司生产啤酒,而是帮助所有部门一起工作。

There is a wide variety of tools in the management category, so I am not going to cover any individual one in depth. They sit at a level above the other tools discussed.

在管理类别中,有各种各样的工具,因此,我不会深入介绍任何单个工具。 它们位于讨论的其他工具之上。

获取最新的视觉教程 (Get The Latest Visual Tutorials)

Did you enjoy this tutorial? Give it a “clap”, or sign up here to get my latest web development explanations.

您喜欢本教程吗? 给它一个“掌声”,或在这里注册以获得我最新的Web开发说明。

翻译自: https://www.freecodecamp.org/news/amazon-web-services-aws-explained-by-operating-a-brewery-8f1e91eacc40/

aws部署web

aws部署web_运营酿酒厂解释了Amazon Web Services(AWS)相关推荐

  1. 零基础 Amazon Web Services (AWS) 入门教程 (列表)

    在 Amazon Web Services 上托管 Web 应用程序 Web 应用程序 是指用户通过 Web 浏览器或专门的 Web 客户端访问的任何软件.Web 应用程序通常具有逻辑层级结构.例如, ...

  2. 零基础 Amazon Web Services (AWS) 入门教程图文版(三)

    原则上WDCP安装好了,就可以直接使用了,FTP.MySQL什么的应有尽有.但是本站Amazon AWS -- 免费的午餐不好吃一文中说到过这个问题,直接用WDCP的MySQL会导致EBS的I/O急剧 ...

  3. 零基础 Amazon Web Services (AWS) 入门教程图文版(四)

    自上一篇之后,5天过去了,这篇文章总算是挤出来了... 其实看不看无所谓啦,都说了WDCP非常适合小白,随便折腾.要是折腾的时候遇到什么问题,欢迎留言探讨~ 五.新建站点 登录WDCP后台,首次登录会 ...

  4. 零基础 Amazon Web Services (AWS) 入门教程图文版(二)

    上一篇讲到,主机正常运转了.但是此时如果直接访问公网IP是打不开网页的,因为主机上没有搭建Web服务器环境,防火墙也没有开放80端口,并且我们没有上传任何网页文件.所以这一篇主要介绍服务器环境的搭建. ...

  5. 零基础 Amazon Web Services (AWS) 入门教程图文版(一)

    现在小站唯一的流量都靠AWS这个关键词了,刚好要用AWS重新建站,所以从头开始记录一遍吧. 所谓零基础,就是你可以没有任何AWS使用经历,仍然能够按照教程操作下去.所谓图文版,就是建议手机用户在没有连 ...

  6. Citco推出在Amazon Web Services上运行的新SaaS Æxeo Treasury™解决方案

    基于云的财资工具为另类投资基金经理提供支持 通过改善运营效率来增加价值,并提高安全性 纽约--(美国商业资讯)--面向金融服务行业的全球领先的服务供应商Citco Group of Companies ...

  7. ZephyrTel宣布与Amazon Web Services达成战略合作协议

    ZephyrTel还加入AWS合作伙伴网络,加快云业务开发 伦敦--(美国商业资讯)--ESW Capital旗下专注于服务全球电信运营商的分公司ZephyrTel欣然宣布,该公司今日与Amazon ...

  8. Amazon Web Services: Networking AWS:网络 Lynda课程中文字幕

    Amazon Web Services: Networking 中文字幕 AWS:网络 中文字幕Amazon Web Services: Networking 采用云基础架构战略包括配置满足组织需求的 ...

  9. AWS(Amazon Web Services, 亚马逊网络服务系统)简介

    1.简介 亚马逊网络服务系统(英语:Amazon Web Services,简称为AWS),由亚马逊公司所建立的云端运算平台,提供许多远端Web服务.Amazon EC2与Amazon S3都架构在这 ...

最新文章

  1. 一道百度算法面试题讲解
  2. 上传一份个人学习struts2的历程笔记
  3. IBatis.net动态SQL语句
  4. 16进制/10进制数转化为浮点型案例
  5. 深入理解Java虚拟机(2)
  6. JSP的基本构成详解
  7. 科大星云诗社动态20210516
  8. [objective-c] 04 - 消息机制 回调 目标-动作回调
  9. kvm最小磁盘大于等于5G
  10. 光纤通信中的直接检测和相干检测系统
  11. KORG Software TRITON for mac(虚拟合成器软件)
  12. 【hdu 4658】Integer Partition (无序分拆数、五边形数定理)
  13. 博士一篇SCI三区即可入职该高校,配偶是硕士的,直接给事业编!还有45万安家费…...
  14. 模块化的机器学习系统就够了吗?Bengio师生告诉你答案
  15. IstioCon 2022 报名中|使用 eBPF 代替 iptable 加速 Istio 数据平面
  16. 2022年政府工作报告词频分析
  17. idea 导出项目到eclipse
  18. 台式计算机无线上网设置,台式机如何设置无线上网
  19. vue实现前端页面缓存
  20. java json设置编码_java-JSON字符编码

热门文章

  1. 安装Go,配置Go环境(实力亲测)
  2. 笔记本软件页面分辨率低_笔记本分辨率降低怎么办_笔记本电脑电脑分辨率低怎么解决-win7之家...
  3. 错误 LNK2026 模块对于 SAFESEH 映像是不安全的。
  4. 光大银行h5支付(php接入光大银行h5支付)
  5. android指纹解锁分析,浅析4种手机指纹解锁方式的优劣势
  6. PHP Curl出现403错误的解决办法 beecloud webhook订单状态返回 服务器403的问题
  7. NYIST 113 字符串替换
  8. 菜鸟窝大数据课程(免费试听):Linux基础课程
  9. 获取当前时间戳13位
  10. “醒醒吧,世界上有技术驱动型公司!”