bolts and nuts of web cdn · 2013-07-01 · internet korea uk us japan edge pop 3g/lte user in...
TRANSCRIPT
CopyrightⓒCDNetworks. All rights reserved. Page 2
How CDNs work?
LDNS
site.com’s authoritative DNS
CDN DNS Director
CDN Optimal Cache
“Here is the image you requested” ⑧
①
②
③
④
⑤ ⑥
⑦
To fetch objects from ‘img.site.com’, below flows will happen in CDN architecture.
CopyrightⓒCDNetworks. All rights reserved. Page 3
How a Caching CDN works
A Content Delivery Network (CDN) is… • A network of high speed servers, distributed through multiple
datacenters • A series of DNS-based load balancers that can intelligently route
requests to the servers most able to serve them quickly • A balanced network architecture of carefully selected peering
partners and optimized routes • Specialized software that retrieves, stores, and delivers content
requested from the CDN
CopyrightⓒCDNetworks. All rights reserved. Page 4
Terminology
• DNS : Local DNS, Authoritative DNS, GSLB(Global Server Load Balancer)
• Cache : Reverse Cache, Transparent Cache
• Contents : static, dynamic object
• Origin, Shield, Edge
• Pop, Node, Master node
• Unicast, Anycast
• Transit, Peering
• RTT(Round Trip Time), Bandwidth, Mbps, Gbps, GBytes, Transfer-Bytes
CopyrightⓒCDNetworks. All rights reserved. Page 5
CDN Basic
Internet
Korea
UK US
Japan
Edge POP
3G/LTE
User in London
User in LA
Caching Origin Contents
without middle mile connection
User in Tokyo
Web Site (오리진)
Last Mile Middle Mile
First Mile
Reducing Origin traffic
and load
Edge POP
Edge POP
CopyrightⓒCDNetworks. All rights reserved. Page 6
CDN services
Basic CDN Service • Push Type (HTTP, FTP)
• Pull Type (HTTP/S Caching)
• Legacy Streaming (WMS(MMS/RTSP), FMS(RTMP), RTSP) − On Demand and Live
• HTTP Streaming (Apple, Microsoft, Adobe, MPEG DASH) − On Demand and Live
• Portals (Statistics, Control Panel)
Value-Added • SSL (consumes IP per certificates)
• Storage (backup and geo distributed)
• One-time URL (access control)
• Content Protection (DRM)
• Complex rule set for caching
• Access Log Delivery
• Advanced Analytics
CopyrightⓒCDNetworks. All rights reserved. Page 7
Delivery Type
Internet
Delivery
Upload Contents and Push
Contents are preloaded
before delivery
Push Type
Internet
Delivery
Upload Contents
Contents are cached on demand
Edge Server
Edge Cache
Pull Type (Caching)
CopyrightⓒCDNetworks. All rights reserved. Page 8
Type of Contents
Static Contents
• “Cacheable”
• Not related to MIME-type or URL
• Defined by HTTP header : Last-Modified, Etag, Cache-Control, …
• Storable on proxy cache or browser
Dynamic Contents
• “Application”
• “Non-Cacheable” : MISS in proxy cache
• Large TTFB or Transfer time depends on origin server
• Not storable on transfer
• Typically with Cookie
CopyrightⓒCDNetworks. All rights reserved. Page 9
Dynamic Contents
Internet Last-mile
Optimization
Origin Generates Contents every time.
Bypass Caching
Edge Cache
Shield Cache
First Mile
Bypass Caching
TCP Optimization Connection Pooling
Compression, …
CopyrightⓒCDNetworks. All rights reserved. Page 10
GSLB : DNS direction
GSLB
IDC A
End User
LDNS A
LDNS B
End User
4
3 2
1
1
3
4
1. Health Check IDC 장비에 대한 상태를 측정하여 GSLB에 Health Check 결과를 전달한다. 2. 성능 측정 LDNS와의 RTT를 측정하여 GSLB에 전달한다.
Probe 기능
GLSB
2
Probe
IDC B
Probe
End User는 LDNS에 서비스 도메인을 질의한다. LDNS는 서비스 도메인에 대한 정보가 없으면 GSLB에 질의한다. GSLB에서는 LB정책에 따라 IP를 응답한다. End User는 응답받은 IP로 접속하게 된다.
GSLB Flow
4
3
2
1
CopyrightⓒCDNetworks. All rights reserved. Page 11
Domain delegation / balancing
• GSLB DNS Answer section [jongchankim@MBP ~]$ dig www.kr.cdnetworks.com
;; ANSWER SECTION:
www.kr.cdnetworks.com. 300 IN CNAME www.kr.cdnetworks.com.cdngc.net.
www.kr.cdnetworks.com.cdngc.net. 20 IN A 14.0.68.221
www.kr.cdnetworks.com.cdngc.net. 20 IN A 14.0.68.215
Resolver /
Local DNS
DNS for cdngc.net (GSLB)
End-user
Browser
• GSLB는 사용자에게 가장 가까운 최적의 서버를 찾아줌 • Local DNS의 IP, AS, Country • CDN Pop과 Local DNS간의 latency • CDN edge의 부하정보 • 추가적인 weight, 규칙(cost) 적용
• Query latency를 줄이기 위해 Anycast DNS 도입 • GSLB에 로드밸런싱 위임을 위해 CNAME 사용
CopyrightⓒCDNetworks. All rights reserved. Page 12
GSLB : HTTP redirection
Internet
Origin Contents
Contents are cached on demand
Edge Cache
GSLB (HTTP)
2. GET again
• Client IP based 가능 • More accurate but 2x delay with HTTP • 추가적인 redirection rule 적용 (content hit, location, …)
CopyrightⓒCDNetworks. All rights reserved. Page 13
Anycast GSLB
ANYCAST GSLB (10.10.10.10)
ISP1
ISP2
ISP3
ISP4
ISPs
ANYCAST GSLB (10.10.10.10)
ANYCAST GSLB (10.10.10.10)
ANYCAST GSLB (10.10.10.10)
BGP session
LDNS
LDNS
LDNS
LDNS
DNS query
• All GSLBs have same IP address in anycast network with unicast IP for managing purpose • BGP routing ensures to connect nearest GSLB within ISP networks • Preferential BGP announcement needed
CopyrightⓒCDNetworks. All rights reserved. Page 14
Anycast GSLB
ANYCAST GSLB (10.10.10.10)
ISP1
ISP3
ISP4
ISPs
ANYCAST GSLB (10.10.10.10)
ANYCAST GSLB (10.10.10.10)
ANYCAST GSLB (10.10.10.10)
BGP session
LDNS
LDNS
LDNS
LDNS
DNS query
② BGP shutdown
① gslb Fail
③ rerouted to another GSLB ISP2
• Failover in Anycast network
CopyrightⓒCDNetworks. All rights reserved. Page 15
Content Sync.
Client S/W for content Sync. Upload Zone
Upload
Upload VOD Storage
IDC 1
NAS Storage
Media Platform
End User PC
Delivery
Mgmt. Server DB
Sync. Info/configuration
Sync. Data
IDC 2
NAS Storage
Media Platform
Client S/W를 이용하여 CDN업로드 서버로 전송 업로드서버는 미리 정의된 동기화 규칙에 따라 동기화 진행 동기화의 완료여부에 따라 Client S/W를 통한 정보 업데이트 고객은 동기화 확인후 웹링크
Synchronization Flow
4
3
2
1
CopyrightⓒCDNetworks. All rights reserved. Page 16
Reverse Cache
Reverse Cache
특정 서버 팜에 앞 단에 위치하며 때로는 웹 가속기라고도 한다.
캐시 서버의 위치상 Proxy 캐시와 반대의 형태, 웹 캐싱을 이용한 서버 부하 감소와 응답속도 및 성능향상
Client는 웹 접속 시 IE에 별도의 설정이 필요 없으며, Origin 서버의 트래픽 부하를 줄여주는 장점
CDN 서비스에서는 대부분 Reverse Cache로 설정
CopyrightⓒCDNetworks. All rights reserved. Page 17
Transparent Cache
Transparent Cache
Proxy Cache의 발전된 형태로 WCCP/Layer4 스위치 등을 활용하여 웹 요청을 Cache로 전달한다.
클라이언트 웹 브라우저에서 Proxy 설정이 필요하지 않다.
일반적으로 Cache 서버는 Client IP 주소를 캐시 서버 자신의 IP 주소로 변경하여 Origin 서버로 요청한다.
Transparent Cache는 Client IP 주소를 클라이언트/서버에 투명하게 서비스하는 옵션을 제공한다.
CopyrightⓒCDNetworks. All rights reserved. Page 18
Detail CDN features
기능 설명 기대효과
Connection Pooling and HTTP Keep Alive
• 고객 서버와 CDN Edge 간 일정량의 커넥션 유지하고 재사용 / 시간 최소화 • 사용자와 고객사 캐시 서버 사이에서만 TCP 3 way handshaking
• 응답속도 개선
• 오리진 서버 부하 경감
Origin Cloaking • 고객 오리진 서버는 최종 사용자로부터의 모든 트래픽을 블록하고 오직 CDN
과 연동되는 서버로만 연결 • 서비스 연속성 개선
(외부 공격 방어)
Origin Failover
• 고객 오리진 서버 장애 시 일관된 서비스 가능) 고객사 캐시 서버에 보관되어 있는 디폴트 페이지를 전송 Origin 백업 서버로 재 캐시 요청 Failover 실패 시 502/503 에러 메시지 전송
• 서비스 연속성 개선
Active Compression (Gzip Compression)
• 콘텐츠를 압축해서 콘텐츠 용량과 HTTP request 부하를 감소 • 콘텐츠 타입과 크기 별, 웹 브라우저 HTTP 버전별로 압축하는 능동적 압축 정
책 설정 가능 (압축 효율은 콘텐츠 크기에 따라 결정됨)
• 응답속도 개선
• 오리진 서버 부하 경감
302 Rewriting • 고객 오리진 서버의 페이지 에러 시 최종 사용자에게 에러 페이지 전송 안함 • CDN edge 서버가 다른 고객 서버로 요청을 다시 보낸 후, 정상 페이지가 전
송되면 이를 최종 사용자에게 전송 • 서비스 연속성 개선
Content Variation • 캐시 서버가 최종 사용자 리퀘스트 속성에 기반하여 별도의 콘텐츠를 전송 • 예) Internet Explorer 에는 콘텐츠 1 전송, Firefox 에는 콘텐츠 2 전송
• 사용자 만족도 개선 (맞춤형 서비스)
Multi byte range support
• PDF 파일을 캐시하여 전달하는 데 유용한 기능 • PDF 전송 퍼포먼스 개선
CopyrightⓒCDNetworks. All rights reserved. Page 19
Detail CDN features
기능 설명 기대효과
SSL Offload • 고객 자체 인증서나 CDN 제공사에서 제공하는 인증서에 의해 SSL 가속 지원 • Last Mile 구간 포함 전 구간 SSL 인증 처리 지원
• 응답속도 개선
• SSL 서버 부하 경감
Authentication
• 고객 웹 서버에서의 인증을 통한 콘텐츠 무단 액세스 방지 지원 • 모든 인증 리퀘스트는 모두 고객 서버로 릴레이되어 인증 처리하는 Origin-
based Access Control와 동적 엑세스 제어가 가능한 Tokenized Access Control (Tokenized URLs) 방식 제공
• 콘텐츠 유출 방지
• 오리진 서버 해킹 방지
Geo IP Control • 최종 사용자의 IP를 당사 GeoIP DB와 비교하여 특정 지역 IP를 블록하거나 필
요 시 Redirection
• 해외 사용자로의 서비스 제한 및 맞춤형 서비스 가능
Self provisioning • 고객이 직접 설정할 수 있는 기능 제공 • 도메인 셋팅 관리, SSL 인증서 관리, 콘텐츠 퍼지 등
• 신속한 캐시 설정
로깅 • Apache 포맷, W3C 확장 로그 제공 • 고객이 직접 로그 데이터를 가져갈 수 있도록 제공함
• 온라인 비즈니스 분석 지원
API • Open API 제공하여 콘텐츠 퍼지(Purge), 가속 도메인 편집, 트래픽 데이터 수
집 등의 기능을 자유롭게 고객 시스템과 연동하여 구현 가능 • 신속한 캐시 설정
CopyrightⓒCDNetworks. All rights reserved. Page 20
CDN provisioning
The domain name configured on the CDN will point to the CDN’s load balancers. In this case, img.site.com.cdngc.net will point to CDNetworks load balancers, which will return the IP address of a CDNetworks cache node.
Img.site.com Img.site.com.cdngc.net Load Balancer CDNetworks Cache Node
A short overview of provisioning CDN HTTP caching service 1. Set up a DNS record for the origin server, e.g. org-img.site.com 2. Point the origin DNS record to the origin’s IP address with an A record
- Example: org-img.site.com IN A 173.194.33.20 3. Set up a DNS record for the PAD, e.g. img.site.com 4. Point the PAD DNS record to a specific domain name on the CDN, using a CNAME
- Example: img.site.com IN CNAME img.site.com.cdngc.net 5. Configure the PAD with the proper origin address 6. Configure the website on the origin to use the PAD name (img.site.com)
CopyrightⓒCDNetworks. All rights reserved. Page 21
Performance
Web CDN 성능 측정
• 성능측정 URL
• 측정 위치
• 측정 간격
• 수집데이터 : waterfall chart
시간 분석 • DNS Lookup Time : IP를 얻기 위해 DNS resolving에 걸린 시간
• Connection Time : 서버 IP에 connection이 맺어진 시간, TCP 3-way hand-shaking
• (SSL Time) : SSL hand-shaking
• TTFB : Time To First Byte, HTTP response 의 시작 시간
• Transfer Time : HTTP body의 전송 시간
CopyrightⓒCDNetworks. All rights reserved. Page 22
Performance Performance 측정 방식
• Synthetic Monitoring
− 측정 노드를 두고 미리 설정된 측정을 수행
− 다양한 기능/측정노드/수집데이터 제공
− Gomez, Keynote, Webmetrics, Catchpoint, Pingdom
• Real User Monitoring (RUM)
− 사용자 브라우져를 통한 passive한 측정, 수집용 javascript 이용
− Google Analytics, lognormal
− Cedexis, Turbobyte : CDN 로드밸런싱용으로 사용
성능 최적화 • User Experience Page Loading time
• 웹서버 성능 최적화 : 서비스 구성, 웹/디비 성능
• 네트워크 최적화 : ISP/IDC
• 사이트 최적화 : HTML구성, 페이지 크기, 로딩속도, 캐쉬
CDN 활용은 서버/네트워크 최적화를 위한 선택
CopyrightⓒCDNetworks. All rights reserved. Page 23
Performance
Performance impact of dynamic web acceleration
CopyrightⓒCDNetworks. All rights reserved. Page 24
Performance
For global CDN, performance is important for choosing CDN • DNS latency = DNS resolving time (DNS architecture, anycast) • Connect Time = latency to edge cache • Download time = TCP efficiency
CopyrightⓒCDNetworks. All rights reserved. Page 25
Performance Cedexis Radar
CopyrightⓒCDNetworks. All rights reserved. Page 26
Advanced CDN topics
Application Acceleration (HTTP/HTTPS)
• For accelerating non-cached contents
• Reducing round trips and compress bandwidth
• DWA, DSA, WAA …
Network Acceleration (non-HTTP)
• For non-HTTP contents (VPN, Remote Desktop)
• Accelerates IP connections
• DNA, IPA, …
GSLB (DNS Load Balancing) as a Service
• Controlling customer domain without CDN
• With or without CDN
Content Adaptation (Geo Targeting)
• Based on various rules (e.g. client IP, local DNS IP, specific header, language or user-agents)
• Allow, block or redirect contents
CopyrightⓒCDNetworks. All rights reserved. Page 27
Advanced CDN topics
Security (Anti-DDOS)
• CDN is easy to be attacked
• CDN is distributed system by nature – can handle attacks
• Absorbing global DDOS attacks
Security (Web Application Firewall)
• Filter unsafe access from edge server before going to origin
• Protects origin from exploits
FEO
• Reducing connections and loading time
• HTTP and HTML/scripting techniques
• Running FEO engine on Edge Cache
• mod_pagespeed (Google)
• blaze.io (Akamai), Strangeloop (Radware),
Yottaa
17.8 sec 8.3 sec
CopyrightⓒCDNetworks. All rights reserved. Page 28
Mobile CDN :: Concept
Similar with Web CDN, but go more close to Mobile Network
CopyrightⓒCDNetworks. All rights reserved. Page 29
Mobile CDN
• Transit traffic reduction - 80~90% less traffic
• Enhanced mobile user experience - 20~30% faster
• Traffic reduction of mobile access network (RAN*) - 10~20% less traffic * Radio Access Network
Before
Mobile Network
Origin Mobile Terminal
Excessive Transit Traffic
Excessive RAN Traffic
Long Duration
CONFIDENTIAL
After
Mobile Network
Origin Mobile Terminal
Transit Traffic Reduction
RAN Traffic Reduction
Better Response
CDN
80%~90% less traffic
10%~20%less than original traffic
20%~30%faster
CopyrightⓒCDNetworks. All rights reserved. Page 30
CDN Market
0
500
1000
1500
2000
2500
3000
3500
2010 2011 2012 2013 2014
Revenue ($Mil.)
Source: AccuStream Research.
CopyrightⓒCDNetworks. All rights reserved. Page 31
CDN Market
Acquired by Fortinet (2013/1)
Acquired by Akamai (2011/12)
CopyrightⓒCDNetworks. All rights reserved. Page 32
Changes in CDN market
ISP started to enter CDN market aggressively
Reseller, Managed CDN, Licensed CDN, Federated CDN
Build its own CDN vs Use CDN solutions
CopyrightⓒCDNetworks. All rights reserved. Page 33
CDNetworks strategy
• CDN market continues to grow
• Mobile traffic explosion
• Enterprise Apps. Adoption of cloud platform
• No clear next CDN tech roadmap
Key Market
issues
• Telco moves into CDN space
• #1 global player’s market leadership continues to strengthen
• Continuous price degradation
Key Competitive
Issues
How to ride on mobile traffic explosion?
How to maximize application acceleration market opportunity?
How to collaborate and compete with Telcos?
How to become a market challenger?
CopyrightⓒCDNetworks. All rights reserved. Page 34
Thank You! Q & A