Transcript CDN

Content Delivery Network과 DNS
왜 CDN인가?
• Contents server를
customer에 가까운 위
치에 둔다.
local
content
server
– 적은 홉(hop)수
• 이점
– 데이터를 가져오는 시간
을 줄인다.
– TCP의 성능을 높인다.
– 망 대역을 효율적으로 사
용한다.
– DDOS 공격에 대한 보호
original
content
server
Global CDN
• 인터넷 생태계
– CP(content provider)
– 망 사업자(ISP 포함)
– CDN
• 여러 global CDN 업체들이 경쟁
• 많은 web service 업체들은 CDN을 통해 서비스 제공
CDN의 과제
• 어떻게 local content server는 original
content server와 동일한 데이터를 갖도록
할 것인가?(cache synchronization)
– Static contents와 dynamic contents
• 어떻게 customer에게 optimal(local)
content server의 IP 주소를 알려 줄 것인
가?
DNS: Root name servers
• DNS 계층의 최상위에 위치하여 local DNS 서버에게 TLD 도메인 서버
의 주소를 알려 준다.
a Verisign, Dulles, VA
c Cogent, Herndon, VA (also LA)
d U Maryland College Park, MD
g US DoD Vienna, VA
h ARL Aberdeen, MD
j Verisign, ( 21 locations)
e NASA Mt View, CA
f Internet Software C. Palo Alto,
k RIPE London (also 16 other locations)
i Autonomica, Stockholm (plus
28 other locations)
m WIDE Tokyo (also Seoul,
Paris, SF)
CA (and 36 other locations)
13 root name
servers worldwide
b USC-ISI Marina del Rey, CA
l ICANN Los Angeles, CA
5
TLD and Authoritative Servers
• Top-level domain (TLD) servers:
– com, org, net, edu 등, 그리고 kr, jp, uk와 같
은 top-level 국가 도메인을 담당하는 서버
• 예를 들면 com TLD 서버는 com 도메인의 서버
주소를 갖고 있다.
• authorative DNS servers:
– 특정 기관의 DNS 서버로서 그 기관의 네트워
크에 접속된 모든 호스트들의 주소를 갖고 있
다.
6
DNS 서비스의 예
root DNS server
• 호스트(cis.poly.edu)가 호스
트(gaia.cs.umass.edu)의 IP
주소를 찾을 때,
– 1과 2: cis.poly.edu의 local
network에 있는 도메인 서버
(dns.poly.edu)는 root 도메인
서버에 묻는다.
– 3: root 서버는 edu 도메인 서
버의 주소를 알려준다.
– 4: edu 도메인(TLD)의 서버에
묻는다.
– 5: edu 도메인 서버는
cs.umass.edu 도메인 서버의
주소를 알려준다.
– 6과 7: cs.umass.edu 도메인
서버에 물어서 최종적으로
gaia.cs.umass.edu의 주소를
받는다.
2
3
TLD DNS server
4
5
local DNS server
dns.poly.edu
1
8
requesting host
7
6
authoritative DNS server
dns.cs.umass.edu
cis.poly.edu
gaia.cs.umass.edu
DNS records
DNS 서버는 다음과 같은 resource records (RR)를 data base로 갖고 있다.
RR format: (name, value, type, ttl)
 Type=A


Name: hostname
Value: IP address
• Type=NS
 Type=CNAME


Name: “canonical” (the real)
name의 또 다른 이름
Value: canonical name
– Name: domain (e.g.
foo.com)
– Value: 이 도메인의
authoritative name server  Type=MX
 Value: name과 연관된 메일
의 IP 주소
서버의 이름
8
DNS 메시지(1)
DNS protocol : query 와 reply 메시지, 동일한 message format 사용
메시지 헤더
 identification: 16 bit # for
query, reply to query uses
same #
 flags:
 query or reply
 recursion desired
 recursion available
 reply is authoritative
9
DNS 메시지(2)
Name, type fields
for a query
RRs in response
to query
records for
authoritative servers
additional “helpful”
info that may be used
10
CDN의 DNS 예(1)
1. 사용자는 www.example.com을 입력
2. DNS 서버는 optical Akamai 서버의 IP
주소를 리턴
3. Brower는 HTML을 요청
4. Akamai 서버는 요청한 content를 구성
5. Akamai 서버는 Akamized HTML을 리턴
6. Browser는 content 내 object를 다운로드
하는데 최적의 Akamai 서버의 IP 주소
를 얻음
7. 최적의 Akamai 서버로부터 object 다운
로드
CDN의 DNS 예(2)
CDN 트래픽 비교
Inbound : original web server에서부터 Akamai 서버로 가는 트래픽
Outbound: Akamai 서버로부터 사용자로 가는 트래픽