AWS · Advanced Networking Specialty

网络课程笔记

Lecture 181 · 3 张幻灯片

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

原文默认收起
lecture-181.md

Lecture 181: Connection Idle Timeout

  • 课程:[NEW] AWS Certified Advanced Networking Specialty 2026
  • 视频时长:01:35
  • 来源:Udemy Lecture 28555975
  • Slide 数量:3
  • 画面切换:00:47、01:06

扫描说明

逐条读取了 Udemy 页面中的 36 条英文 Transcript cue,并按时间轴扫描全长约 01:35 的视频。依据双连接 Idle Timeout、CLB/ALB/NLB 默认值与可配置性、File Upload 与 HTTP Keep-alive 实践划分为 3 个小节。截图均在 Transcript 侧栏关闭、播放器控件隐藏后复核,统一为 1364×770。

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

1. Idle Timeout 同时作用于两段连接

时间范围:00:00–00:47

Connection idle timeout on client-to-ELB and ELB-to-target connections

总结 / Summary

中文

ELB 实际维护 Client-to-ELB 与 ELB-to-Target 两段独立连接,Idle Timeout 分别作用于两段。以 ALB 默认 60 秒为例,只要某段连接在整个周期内没有收发任何 Data 就会关闭;在超时前哪怕传输 1 Byte,也会重置计时并保持连接。

English

ELB maintains two independent connections, client-to-ELB and ELB-to-target, and idle timeout applies to each. With the ALB default of 60 seconds, either connection closes when no data is sent or received for the full period. Sending even one byte before expiration resets the timer and keeps the connection open.

Transcript

00:00 Now, we're going to discuss all the settings related

00:02 to the load balancers, and the first one is going to be

00:06 the connection idle timeouts.

00:08 So, this is a timeout that happens in two places.

00:11 The first one is between the clients and the ELB,

00:15 and the second one is between the ELB and the targets.

00:18 So, the connection will be closed for the ALB for example.

00:22 If no data has been sent

00:24 between the clients and the ALB for 60 seconds.

00:27 And same, it will be closed if no data

00:30 is being sent between the ALB

00:32 and the EC2 Instance for 60 seconds.

00:35 If data is being sent, obviously,

00:37 maybe just as little as one bites,

00:39 then the connection will be kept open.

00:41 And this may be more efficient,

00:42 especially on the ALB to the EC2 Instance side,

00:45 because connections can be then reused.

2. CLB、ALB 与 NLB 的 Timeout 差异

时间范围:00:47–01:06

Configurable and fixed idle timeout values for CLB, ALB, and NLB

总结 / Summary

中文

Idle Timeout 适用于 CLB、ALB 与 NLB。CLB 和 ALB 可配置,课程给出的 Default 是 60 秒;NLB 不可配置,TCP Connection 固定 350 秒,UDP Connection 固定 120 秒。

English

Idle timeout applies to CLB, ALB, and NLB. It is configurable for CLB and ALB, with a course-stated default of 60 seconds. NLB values are not configurable: 350 seconds for TCP connections and 120 seconds for UDP connections.

Transcript

00:47 So this setting applies to the CLB, the ALB and the NLB

00:52 And it can be configured for the CLB and the ALB.

00:55 By default it is 60 seconds,

00:57 it cannot be configured for the NLB.

00:59 It's going to be 350 seconds for the TCP connections

01:02 and 120 seconds for the UDP connections.

3. 避免 File Upload Timeout 并启用 HTTP Keep-alive

时间范围:01:06–01:35

File upload and HTTP keep-alive recommendations for ELB connections

总结 / Summary

中文

长时间 File Upload 等场景需要调整可配置的 Idle Timeout,或确保连接持续发送少量数据,避免被判定为空闲。EC2 Web Server 还应启用 HTTP Keep-alive,使 ALB 能复用 Backend Connection,降低重复建连开销并避免 Idle Timeout。

English

Long file uploads may require a larger configurable idle timeout or periodic data transmission so the connection is not considered idle. Enable HTTP keep-alive on EC2 web servers so the ALB can reuse backend connections, reduce repeated connection setup, and avoid idle timeout.

Transcript

01:06 So you would tweak that setting the connection idle timeout

01:09 for when you have, for example,

01:11 file uploads and you want to avoid at timeouts.

01:14 You need to make sure that some data that

01:15 is always being sent in your connection.

01:17 So also it is very recommended to enable

01:19 the HTTP keep-alive setting

01:21 for your web server of your EC2 Instances.

01:24 Which makes the EC2 Instance keep the connection alive

01:27 to the ALB and not hit that connection idle time out.

01:32 So that's it for this short lecture.

01:33 I hope you liked it and I will see you in the next lecture.

整讲总结 / Overall Summary

中文

Connection Idle Timeout 分别控制 Client-to-ELB 与 ELB-to-Target 连接;一个周期内无数据即关闭,有少量数据就会续期。CLB/ALB 可配置且默认 60 秒,NLB 固定为 TCP 350 秒、UDP 120 秒。长上传要合理设置 Timeout 或持续传输数据,并在 EC2 Web Server 启用 HTTP Keep-alive 以复用 Backend Connection。

English

Connection idle timeout independently governs client-to-ELB and ELB-to-target connections. No data during the period closes a connection, while a small transmission renews it. CLB/ALB are configurable with a 60-second default, while NLB is fixed at 350 seconds for TCP and 120 seconds for UDP. Long uploads need an appropriate timeout or ongoing data, and EC2 web servers should enable HTTP keep-alive for backend connection reuse.

返回顶部 ↑