aws 彈性三劍客_AWS和彈性:超越用戶需求

aws 彈性三劍客

I’ll assume that, one way or another, you’re already familiar with many of AWS’s core deployment services. That means you now know about:

我假設您已經熟悉許多AWS的核心部署服務。 這意味著您現在知道:

? EC2 instances and AMIs (Amazon Machine Images), and the “peripheral” tools that support their deployment like security groups and EBS volumes

?EC2實例和AMI(Amazon機器映像),以及支持其部署的“外圍”工具,例如安全組和EBS卷

? Incorporating databases into our applications, both on-instance and through the managed RDS service

?實例化和通過托管RDS服務將數據庫整合到我們的應用程序中

? Using S3 buckets to deliver media files through our EC2 applications and for server backup storage

?使用S3存儲桶通過我們的EC2應用程序傳遞媒體文件并用于服務器備份存儲

? Controlling access to our AWS resources with IAM (Identity and Access Management)

?使用IAM(身份和訪問管理)控制對我們AWS資源的訪問

? Managing growing resource sets by intelligently applying tags, and

?通過智能地應用標簽來管理不斷增長的資源集,以及

? Accessing our resources using either the browser interface or the AWS CLI (Command Line Interface)

?使用瀏覽器界面或AWS CLI(命令行界面)訪問我們的資源

All that can be represented by the schematic in figure 1.

所有這些都可以由圖1中的示意圖表示。

Now I’m going to shift the focus just a bit and explore some best-practices for application optimization. Figure 2 can help you visualize how all that infrastructure can be made highly available through the magic of network segmenting, auto scaling, and load balancing.

現在,我將重點轉移一點,并探索一些應用程序優化的最佳實踐。 圖2可以幫助您可視化如何通過網絡分段,自動擴展和負載平衡的魔力使所有基礎設施高度可用。

While you probably won’t yet be familiar with many of the tools and relationships represented in the diagram, you should spend a minute making a mental note of at least a few key points, including:

盡管您可能還不熟悉圖中所示的許多工具和關系,但是您應該花一點時間至少記下一些關鍵點,包括:

? The Virtual Private Cloud (VPC) that encompasses all the AWS resources in our application deployment

?虛擬私有云(VPC)包含我們應用程序部署中的所有AWS資源

? The two kinds of availability zones: private and public?—?used to manage and, where needed, isolate resources

?兩種可用性區域:私有和公共-用于管理資源,并在需要時隔離資源

? The security groups whose rules control the movement of data between resources

?其規則控制資源之間的數據移動的安全組

? The EC2 AMI (Amazon Machine Image) that acts as a template for replicating precise operating system environments

?EC2 AMI(Amazon機器映像),用作復制精確的操作系統環境的模板

? The S3 (Simple Storage Service) bucket that can store and deliver data?—?both for backup and delivery to users

?S3(簡單存儲服務)存儲桶,可以存儲和交付數據-既可以備份又可以交付給用戶

? The EBS volumes that act as data volumes (like hard drives) for an instance

?充當實例的數據卷(例如硬盤驅動器)的EBS卷

? The auto scaler that permits automatic provisioning of greater (or fewer) instances to meet changing demands on an application, and

?自動縮放器,允許自動設置更多(或更少)的實例,以滿足對應用程序不斷變化的需求,以及

? The load balancer that routes traffic among multiple servers to ensure the smoothest and most efficient user experience

?在多個服務器之間路由流量的負載平衡器,以確保最流暢,最有效的用戶體驗

I’m pretty sure you’ve picked up on this already: the “e” in many AWS service names (EC2, ECS, EFS, EMR…) doesn’t stand for “electronic” the way it does in the names of some older technologies like email, but “elastic.” You can, nevertheless, be excused for wondering just what it is about the AWS vision of cloud computing that’s so elastic.

我敢肯定,您已經掌握了這一點:許多AWS服務名稱(EC2,ECS,EFS,EMR…)中的“ e”并不代表某些名稱中的“電子”方式較早的技術(例如電子郵件),但具有“彈性”。 但是,您可以因懷疑AWS如此靈活的云計算愿景而感到困惑。

But before I get to answering that question, it might be useful to talk a bit about cloud computing in general. Understanding what makes the cloud unique is probably essential to taking full advantage of all that it has to offer.

但是,在我開始回答這個問題之前,通常先討論一下云計算可能會很有用。 要充分利用云所提供的一切,了解云獨特的原因可能是必不可少的。

云計算 (Cloud Computing)

The US National Institute of Standards and Technology (NIST) defines cloud computing as services that offer their users all of these five qualities:

美國國家標準技術研究院(NIST)將云計算定義為為用戶提供以下五種品質的服務:

? On-demand self-service: Customers are able to access public cloud resources whenever needed and without having to order them through a human representative.

?按需自助服務:客戶可以在需要時訪問公共云資源,而不必通過人工代表訂購。

? Broad network access: Cloud resources are accessible from any network-connected (i.e., Internet) location.

?廣泛的網絡訪問:可從任何網絡連接(即Internet)位置訪問云資源。

? Resource pooling: Cloud providers offer a multi-tenant model, whereby individual customers can safely share resources with each other, and dynamic resource assignment, through which resources can be allocated and deallocated according to customer demand.

?資源池:云提供商提供了多租戶模型,單個客戶可以安全地共享彼此的資源,并可以動態分配資源,從而可以根據客戶需求分配和重新分配資源。

? Rapid elasticity: Resource availability and performance can be automatically increased or decreased to meet changing customer demand.

?快速彈性:可以自動增加或減少資源可用性和性能,以滿足不斷變化的客戶需求。

? Measured service: Customers are able to consume services at varying levels through a single billing period and be charged only for those resources that they actually use.

?計量服務:客戶可以在一個計費周期內使用不同級別的服務,并且僅對其實際使用的資源付費。

These five qualities describe a deeply flexible and highly automated system whose elements can be freely mixed and matched to provide the most efficient and cost-effective service possible. But, a great deal of what makes this possible is the existence of integrated systems that can dynamically adjust themselves based on what’s going on around them. These adjustments are examples of elastic behavior.

這五種品質描述了一個高度靈活且高度自動化的系統,該系統的各個要素可以自由混合和匹配,以提供最高效,最具成本效益的服務。 但是,使這成為可能的很多原因是存在集成系統,這些系統可以根據周圍發生的事情動態地進行自我調整。 這些調整是彈性行為的示例。

彈性與可伸縮性 (Elasticity vs Scalability)

So elasticity, as we have established, is a system’s ability to monitor user demand and automatically increase and decrease deployed resources accordingly. Scalability, by contrast, is a system’s ability to monitor user demand and automatically increase and decrease…wait: didn’t I just say that about elasticity?

因此,正如我們已經建立的,彈性是系統監視用戶需求并相應地自動增加和減少已部署資源的能力。 相比之下,可伸縮性是系統監視用戶需求并自動增加和減少…的能力……等等:我不是只是說彈性嗎?

It’s a bit complicated. In fact, the two terms are sometimes used interchangeably. However I think it’s worthwhile distinguishing between them. Now bear in mind that the way I explain the relationship between these two ideas is by no means the last word on the subject -– look around a bit and you will find some other approaches. But, I think, within the context of understanding how AWS works, my spin should be useful.

這有點復雜。 實際上,這兩個術語有時可以互換使用。 但是,我認為有必要區分它們。 現在請記住,我解釋這兩種想法之間關系的方式絕不是該主題的最后一句話-環顧四周,您會發現其他一些方法。 但是,我認為,在了解AWS如何工作的背景下,我的旋轉應該會很有用。

What makes an elastic band elastic, is partly its ability to stretch under pressure, but also the way it quickly returns to its original size when the pressure is released. In AWS terms, that would mean the way, for instance, EC2 makes instances available to you when needed, but lets you drop them when they’re not; charging you only for up time. See figure 3.

使松緊帶具有彈性的部分原因是其在壓力下拉伸的能力,而且還在于在釋放壓力后Swift恢復其原始大小的方式。 用AWS術語來說,這意味著,例如,EC2可以在需要時向您提供實例,而在不需要時可以將它們刪除; 僅向您收費。 參見圖3。

Scalability describes the way a system is designed to meet changing demand. That might include the fact that you’ve got 24-hour access to any resources you might need (which, of course, is an elastic feature), but it also means that the underlying design itself supports rapid and unpredictable changes.

可伸縮性描述了系統滿足不斷變化的需求的方式。 這可能包括以下事實:您可以24小時訪問您可能需要的任何資源(這當然是一種彈性功能),但這也意味著底層設計本身支持快速且不可預測的更改。

As an example, software that’s scalable can be easily picked up and dropped onto a new server -– possibly within a new network environment -– and just run without any manual configuration. Similarly, as is illustrated in figure 4, the composition of a scalable infrastructure can be quickly changed in a way that all the old bits and pieces immediately know how to work together with the new ones.

例如,可以輕松地將可伸縮的軟件安裝到新服務器上(可能在新的網絡環境中)并放到新服務器上,而無需任何手動配置即可運行。 類似地,如圖4所示,可伸縮基礎結構的組成可以以所有舊的點點滴滴都立即知道如何與新的點點滴滴一起工作的方式快速更改。

With that in mind, we can say that Amazon’s EC2 is not only elastic but, since its elements (instances, storage volumes, security groups, etc.) can be smoothly dropped into and out of running infrastructures, it’s also very scalable. Ah, but what kind of scalable? There are two, you know:

考慮到這一點,我們可以說Amazon EC2不僅具有彈性,而且由于其元素(實例,存儲量,安全組等)可以順利地放入和退出運行的基礎架構,因此它也具有很好的可擴展性。 嗯,但是什么樣的可擴展性? 有兩個,您知道的:

? Horizontal scaling is “scaling out”?—?where you add more lightweight server nodes (or “instances”) to meet growing demand.

?水平擴展是“向外擴展” —在其中添加更多輕量級服務器節點(或“實例”)以滿足不斷增長的需求。

? Vertical scaling is “scaling up”?—?where you move your application from a single lightweight server to one with greater compute capacity.

?垂直擴展是“向上擴展” —您將應用程序從單個輕量級服務器移至具有更大計算能力的服務器。

It is certainly possible to transfer AWS-based applications from lighter to heavier servers, and for some payloads?—?like many high-load transaction databases, it’s preferred. But in an AWS context, if you hear some conjugation of the word “scale”, the odds are that it’s referring to horizontal scaling.

當然,可以將基于AWS的應用程序從較輕的服務器轉移到較重的服務器,并且對于某些負載(例如許多高負載事務數據庫),它是首選。 但是在AWS環境中,如果您聽到“ scale”一詞的一些變化,那么很可能是指水平縮放。

實際應用 (Practical applications)

Ok. But who cares? Well, as the customer demand on our WordPress site continues to grow, we will, and in a big way. You see, for some reason -– perhaps related to the fact that we discount the price of our product by 75% for just a half an hour each evening -– customers arrive in their greatest numbers in the early evening, local time. So while the single server we’ve been running stands largely unused throughout most of the day, it simply melts under the pressure of thousands of visits squeezed into such a short stretch of time.

好。 但誰在乎? 好吧,隨著我們WordPress網站上的客戶需求持續增長,我們將以極大的方式發展。 您會看到某些原因-也許與我們每晚將產品價格降低75%的事實有關-每天晚上半小時客戶到達的數量最多。 因此,盡管我們一直在運行的單個服務器在一天中的大部分時間里都處于閑置狀態,但它卻在成千上萬次訪問的壓力下融化了,而訪問卻被壓縮到如此短的時間內。

And then there’s that question one of the guys in the office asked the other day: “Our entire business is running on a single web server; what happens if it goes down?” What indeed.

那天辦公室里的一個人問了一個問題:“我們的整個業務都在一臺Web服務器上運行; 如果它下降怎么辦?” 的確如此。

We could provision four or five extra servers and run them full time. That way, we’d be covered for the high-volume periods and for the failure of any one server. But it would still involve colossal waste, since for most of each day we’d be paying for most of the instances to sit idle. Nor would it necessarily be much help in the event of a network failure, which would likely cut connectivity to all the servers at the same time.

我們可以提供四到五臺額外的服務器,并全時運行它們。 這樣一來,我們就可以應對大批量交易以及任何一臺服務器的故障。 但這仍然會帶來巨大的浪費,因為在每天的大部分時間里,我們都會為大多數實例保持空閑狀態付費。 如果發生網絡故障,也不一定會有太大幫助,因為這可能會同時切斷與所有服務器的連接。

We could always address at least the customer demand issue by arranging for someone to be at the office every evening to manually fire up as many extra servers as we’ll need. But we asked around, and no one volunteered. And besides, the best way to ensure a daily job won’t get done is to assume that an admin will remember to do it.

我們總是可以安排每天晚上到辦公室來手動啟動盡可能多的額外服務器,從而至少解決客戶需求問題。 但是我們四處詢問,沒有人自愿參加。 此外,確保日常工作不會完成的最好方法是假設管理員會記得這樣做。

自動化高可用性 (Automating High Availability)

Alternatively, we could spend some time incorporating high availability capability into our setup and let the whole thing be quietly and efficiently managed by software. This will be the subject of the next few chapters of my book, where we will learn to leverage AWS’s geographically remote availability zones to make total application failure much less likely, use load balancing to coordinate between parallel servers and monitor their health, and auto scaling to let AWS automatically respond to the peaks and valleys of changing demand by launching and shutting down instances according to need.

另外,我們可以花一些時間將高可用性功能整合到我們的設置中,然后讓整個過程由軟件安靜有效地管理。 這將是本書接下來幾章的主題,我們將在其中學習如何利用AWS的地理位置遠程可用性區域來降低應用程序整體故障的可能性,使用負載平衡來協調并行服務器之間的狀態并監控其運行狀況,并自動擴展讓AWS通過根據需要啟動和關閉實例來自動響應需求變化的高峰和低谷。

For more info on Amazon Web Services, download the free first chapter of Learn Amazon Web Service in a Month of Lunches and see this Slideshare presentation. Don’t forget to use code ssclinton to save 42% off your purchase.

有關Amazon Web Services的更多信息, 請在一個月的午餐中下載學習Amazon Web Service的免費第一章,并參閱此Slideshare演示文稿 。 不要忘了使用代碼ssclinton節省42%的購買費用。

翻譯自: https://www.freecodecamp.org/news/aws-and-elasticity-keeping-ahead-of-user-demand/

aws 彈性三劍客

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/391316.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/391316.shtml
英文地址,請注明出處:http://en.pswp.cn/news/391316.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

leetcode 368. 最大整除子集(dp)

給你一個由 無重復 正整數組成的集合 nums ,請你找出并返回其中最大的整除子集 answer ,子集中每一元素對 (answer[i], answer[j]) 都應當滿足: answer[i] % answer[j] 0 ,或 answer[j] % answer[i] 0 如果存在多個有效解子集&a…

在Centos中安裝mysql

下載mysql這里是通過安裝Yum源rpm包的方式安裝,所以第一步是先下載rpm包 1.打開Mysql官網 https://www.mysql.com/, 點擊如圖選中的按鈕 點擊如圖框選的按鈕 把頁面拉倒最下面,選擇對應版本下載,博主這里用的是CentOS7 下載完成后上傳到服務器,由于是yum源的安裝包,所以…

碩士可以跟別的導師做實驗嗎_如何成為一名導師可以成為雙刃劍

碩士可以跟別的導師做實驗嗎Mentoring is the ability to give advise or train someone, often times, who is less knowledgeable in a particular field. This is pretty much common place in tech companies. There you usually have senior developers who, besides bein…

linux中權限對文件和目錄的意義

1.權限對文件的意義: 讀:可查看文件的內容 寫:可修改文件的內容(但不能刪除文件) 執行:可執行文件 2.權限對目錄的意義: 讀:可以查看目錄下的內容,即可以讀取該目錄下的結…

Docker 入門(1)虛擬化和容器

1 虛擬化 虛擬化是為一些組件(例如虛擬應用、服務器、存儲和網絡)創建基于軟件的(或虛擬)表現形式的過程。它是降低所有規模企業的 IT 開銷,同時提高其效率和敏捷性的最有效方式。 1.1 虛擬化用于程序跨平臺兼容 要…

量子相干與量子糾纏_量子分類

量子相干與量子糾纏My goal here was to build a quantum deep neural network for classification tasks, but all the effort involved in calculating errors, updating weights, training a model, and so forth turned out to be completely unnecessary. The above circu…

三角函數式的化簡

前言 為什么需要化簡三角函數式? 一、什么是三角函數式的化簡? 二、三角函數式的化簡標準是什么? 三、三角函數式化簡可能用到的變形: 弦切互化,1的代換,通分約分,配方展開,提取公因…

Python -- xlrd,xlwt,xlutils 讀寫同一個Excel

最近開始學習python,想做做簡單的自動化測試,需要讀寫excel,然后就找到了xlrd來讀取Excel文件,使用xlwt來生成Excel文件(可以控制Excel中單元格的格式),需要注意的是,用xlrd讀取excel是不能對其進行操作的&…

計算機工程師分級_這些是每個計算機工程師都應該知道的數字

計算機工程師分級In 2010, Jeff Dean from Google gave a wonderful talk at Stanford that made him quite famous. In it, he discussed a few numbers that are relevant to computing systems. Then Peter Norvig published those numbers for the first time on the inter…

leetcode 377. 組合總和 Ⅳ(dp)

給你一個由 不同 整數組成的數組 nums ,和一個目標整數 target 。請你從 nums 中找出并返回總和為 target 的元素組合的個數。 題目數據保證答案符合 32 位整數范圍。 示例 1: 輸入:nums [1,2,3], target 4 輸出:7 解釋&…

1.4- 定時任務總結之九句箴言

1.4定時任務之九句箴言九句箴言---- 不會九句箴言別做運維1.定時任務規則之前加注釋2.使用腳本代替命令行制定定時任務3.定時任務中date命令%的特殊含義定時任務中,%表示回車 -----可以使用\轉義4.運行腳本一定要用/bin/sh或sh腳本不必須有x權限5.定時任務中-命令或腳本的輸出…

ubuntu 18.04 vi里面方向鍵變成abcd 處理辦法

sudo apt-get remove vim-common sudo apt-get install vim 轉載于:https://www.cnblogs.com/testing-BH/p/11506400.html

知識力量_網絡分析的力量

知識力量The most common way to store data is in what we call relational form. Most systems get analyzed as collections of independent data points. It looks something like this:存儲數據的最常見方式是我們所謂的關系形式。 大多數系統作為獨立數據點的集合進行分析…

python里的apply,applymap和map的區別

apply,applymap和map的應用總結:apply 用在dataframe上,用于對row或者column進行計算;applymap 用于dataframe上,是元素級別的操作;map (其實是python自帶的)用于series上,是元素級別的操作。如…

驗證曲線和學習曲線_如何擊敗技術學習曲線的怪物

驗證曲線和學習曲線Doing what I do for a living, which these days mostly involves creating technology books and courseware, I’m constantly learning new technologies. In a way, my new tech adventures are not much different than the ones most IT pros face, e…

234

234 轉載于:https://www.cnblogs.com/Forever77/p/11509588.html

SCCM PXE客戶端無法加載DP(分發點)映像

上一篇文章我們講到了一個比較典型的PXE客戶端無法找到操作系統映像的故障,今天再和大家一起分享一個關于 PXE客戶端無法加載分發點映像的問題。具體的報錯截圖如下:從報錯中我們可以看到,PXE客戶端已經成功的找到了SCCM服務器,并…

Docker 入門(2)技術實現和核心組成

1. Docker 的技術實現 Docker 的實現,主要歸結于三大技術: 命名空間 ( Namespaces )控制組 ( Control Groups )聯合文件系統 ( Union File System ) 1.1 Namespace 命名空間可以有效地幫助Docker分離進程樹、網絡接口、掛載點以及進程間通信等資源。L…

marlin 三角洲_帶火花的三角洲湖:什么和為什么?

marlin 三角洲Let me start by introducing two problems that I have dealt time and again with my experience with Apache Spark:首先,我介紹一下我在Apache Spark上的經歷反復解決的兩個問題: Data “overwrite” on the same path causing data l…

環境變量的作用

1. PATH環境變量。作用是指定命令搜索路徑,在shell下面執行命令時,它會到PATH變量所指定的路徑中查找看是否能找到相應的命令程序。我們需要把 jdk安裝目錄下的bin目錄增加到現有的PATH變量中,bin目錄中包含經常要用到的可執行文件如javac/ja…