Lecture 207: Routing Policy - Geolocation
- 课程:[NEW] AWS Certified Advanced Networking Specialty 2026
- 视频时长:04:15
- 来源:Udemy Lecture 28556419
- Slide 数量:7
- 画面切换:00:57、01:30、01:59、02:27、02:43、03:38
扫描说明
逐条读取了 Udemy 页面中的 101 条英文 Transcript cue,并按时间轴扫描全长约 04:15 的视频。依据 Geolocation 原理、Asia Record、US Record、Default Record、默认命中、India 验证与 Security Group 修复、US/Mexico 验证划分为 7 个小节。截图均在 Transcript 侧栏关闭、播放器控件隐藏后复核,统一为 1364×770。
Transcript 来自 Udemy 页面自带的英文自动字幕,没有使用 ASR。下面保留页面原文,包括其中的语法或识别错误。
1. Geolocation 按用户位置匹配 Continent、Country 或 US State
时间范围:00:00–00:57
总结 / Summary
中文
Geolocation 与 Latency-based 不同:它按 User 的实际 Location 匹配 Continent、Country,或更精细的 US State;规则重叠时采用最精确的 Match。应创建 Default Record 处理未匹配 Location。典型用例是 Website Localization、Content Restriction 与地域分流,记录也可关联 Health Check。
English
Geolocation differs from latency routing because it matches the user's actual location by continent, country, or more specifically a U.S. state. The most precise matching rule wins when rules overlap. A default record should handle unmatched locations. Uses include website localization, content restriction, and geographic distribution, and records can use health checks.
Transcript
00:00 So now let's talk about the Routing Policy-Geolocation,
00:02 which is very different from Latency-based.
00:04 So, this is based on where the user is actually located.
00:09 So, for example, you can say,
00:10 if a user comes from a specific continent,
00:12 or a country, or even more precise, on the U.S. states,
00:15 and, the most precise location is going to be selected
00:17 at first, then routed to this IP.
00:20 So, you should create a default record,
00:22 in case there's going to be no match on location,
00:24 and the use case for this is going to be
00:25 for website localization,
00:27 to restrict content distribution,
00:29 do load balancing, and so on.
00:30 And these type of records can be associated
00:32 with health checks.
00:33 So the idea is that, if we have a map of Europe,
00:34 with multiple countries, we can define a geolocation record
00:38 for Germany, to see the German users should go to this IP,
00:41 which contains my German version of my app.
00:43 And if I go to France, then go to this IP,
00:45 which contains a French version of my app.
00:47 But for anywhere else, go to the default IP here,
00:50 which contains maybe the English version of my app.
00:53 So, this is how you would use a geolocation.
00:55 Now, let's go practice in the console.
2. Asia Continent Record 指向 Singapore
时间范围:00:57–01:30
总结 / Summary
中文
创建 geo.stephanetheteacher.com A Record,Value 使用 ap-southeast-1 IP 54.251.92.166,Routing Policy 选 Geolocation,Location 选择 Asia,Record ID 为 Asia。这样所有被识别为亚洲 Location 且没有更精确覆盖规则的 Query 都返回 Singapore Endpoint。
English
Create geo.stephanetheteacher.com as an A record using the ap-southeast-1 address 54.251.92.166. Select Geolocation routing, location Asia, and record ID Asia. Queries identified as Asian and not covered by a more specific rule will return the Singapore endpoint.
Transcript
00:57 Okay, so, let's go ahead, and create our first geo record.
01:01 So, I'm going to create a record, and I'm gonna make geo,
01:04 and, the record type would be A, the value of it is,
01:08 let's link it first to the ap-southeast-1.
01:12 And, what we're going to do here is going to say,
01:13 the routing policy is going to be geolocation.
01:16 And we're saying, okay, all of Asia,
01:19 so, any user located in Asia,
01:20 should go to my ap-southeast-1 EC2 instance.
01:25 We could associate a health check with it if we wanted to,
01:27 we need to give a record ID, so, here we go.
3. United States Country Record 覆盖同名地域集合
时间范围:01:30–01:59
总结 / Summary
中文
为同一个 geo Hostname 再创建 us-east-1 Value 的 Geolocation Record,Location 选择 Countries → United States,Record ID 为 US。Geolocation Set 可以混合不同粒度,本例同时存在 Continent Asia 与 Country United States;未来若再加 US State 规则,State 会比 Country 更优先。
English
Add another geolocation record for the same geo hostname using the us-east-1 value. Select Countries → United States and record ID US. A geolocation set may mix granularities, as this example combines continent Asia with country United States; a future U.S. state rule would take precedence over the country rule.
Transcript
01:30 Now, let's add another two records.
01:33 So what I'm going to do is that, I'm going to say that's,
01:35 for
01:36 us-east-1.
01:39 I want to send any user from,
01:41 and, we can say geolocation yet again.
01:44 And let's say, for example, just a country,
01:46 so we can say, United States.
01:51 And, we could say lastly, so this is record ID, U.S.,
01:54 and so, as you can see here, I specified a country,
01:55 and here's specified a whole continent, it doesn't matter.
4. Default Record 指向 Frankfurt,接住所有未匹配 Location
时间范围:01:59–02:27
总结 / Summary
中文
第三条同名 A Record 使用 eu-central-1 IP 3.70.14.253,Location 选择 Default,Record ID 为 Default EU。任何既不匹配 Asia、也不匹配 United States 的 Query 都返回 Frankfurt;没有 Default 时,未匹配来源可能得不到 Answer,因此 Default 是完整地域策略的重要兜底。
English
The third same-name A record uses the eu-central-1 address 3.70.14.253, location Default, and record ID Default EU. Any query matching neither Asia nor the United States returns Frankfurt. Without a default, an unmatched source might receive no answer, so the default is an important fallback.
Transcript
01:59 And then lastly, we'll add one more record,
02:01 here's the record name,
02:03 and the value of which, is going to be eu-central-1.
02:06 And, this one is going to be my defaults,
02:09 so, I'm going to say, geolocation,
02:12 and the location is default,
02:13 that means that anything that doesn't match Asia
02:16 or United States, is going to go to my default location,
02:19 and this one is going to be called, Default EU.
02:23 Now, it's create these records,
02:25 and they've been successfully created.
5. 当前位置不在 US/Asia,首先命中 Default EU
时间范围:02:27–02:43
总结 / Summary
中文
讲师当前网络既不在 United States 也不在 Asia,访问 geo.stephanetheteacher.com 返回 eu-central-1c,验证 Default Rule 生效。Geolocation 的选择取决于 DNS Query 所推断的位置,并受 DNS Resolver 与 TTL Cache 影响;不是浏览器手动选择 Region。
English
The instructor's current network is in neither the United States nor Asia, so geo.stephanetheteacher.com returns eu-central-1c and validates the default rule. Geolocation selection depends on the location inferred for the DNS query and is affected by resolver behavior and TTL caching; the browser does not select a region manually.
Transcript
02:27 So, what I can do now is that I can test it, right?
02:30 So, currently, I am not in the U.S., and I'm not in Asia.
02:34 So, if I open this URL, I will get the eu-central-1 region,
02:38 so, this is good, that means that
02:39 this is the default record,
02:40 that is pure, that is working properly.
6. VPN 切到 India 后先 Timeout,修复 TCP/80 后命中 Singapore
时间范围:02:43–03:38
总结 / Summary
中文
VPN 切到 India 后,预期匹配 Asia 并返回 Singapore,但首次请求 Timeout。排查发现上一讲为 Health Check 实验删除了 Singapore Security Group 的 HTTP Rule;恢复允许 TCP/80 后,同一 geo Hostname 成功返回 ap-southeast-1b。这个插曲强调 DNS 选对 Endpoint 不代表 Network Path 一定可达。
English
After switching the VPN to India, the query should match Asia and return Singapore, but the first request times out. The previous health-check experiment had removed Singapore's HTTP security-group rule. Restoring TCP/80 makes the same geo hostname return ap-southeast-1b, emphasizing that correct DNS selection does not guarantee network reachability.
Transcript
02:43 So now, let's change geographic location, and to do so,
02:46 I'm going to use my VPN, and now let's go to an,
02:49 a country in Asia, so let's go to India.
02:51 So, I'm now connected into India.
02:54 And, when I refresh this page now,
02:56 what I expect is to get a Hello World,
02:57 from my ap-southeast-1 instance.
03:01 Oh, as you can see, there's a, a long load,
03:03 so, I know what's happening, so, this is a timeout,
03:06 and so, whenever you see a timeout in AWS,
03:08 usually you have to think about security groups.
03:10 So, if I go to my security group,
03:11 yes, I'm in the right region, so in the Singapore region,
03:14 and look at the Inbound rules, and edit them.
03:18 If you remember, I had removed that the HTTP rule
03:20 to make the health check fail,
03:22 so, we need to add back that HTTP rule,
03:25 so, let's add it back, and it's a good edit on your screen.
03:28 So, the HTTP rule has been added back,
03:30 and so now, if I go back into this page,
03:32 as we can see, now, we get the Hello World from
03:34 ap-southeast-1b, so, the Asia thing is working.
7. US 命中 us-east-1,Mexico 未匹配则回到 Default EU
时间范围:03:38–04:15
总结 / Summary
中文
VPN 切到 United States 后刷新,页面返回 us-east-1a,验证 Country Rule。再切到相邻但未配置的 Mexico,结果返回 eu-central-1c,因为 Mexico 不属于 United States Country Rule,也不属于 Asia Continent Rule,最终由 Default EU 兜底。这清晰展示了精确匹配与 Default 的组合行为。
English
Switching the VPN to the United States makes the page return us-east-1a, validating the country rule. Switching next to neighboring Mexico returns eu-central-1c because Mexico matches neither the United States rule nor Asia, so Default EU catches it. This clearly demonstrates precise matching combined with a default.
Transcript
03:38 Now, if I go to a country in the U.S.,
03:40 if I go to the United States, overall,
03:45 and, I'm in the U.S.,
03:46 and refresh, I'm going to get Hello World from us-east-1a,
03:49 so, this is perfect.
03:50 And, if I go to something right next to the U.S.,
03:52 but not in the U.S., for example, if I go to Mexico.
03:57 And refresh, as you can see, I get my eu-central-1c,
04:02 because this is my default record,
04:03 and, the Mexico was not specified as a rule
04:06 in the geolocation Route 53 record.
04:09 Okay, so this is it, this is working perfectly.
04:12 I hope you like this lecture,
04:13 and I will see you in the next lecture.
整讲总结 / Overall Summary
中文
Geolocation Routing 按 Continent、Country、US State 等位置规则回答 DNS,重叠时最精确规则优先,并应配置 Default 兜底。演示将 Asia 指向 Singapore、United States 指向 N. Virginia、其他位置指向 Frankfurt;India、US、Mexico 三次 VPN 验证分别命中 Asia、US 与 Default,同时暴露 DNS 正确但 Security Group 仍可阻断访问。
English
Geolocation routing answers DNS by continent, country, or U.S. state, prefers the most specific overlapping rule, and should include a default. The demo maps Asia to Singapore, the United States to Northern Virginia, and all other locations to Frankfurt. VPN tests from India, the U.S., and Mexico hit Asia, U.S., and default rules respectively, while also showing that a security group can still block an endpoint selected correctly by DNS.
返回顶部 ↑