AWS · Advanced Networking Specialty

网络课程笔记

Lecture 177 · 8 张幻灯片

幻灯片、双语总结及 Transcript · 图片已内嵌,可离线阅读。

原文默认收起
lecture-177.md

Lecture 177: ELB Overview

  • 课程:[NEW] AWS Certified Advanced Networking Specialty 2026
  • 视频时长:06:15
  • 来源:Udemy Lecture 28555953
  • Slide 数量:8
  • 画面切换:01:14、01:54、02:25、02:50、03:44、04:41、05:00

扫描说明

逐条读取了 Udemy 页面中的 156 条英文 Transcript cue,并按时间轴扫描全长约 06:15 的视频。依据 Load Balancing 概念、使用原因、Managed ELB、AWS Integration、Health Check、四种 Load Balancer、Internal/External 以及 Security Group Chain 划分为 8 个小节。截图均在课程侧栏关闭、播放器控件隐藏后截取,统一为 1364×770。

Transcript 来自 Udemy 页面自带的英文自动字幕,没有使用 ASR。下面保留页面原文,包括其中的语法或识别错误。

1. Load Balancing 的核心工作方式

时间范围:00:00–01:14

Elastic Load Balancer distributing users across three EC2 instances

总结 / Summary

中文

Load Balancer 位于用户与多台 EC2 Instance 之间,为应用提供一个统一入口,并把请求分摊到多个 Backend。这样用户只需连接同一个 ELB Endpoint,而不必知道每台服务器的地址。

English

A load balancer sits between users and multiple EC2 instances, exposes one application entry point, and distributes requests across the backends. Users connect to a single ELB endpoint without needing to know each server address.

Transcript

00:00 Now let's learn about load balancing.

00:02 And a question you may have is what is load balancing?

00:04 Well, a load balancer is going to be a server

00:08 or a set of servers that will forward traffic

00:10 that is received to multiple backend

00:13 or downstream EC2 instances or servers.

00:16 So the idea is that for example,

00:18 we have three EC2 instances

00:20 and they're going to be

00:21 fronted by an elastic load balancer,

00:24 which is a set of servers behind the scenes.

00:26 Now, what happens when you have, for example,

00:28 three users directly connecting into

00:30 your elastic load balancer?

00:32 Well, the first one is going to have its

00:34 load being sent in one backend EC2 instance

00:38 and because there's load balancing well,

00:40 if another user is connecting to your elastic load balancer,

00:43 then it will be sent to another EC2 instance.

00:46 And then finally,

00:48 while if a third user is connecting to

00:49 your elastic load balancer,

00:51 that user will again be load balance

00:53 and sense to the third EC2 instance.

00:55 So the idea is that the more users you have,

00:57 the more the load is going to be balanced across

00:59 EC2 instances.

01:01 But the idea is that your users do not know

01:04 which backend instances they're connected to.

01:06 They just know that they have to connect to your

01:09 elastic load balancer,

01:10 which gives them one end point of connectivity only.

2. 为什么需要 Load Balancer

时间范围:01:14–01:54

Benefits of using a load balancer

总结 / Summary

中文

Load Balancer 能把流量均匀分散到多台服务器,通过单一 DNS Endpoint 简化客户端访问,并自动避开故障实例。它还支持 Health Check、SSL Termination、Cookie Stickiness、跨 AZ High Availability,以及区分 Public 与 Private Traffic。

English

A load balancer spreads traffic across servers, gives clients one DNS endpoint, and automatically avoids failed instances. It also supports health checks, SSL termination, cookie stickiness, multi-AZ high availability, and separation of public and private traffic.

Transcript

01:14 Now,

01:14 why should you use a load balancer

01:15 where you spread the load across

01:17 multiple downstream instances,

01:19 you're going to expose a single point of access

01:21 to your applications as I just said.

01:23 You're going to seamlessly handle failures

01:25 of downstream instances

01:26 because the load balancer will have

01:28 some health check mechanisms

01:29 and can understand to which instances

01:31 and cannot send traffic to.

01:34 You can do health checks on your instances.

01:36 You can provide SSL termination.

01:38 So if you have HTTPS encrypted traffic for you websites,

01:42 you can enforce stickiness with cookies,

01:44 high availability across zones

01:45 and separate public traffic,

01:47 from private traffic on your cloud.

01:50 And we'll explore these concepts obviously in a deeper dive.

3. AWS 托管的 Elastic Load Balancer

时间范围:01:54–02:25

Reasons to use an AWS-managed Elastic Load Balancer

总结 / Summary

中文

ELB 是 AWS Managed Service,AWS 负责 Availability、Upgrade 与 Maintenance。虽然配置旋钮比自建 Load Balancer 少,但它通常更容易运维、成本更低,并可避免自己扩缩、修补和维护高可用负载均衡集群。

English

ELB is an AWS-managed service, so AWS handles availability, upgrades, and maintenance. Although it offers fewer low-level controls than a self-managed balancer, it is usually easier and cheaper to operate and avoids the burden of scaling, patching, and maintaining a highly available cluster.

Transcript

01:54 So the elastic load balancer is a managed load balancer

01:59 as such.

01:59 AWS will be managing it,

02:01 and we'll guarantees that it will be working no matter what.

02:03 AWS we'll take care of upgrades, maintenance

02:06 and high availability.

02:07 And it will provide you a few configuration knobs to tweak

02:11 the behavior of the load balancer.

02:14 The idea is that using an elastic load balancer is a

02:16 no-brainer

02:17 because it will cost you less

02:18 than setting up your own load balancer.

02:20 And also if you had to manage your own load balancer,

02:22 it will be a nightmare from a scalability perspective.

4. ELB 与其他 AWS 服务的集成

时间范围:02:25–02:50

Elastic Load Balancer integrations with AWS services

总结 / Summary

中文

ELB 可与 EC2、Auto Scaling Group、ECS、ACM、CloudWatch、Route 53、WAF 和 Global Accelerator 集成。因此它不仅负责转发流量,也能参与证书管理、监控、DNS、安全防护和全球流量入口。

English

ELB integrates with EC2, Auto Scaling Groups, ECS, ACM, CloudWatch, Route 53, WAF, and Global Accelerator. It therefore participates not only in traffic forwarding but also certificate management, monitoring, DNS, security protection, and global traffic entry.

Transcript

02:25 So also the load balancer is integrated with so many AWS

02:30 offerings and services.

02:31 The idea is that it can be integrated with of course,

02:34 EC2 instances,

02:35 but also we'll see later on with the scaling groups,

02:37 Amazon ECS, Certificate Manager, CloudWatch, Route 53,

02:42 WAF Global Accelerator, and most likely more over time.

02:46 So the idea is that the load balancer is a no-brainer

02:48 when it comes to load balancing on AWS.

5. Health Check 与故障摘除

时间范围:02:50–03:44

Load balancer health check against an EC2 endpoint

总结 / Summary

中文

Load Balancer 按配置的 Protocol、Port 与 Path 定期探测 Backend,例如向 Port 4567 的 /health 发出 HTTP 请求。返回 200 OK 代表健康;连续失败的实例会被从可接收流量的目标中摘除,直到恢复健康。

English

The load balancer periodically probes each backend using a configured protocol, port, and path—for example, an HTTP request to /health on port 4567. A 200 OK response indicates health; repeatedly failing instances are removed from traffic until they recover.

Transcript

02:50 Now I mentioned health checks.

02:52 So health checks is a way for your elastic load balancer

02:55 to verify whether or not an EC2 instance

02:58 is properly working,

02:59 because if it's not working properly,

03:01 then we don't want to send any traffic to that instance.

03:04 So they're crucial for load balancers

03:06 and they are done by using

03:10 a port and a routes to check the health button.

03:14 So for example, in this example,

03:15 I have the protocol being HDP,

03:17 the port being 4567

03:20 and the end points to be slash health

03:22 because maybe this route is an easy way

03:24 from an application perspective to

03:25 check the health of my application.

03:28 And if the EC2 instance does not respond

03:31 with an okay response,

03:32 which is usually the 200 status code of HDP,

03:35 then the instance will be marked as unhealthy.

03:37 And the elastic load balancer will not send traffic

03:41 to that instance.

03:43 Okay,

6. 四种 AWS Load Balancer

时间范围:03:44–04:41

Comparison of Classic, Application, Network, and Gateway Load Balancers

总结 / Summary

中文

AWS 提供四种 Load Balancer:Classic Load Balancer(2009,HTTP/HTTPS/TCP/SSL,旧版)、Application Load Balancer(2016,HTTP/HTTPS/WebSocket)、Network Load Balancer(2017,TCP/TLS/UDP 等)以及 Gateway Load Balancer(2020,Layer 3 IP)。新部署通常优先选择 ALB、NLB 或 GWLB。

English

AWS offers four load balancer types: Classic Load Balancer (2009, HTTP/HTTPS/TCP/SSL, legacy), Application Load Balancer (2016, HTTP/HTTPS/WebSocket), Network Load Balancer (2017, TCP/TLS/UDP and related protocols), and Gateway Load Balancer (2020, Layer 3 IP). New deployments generally prefer ALB, NLB, or GWLB.

Transcript

03:44 so now you have four kinds of managed load balancers on AWS.

03:49 You have the classic load balancer,

03:50 which are called older generation or V1, which is from 2009,

03:54 and it's called CLB.

03:56 Now, it's compatible with HTTP, HTTPS, TCP, SSL,

04:01 or security CP.

04:03 And overall AWS not want you to use

04:05 that load balancer anymore.

04:07 So it is going to be shown as deprecated within the console,

04:10 but still available to use.

04:12 Then we have newer generations load balancer.

04:14 So we have the application load balancer

04:15 from 2016 or so-called ALB.

04:19 And this one supports HTTP, HTTPS and web socket protocol.

04:23 Then we have the network load balancer from 2017,

04:27 which supports the TCP, TLS, security CP and UDP protocols.

04:32 And then finally we have the gateway load balancer from 2020

04:36 GWLB, which operates at the network layer,

04:39 so there are three and the IP protocol.

7. Internal 与 Internet-facing Load Balancer

时间范围:04:41–05:00

Internal and external load balancer deployment modes

总结 / Summary

中文

Load Balancer 可以是 Internal,也可以是 Internet-facing。Internal Load Balancer 使用 Private IP 服务 VPC 内部流量;Internet-facing Load Balancer 面向公网用户,并把流量转发到受保护的 Backend。

English

A load balancer can be internal or internet-facing. An internal load balancer uses private IP addressing for traffic inside the VPC, while an internet-facing load balancer accepts public users and forwards traffic to protected backends.

Transcript

04:41 So overall it is definitely recommended for you to use

04:45 the newer generation load balancers

04:46 as they provide more features.

04:48 And some load balancers can be set up as internal,

04:51 so private and private access for the network

04:55 or external public load balancers,

04:57 for example, for your websites and public applications.

8. 用 Security Group 建立最小权限流量链

时间范围:05:00–06:15

Security group chain from public users through a load balancer to EC2

总结 / Summary

中文

Internet-facing Load Balancer 的 Security Group 可允许 0.0.0.0/0 访问 80 或 443;EC2 Security Group 则只允许来源为 Load Balancer Security Group 的 Port 80 流量。这样 Backend 不直接接受任意公网请求,所有应用流量都必须先经过 ELB。

English

The security group of an internet-facing load balancer can allow 0.0.0.0/0 on ports 80 or 443, while the EC2 security group allows port 80 only from the load balancer security group. This prevents the backend from accepting arbitrary internet traffic and forces application requests through ELB.

Transcript

05:00 Finally, you need to understand the security

05:03 around the load balancers.

05:04 So the users can access your load balancer from anywhere

05:08 using HTTP or HTTPS.

05:10 And therefore the security group rule is going to look like

05:13 something like this,

05:14 where the port range is going to be 80 or 443.

05:17 And the source is going to be 0.0.0.0/0,

05:20 which means anywhere.

05:21 And so we allow the users to connect to our load balancer,

05:24 but then the cool thing is that EC2 instances

05:27 should only allow traffic coming directly

05:29 from the load balancer.

05:31 And therefore the security group rule of your EC2 instances

05:35 is going to look a little bit different.

05:37 So it's going to allow HTTP traffic on port 80

05:40 and the source of it is not going to be an IP range

05:43 is going to be a security group.

05:45 So we're going to link the security group

05:47 of the EC2 instance,

05:49 to the security group of the load balancer.

05:51 And effectively what this will do is that it will say

05:53 that the EC2 instance is only allowing traffic

05:56 if the traffic originates from the load balancer,

06:00 which is an enhanced security mechanism.

06:03 So that's, it's for the overview of load balancers.

06:05 I hope you liked it.

06:06 And obviously in this section,

06:07 we're going to discuss a lot more around

06:09 classic application load balancers

06:11 and network load balancers

06:12 So I will see you in the next lecture.

整讲总结 / Overall Summary

中文

ELB 以单一托管入口把请求分摊到多个健康 Backend,并提供 Health Check、SSL Termination、Stickiness、跨 AZ 高可用及多项 AWS Service Integration。考试需要区分 CLB、ALB、NLB、GWLB 的定位,理解 Internal 与 Internet-facing 模式,并掌握 Security Group Chain:公网只进入 Load Balancer,EC2 仅信任 Load Balancer Security Group。

English

ELB provides one managed entry point that distributes requests across healthy backends and supports health checks, SSL termination, stickiness, multi-AZ high availability, and broad AWS service integrations. For the exam, distinguish CLB, ALB, NLB, and GWLB, understand internal versus internet-facing deployment, and apply the security-group chain in which the internet reaches only the load balancer and EC2 trusts only the load balancer security group.

返回顶部 ↑