Chapter 5: Elastic Load Balancing, Amazon CloudWatch, and Auto Scaling
- A, D. An Auto Scaling group must have a minimum size and a launch configuration defined in order to be created. Health checks and a desired capacity are optional.
- 創(chuàng)建as的時(shí)候必須指定mininum 和 創(chuàng)建launch configuration
- 健康檢查和desired capacity都是可選項(xiàng)
- B. The load balancer maintains two separate connections: one connection with the client and one connection with the Amazon EC2 instance.
- load balancer 一方面要接收client的請求,一方面要將請求轉(zhuǎn)發(fā)到后端的ec2實(shí)例
- D. Amazon CloudWatch metric data is kept for 2 weeks.
- cloudwatch 的指標(biāo)數(shù)據(jù)可以保存兩周,時(shí)間段為 60 秒 (1 分鐘) 的數(shù)據(jù)點(diǎn)可用 15 天
- 最初以較短時(shí)間段發(fā)布的數(shù)據(jù)點(diǎn)匯總在一起,可實(shí)現(xiàn)長期存儲。例如,如果您使用 1 分鐘的時(shí)間段收集數(shù)據(jù),數(shù)據(jù)以 1 分鐘的精度保持 15 天可用。15 天之后,此數(shù)據(jù)仍可用,但匯總在一起,只能以 5 分鐘的精度檢索。63 天之后,數(shù)據(jù)進(jìn)一步匯總,以 1 小時(shí)的精度提供。
- 自 2016 年 7 月 9 日起,CloudWatch 開始保留 5 分鐘和 1 小時(shí)指標(biāo)數(shù)據(jù)。
- A. Only the launch configuration name, AMI, and instance type are needed to create an Auto Scaling launch configuration. Identifying a key pair, security group, and a block device mapping are optional elements for an Auto Scaling launch configuration.
- launch configuration必選:instance type、AMI、name
- launch configuration可選:key pair、SG、存儲設(shè)置都是可選的;
- B. You can use the Amazon CloudWatch Logs Agent installer on existing Amazon EC2 instances to install and configure the CloudWatch Logs Agent.
- CloudWatch Log Agent是用來進(jìn)行日志采集監(jiān)控的解決方案,不過需要自己安裝
- C. You configure your load balancer to accept incoming traffic by specifying one or more listeners.
- load balancer主要通過listener進(jìn)行流量采集,不過AWS 的lb不支持udp協(xié)議
- D. The default Amazon EC2 instance limit for all regions is 20.
- region的默認(rèn)的EC2實(shí)例最大限制數(shù)目是20
- A. An SSL certificate must specify the name of the website in either the subject name or listed as a value in the SAN extension of the certificate in order for connecting clients to not receive a warning.
- 通過創(chuàng)建一個(gè)ssl證書,指定website name,通過subject name值的擴(kuò)展來規(guī)避警告。
- 不確定...
- C. When Amazon EC2 instances fail the requisite number of consecutive health checks, the load balancer stops sending traffic to the Amazon EC2 instance.
- 將LB發(fā)現(xiàn)某個(gè)ec2實(shí)例無法通過健康檢查,能做的就是不將流量轉(zhuǎn)發(fā)過去。
- D. Amazon CloudWatch metrics provide hypervisor visible metrics.
- CloudWatch的EC2基本指標(biāo)如下:CPU、硬盤、網(wǎng)絡(luò)
- C. Auto Scaling is designed to scale out based on an event like increased traffic while being cost effective when not needed.
- 配置自動(dòng)擴(kuò)展組就行了,在每個(gè)用戶訪問的內(nèi)容都不一樣的情況下,不需要用cloudfront
- B. Auto Scaling will provide high availability across three Availability Zones with three Amazon EC2 instances in each and keep capacity above the required minimum capacity, even in the event of an entire Availability Zone becoming unavailable.
- 高可用就是要在多個(gè)AZ,單個(gè)AZ不可用,其他AZ仍舊能保持65%的訪問能力
- B, E, F. Auto Scaling responds to changing conditions by adding or terminating instances, launches instances from an AMI specified in the launch configuration associated with the Auto Scaling group, and enforces a minimum number of instances in the min-size parameter of the Auto Scaling group.
- AS 會(huì)對依據(jù)條件進(jìn)行擴(kuò)展或者收縮;
- AS 必須先創(chuàng)建啟動(dòng)的配置文件;
- AS 中啟動(dòng)的實(shí)例必須大于mini-size 設(shè)定的值
- D. A, B, and C are all true statements about launch configurations being loosely coupled and referenced by the Auto Scaling group instead of being part of the Auto Scaling group.
- A, C. An Auto Scaling group may use On-Demand and Spot Instances. An Auto Scaling group may not use already stopped instances, instances running someplace other than AWS, and already running instances not started by the Auto Scaling group itself.
- 一個(gè)AS 組會(huì)使用on-demand實(shí)例和spot instance
- A, F. Amazon CloudWatch has two plans: basic, which is free, and detailed, which has an additional cost. There is no ad hoc plan for Amazon CloudWatch.
- CloudWatch的base計(jì)劃:5分鐘,免費(fèi)
- CloudWatch的detail計(jì)劃:1分鐘,收費(fèi)
- A, C, D. An Elastic Load Balancing health check may be a ping, a connection attempt, or a page that is checked.
- LB的健康檢查主要是通過發(fā)送ping、網(wǎng)頁請求、端口連接方式完成
- B, C. When connection draining is enabled, the load balancer will stop sending requests to a deregistered or unhealthy instance and attempt to complete in-flight requests until a connection draining timeout period is reached, which is 300 seconds by default.
- 當(dāng)instance的連接用盡,處于不健康的狀態(tài),LB會(huì)繼續(xù)保持連接等待超時(shí),同時(shí)不會(huì)發(fā)送新的流量過去。對于新的請求專向錯(cuò)誤提示頁面
- B, E, F. Elastic Load Balancing supports Internet-facing, internal, and HTTPS load balancers.
- LB支持互聯(lián)網(wǎng)、內(nèi)網(wǎng)、HTTPS協(xié)議的負(fù)載均衡
- B, D, E. Auto Scaling supports maintaining the current size of an Auto Scaling group using four plans: maintain current levels, manual scaling, scheduled scaling, and dynamic scaling.
- AS 支持 手工擴(kuò)展、動(dòng)態(tài)擴(kuò)展、定時(shí)擴(kuò)展的等策略
知識點(diǎn)總結(jié)
Understand what the Elastic Load Balancing service provides. Elastic Load Balancing is a highly available service that distributes traffic across Amazon EC2 instances and includes options that provide flexibility and control of incoming requests to Amazon EC2 instances.
了解什么是ELB 服務(wù)。ELB服務(wù)是一個(gè)高可用的跨EC2的流量分發(fā)服務(wù),為EC2提供了自有的流量請求;
Know the types of load balancers the Elastic Load Balancing service provides and when to use each one. An Internet-facing load balancer is, as the name implies, a load balancer that takes requests from clients over the Internet and distributes them to Amazon EC2 instances that are registered with the load balancer. An internal load balancer is used to route traffic to your Amazon EC2 instances in VPCs with private subnets.
An HTTPS load balancer is used when you want to encrypt data between your load balancer and the clients that initiate HTTPS sessions and for connections between your load balancer and your back-end instances.了解各種LB類型以及如何去使用。一個(gè)面向互聯(lián)網(wǎng)的LB是從互聯(lián)網(wǎng)獲取流量,同時(shí)將流量分發(fā)到后端注冊到LB上的EC2實(shí)例。一個(gè)內(nèi)部的LB被用來做VPC內(nèi)私有子網(wǎng)的流量轉(zhuǎn)發(fā)。一個(gè)HTTPS LB被用來做client到LB的數(shù)據(jù)加密,用于初始化HTTPS ,同時(shí)用來做LB與后端instance的連接;
Know the types of listeners the Elastic Load Balancing service provides and the use case and requirements for using each one. A listener is a process that checks for connection requests. It is configured with a protocol and a port for front-end (client to load balancer) connections and a protocol and a port for back-end (load balancer to back-end instance) connections.
了解ELB服務(wù)提供的各種監(jiān)聽器以及應(yīng)用場景 。一個(gè)listener是一個(gè)連接的處理流程。被用來配置協(xié)議和前端端口,同時(shí)設(shè)置后端連接的處理協(xié)議與端口;
Understand the configuration options for Elastic Load Balancing. Elastic Load Balancing allows you to configure many aspects of the load balancer, including idle connection timeout, cross-zone load balancing, connection draining, proxy protocol, sticky sessions, and health checks.
了解ELB的配置選項(xiàng)。ELB允許我們的配置多個(gè)特性,包括connection timeout,跨區(qū)LB,鏈接消耗數(shù),代理協(xié)議,會(huì)話保持及健康檢查;
Know what an Elastic Load Balancing health check is and why it is important. Elastic Load Balancing supports health checks to test the status of the Amazon EC2 instances behind an Elastic Load Balancing load balancer.
了解ELB的健康檢查為嘛很重要。ELB支持針對注冊到ELB上的EC2的健康檢查;
Understand what the amazon CloudWatch service provides and what use cases there are for using it. Amazon CloudWatch is a service that you can use to monitor your AWS resources and your applications in real time. With Amazon CloudWatch, you can collect and track metrics, create alarms that send notifications, and make changes to the resources being monitored based on rules you define. For example, you might choose to monitor CPU utilization to decide when to add or remove Amazon EC2 instances in an application tier. Or, if a particular application-specific metric that is not visible to AWS is the best indicator for assessing your scaling needs, you can perform a PUT request to push that metric into Amazon CloudWatch. You can then use this custom metric to manage capacity.
了解什么是CloudWatch服務(wù)及使用場景。CloudWatch是一個(gè)能實(shí)時(shí)監(jiān)控AWS resources和你的application的服務(wù)。通過CloudWatch,你可以搜集和跟蹤指標(biāo),創(chuàng)建警報(bào)同時(shí)發(fā)送通知,基于當(dāng)你定義的監(jiān)控規(guī)則適時(shí)作出改變;例如,你也許選擇監(jiān)控CPU利用率來決定是否增加或者減少EC2 instances在應(yīng)用層。或者一個(gè)特定的應(yīng)用指標(biāo)來決定是否有擴(kuò)展需求,你可以put一個(gè)請求同時(shí)將指標(biāo)放到CloudWatch,然后你能用這個(gè)定制的指標(biāo)管理容量;
Know the differences between the two types of monitoring—basic and detailed— for Amazon CloudWatch. Amazon CloudWatch offers basic or detailed monitoring for supported AWS products. Basic monitoring sends data points to Amazon CloudWatch every five minutes for a limited number of preselected metrics at no charge. Detailed monitoring sends data points to Amazon CloudWatch every minute and allows data aggregation for an additional charge. If you want to use detailed monitoring, you must enable it—basic is the default.
了解兩種類型的監(jiān)控“basic和detail”對于CloudWatch的不同。CloudWatch提供了basic或者detail監(jiān)控用于AWS產(chǎn)品。Basic監(jiān)控將數(shù)據(jù)每隔5分鐘發(fā)送一定數(shù)量預(yù)先選擇好的指標(biāo),同時(shí)不產(chǎn)生費(fèi)用。Detailed 監(jiān)控是每隔1分鐘發(fā)送數(shù)據(jù)到CloudWatch,需要付額外的費(fèi)用。如果你想詳細(xì)監(jiān)控,你必須啟動(dòng)它,默認(rèn)是basic。
Understand Auto Scaling and why it is an important advantage of the AWS Cloud. A distinct advantage of deploying applications to the cloud is the ability to launch and then release servers in response to variable workloads. Provisioning servers on demand and then releasing them when they are no longer needed can provide significant cost savings for workloads that are not steady state.
了解AS,并且知道他對于AWS cloud的重要性;云的最大優(yōu)勢是可以基于workload的變化來相應(yīng)的調(diào)整部署應(yīng)用的而數(shù)量。按需的獲取servers,同時(shí)在不需要的時(shí)候?qū)崟r(shí)釋放他們,可以有效的降低成本。
Know when and why to use Auto Scaling. Auto Scaling is a service that allows you to scale your Amazon EC2 capacity automatically by scaling out and scaling in according to criteria that you define. With Auto Scaling, you can ensure that the number of running Amazon EC2 instances increases during demand spikes or peak demand periods to maintain application performance and decreases automatically during demand lulls or troughs to minimize costs.
了解when and why 去使用AS。AS是一個(gè)允許你按照自己定義的規(guī)則自動(dòng)擴(kuò)展和收縮EC2數(shù)量的服務(wù)。通過AS,你可以保證一定數(shù)量的EC2實(shí)例在流量峰值的時(shí)候按需增加,來保證應(yīng)用的性能。同時(shí)在峰值過后自動(dòng)的減少以降低成本;
Know the supported Auto Scaling plans. Auto Scaling has several schemes or plans that you can use to control how you want Auto Scaling to perform. The Auto Scaling plans are named Maintain Current Instant Levels, Manual Scaling, Scheduled Scaling, and Dynamic Scaling.
了解AS支持的計(jì)劃。AS有多個(gè)策略你可以用來做彈性伸縮。AS策略被命名如下:Maintain Current Instance Levels,Manual Scaling、Scheduled Scaling、Dynamic Scaling
Understand how to build an Auto Scaling launch configuration and an Auto Scaling group and what each is used for. A launch configuration is the template that Auto Scaling uses to create new instances and is composed of the configuration name, AMI, Amazon EC2 instance type, security group, and instance key pair.
理解如何構(gòu)建一個(gè)AS 配置和一個(gè)AS 擴(kuò)展組。一個(gè)啟動(dòng)配置模板是用來構(gòu)建新的instance,需要指定如下屬性:名稱、AMI、instance type,安全組,instance key pair。
Know what a scaling policy is and what use cases to use it for. A scaling policy is used by Auto Scaling with CloudWatch alarms to determine when your Auto Scaling group should scale out or scale in. Each CloudWatch alarm watches a single metric and sends messages to Auto Scaling when the metric breaches a threshold that you specify in your policy.
了解AS的策略及其應(yīng)用場景。一個(gè)伸縮策略結(jié)合CloudWatch警報(bào)來決定你什么時(shí)間來自動(dòng)的伸縮或者縮小擴(kuò)展組。每個(gè)CloudWatch alarm觀察一個(gè)單一的指標(biāo)來發(fā)送消息到AS,當(dāng)指標(biāo)值突破了策略中設(shè)定的閥值;
Understand how Elastic Load Balancing, amazon CloudWatch, and Auto Scaling are used together to provide dynamic scaling. Elastic Load Balancing, Amazon CloudWatch, and Auto Scaling can be used together to create a highly available application with a resilient architecture on AWS.
理解如何將ELB、CloudWatch和AS結(jié)合到一起來提供動(dòng)態(tài)的擴(kuò)展。他們可以在AWS上創(chuàng)建一個(gè)高可用的應(yīng)用架構(gòu);