CDN&DNS

CDN&DNS

DevOps CDN&DNS

Untitled

3693b95f250de356d9af95d8789e589.png

Untitled

CDN(Content Delivery Network) == AWS CloudFront:

  1. low latency: distributed content to a globally-distributed network of proxy servers/locations local server by caching, such as S3 static resources, which copies content from the original server.
  2. high availability:
    • avoid single point of failure: if one server node failed, all the services will be down.
    • avoid DDoS(Distributed Denial of Service) Attack
  3. The application needs to CDNify via file versioning. Otherwise, it needs time to update(数据延迟 )

so it can reduce bandwidth consumption, secure the original server

DNS(Domain Name System) == AWS Route 53:

The Domain Name System(DNS) is the hierarchical and decentralized naming system used to identify computers reachable through the Internet or other Internet Protocol networks.

(多级查询,最终返回目标 server 的 IP 地址)

DNS Host: 相当于本地的电话本,当我们访问一个新的域名,电脑会优先在自己的 host 中查找 domain name 所对应的 ip address。如果找不到,则会通过 DNS 去寻找 domain name 对应的 ip address

ps: 当我尝试在没有 certificate 状态下用 http 去连接,会报错图四,即仅支持 https

#澳洲 IT #DevOps #澳洲求职 #澳洲找工作 #程序员 #转码

高频面试题

structure.png

TLD (Top-Level Domain, 顶级域名)

SLD (Secondary-Level Domain, 二级域名)

经典面试题:当输入域名后,发生了什么?

  1. 浏览器查询浏览器的 DNS 缓存
  2. if not, 查询本地客户端(本地局域网/zone)host 文件的对应的 IP 地址
  3. if not, 查找运营商(root name server)提供的 DNS 服务器,是否有对应 DNS 缓存
  4. if not, 向根服务器查询,进行递归查找 (从顶级域名开始 e.g. .edu ⇒ washington ⇒… 一步步缩小范围,最终客户端取得 IP 地址)
  5. 获得 IP 地址后,进行 http/https 请求,客户端与服务器三次握手
  6. http 请求包包含 head, body。head 中包括对请求文件操作的信息,body 中包括 payload/data
  7. 服务器收到 http 请求后,进行负载平衡等后端流程
  8. server return head + response
  9. client(chrome) render data

DevOps DNS Record

Untitled

DNS 域名解析中添加的各项解析记录

  • A:将域名指向一个 IPv4 地址(例如:11.11.11.11)
  • CNAME:将域名指向一个域名,实现与被指向域名相同的访问效果,需要增加 CNAME 记录。这个域名一般是主机服务商提供的一个域名
  • MX 记录:建立电子邮箱服务,将指向邮件服务器地址。
  • NS 记录域名解析服务器记录,如果要将子域名 specific 某个域名服务器来解析
  • TXT 记录:optional。一般做一些验证记录,安全时会使用此项,如:做 SPF(反垃圾邮*件)记录
  • AAAA 记录:将主机名(或域名)指向一个 IPv6 地址(例如:ff03:0:0:0:0:0:0:c1)
  • SRV 记录:添加服务记录服务器服务记录时会添加此项,SRV 记录了哪台计算机提供了哪个服务。格式为:服务的名字.协议的类型(例如:_example-server._tcp)。
  • SOA 记录:SOA 叫做起始授权机构记录,NS 用于标识多台域名解析服务器,SOA 记录用于在众多 NS 记录中那一台是主服务器
  • PTR 记录:PTR 记录是 A 记录的逆向记录,又称做 IP 反查记录或指针记录,负责将 IP 反向解析为域名
  • 显性 URL 转发记录:将域名指向一个'http(s)'协议地址,访问域名时,自动跳转至目标地址。例如:将 heixuanfeng dot cn 显性转发到 likui dot com 后,访问 heixuanfeng dot cn 时,地址栏显示的地址为:likui dot com。
  • *隐性 UR 转发记录 L:**将域名指向一个'http(s)'协议地址,访问域名时,自动跳转至目标地址,隐性转发会隐藏真实的目标地址。例如:将 heixuanfeng dot cn 显性转发到 likui dot com 后,访问 heixuanfeng dot cn 时,地址栏显示的地址仍然是:heixuanfeng dot cn。

Zone: Zone is collection of nodes (sub domains) under the main domain. The server maintain a database called zone file for everyzone.

#澳洲 IT #DevOps #澳洲求职 #澳洲找工作 #程序员 #转码

CDN record: https://cloud.tencent.com/developer/article/1537894

AWS 文档:https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html

Route 53 Alias: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-choosing-alias-non-alias.html

;