EDNS0 Client-Subnet for DNS Based CDNs

EDNS0 Client-Subnet for DNS based
CDNs
Matt Jansen
Akamai Technologies
BDNOG3, Dhaka, May 18th 2015
©2012 AKAMAI | FASTER FORWARDTM
The world’s largest on-demand, distributed computing
platform delivers all forms of web content and applications
The Akamai Intelligent Platform
Typical daily traffic:
•  More than 2 trillion requests served
•  Delivering over 25 Terabits/second
•  15-30% of all daily web traffic
The Akamai Intelligent Platform:
170,000+
Servers
2,000+
Locations
102+
Countries
1,300+
Networks
700+
Cities
©2012 AKAMAI | FASTER FORWARDTM
When content is requested from CDNs, the user is
directed to the optimal server to serve this user
There’s 2 common ways to do that:
•  anycast: the content is served from the location the
request is received (easy to build, requires symmetric
routing to work well)
•  DNS based: the CDN decides where to best serve
the content from based on the resolver it receives the
request from, and replies with the optimal server
How CDNs Work
©2012 AKAMAI | FASTER FORWARDTM
Users querying a DNS-based CDNs will be returned
different A (and AAAA) records for the same hostname
depending on the resolver the request comes from
This is called “mapping”
The better the mapping, the better the CDN
How DNS based CDNs Work
©2012 AKAMAI | FASTER FORWARDTM
Example of Akamai mapping
• Notice the different A records for different locations:
[NYC]% host www.symantec.com
www.symantec.com CNAME e5211.b.akamaiedge.net.
e5211.b.akamaiedge.net. A 207.40.194.46
e5211.b.akamaiedge.net. A 207.40.194.49
[Boston]% host www.symantec.com
www.symantec.com CNAME e5211.b.akamaiedge.net.
e5211.b.akamaiedge.net. A 81.23.243.152
e5211.b.akamaiedge.net. A 81.23.243.145
How Akamai’s CDN works
©2012 AKAMAI | FASTER FORWARDTM
Akamai uses multiple criteria to choose the optimal
server
• These include standard network metrics:
• Latency
• Throughput
• Packet loss
• as well as internal ones such as:
• CPU load on the server
• HD space
• network utilization
How Akamai’s CDN works
©2012 AKAMAI | FASTER FORWARDTM
Mapping (simplified)
1)  end-user requests www.example.com from ISP NS
2)  ISP NS recursively (multiple iterations) looks up www.example.com being referred to
authoritative Akamai NS (by cname)
3)  ISP NS asks authoritative Akamai NS
4)  Akamai NS looks up IP of requestor (ISP NS) and replies with IP of optimal cluster
to serve content (local cluster in that ISP)
5)  ISP NS replies to end-user who
6)  requests content from local Cluster
end-user
ISP NS
1.2.3.4
root/tld/intermediate NS
(recursive lookup until
reaching authoritative NS)
Akamai NS
Local Akamai Cluster at ISP 5.6.7.8
example.com?
example.com?
a212.g.akamai.net
5.6.7.8
1
3
6
2
NS 1.2.3.4?
best cluster =
5.6.7.8
4
5
©2012 AKAMAI | FASTER FORWARDTM
All of this works very well if the end-user used their
provider’s DNS servers.
However if the end-user is making use of a 3rd party
DNS service like
•  Google DNS (28 locations worldwide)
https://developers.google.com/speed/public-dns/faq#locations
•  OpenDNS (20 locations worldwide)
http://www.opendns.com/network-map/
a DNS-based CDN does not know which network the
request originated from, and can therefore in the best
case serve it in the rough geographic area
The Problem: 3rd Party DNS servers
©2012 AKAMAI | FASTER FORWARDTM
How 3rd party (open) resolvers typically work
global ‘frontend’ anycast address, local unique ‘backend’ address for
recursive queries
•  CDN can tell which NS location it came from (by backend-ip)
•  but not which end-user location or network
-> have to serve from a large infrastructure cluster (typically located at
the big IXs) to ensure we can reach any end-user
end-user
Akamai NS
NS 74.125.190.1?
best cluster =
?
Google DNS
Frontend 8.8.8.8
Backend 74.125.190.1
request to 8.8.8.8 request from 74.125.190.1
©2012 AKAMAI | FASTER FORWARDTM
relatively small numbers in most countries with a mature
internet ecosystem:
USA, Belgium, Singapore: less than 1%
but very high percentage of users in developing
countries and/or countries performing some form of
DNS-based web-filtering:
Turkey: 22%, Vietnam: 29%, Bangladesh: 23%
Use of 3rd party DNS servers
©2012 AKAMAI | FASTER FORWARDTM
ISP	
  DNS	
   Google	
   OpenDNS	
   Others	
  
ISP	
  A	
   90.4%	
   3.3%	
   0.2%	
   6.1%	
  
ISP	
  B	
   85.9%	
   6.4%	
   1.5%	
   6.2%	
  
ISP	
  C	
   73.9%	
   19.7%	
   1.6%	
   4.8%	
  
ISP	
  D	
   34.8%	
   0.7%	
   0.0%	
   64.4%	
  
ISP	
  E	
   33.3%	
   46.2%	
   0.9%	
   19.6%	
  
ISP	
  F	
   28.0%	
   0.4%	
   0.0%	
   71.5%	
  
Use of 3rd party DNS servers in Bangladesh
©2012 AKAMAI | FASTER FORWARDTM
Use end-user IP instead of NS IP for mapping
Problem: at the time of authoritative DNS answer end-
user IP is not known yet
•  HTTP redirect
•  Map based on DNS
•  Measure RTT of initial request from end-user received (and
therefore IP known), if over threshold:
•  Redirect to better positioned server to reach end-user IP
Problem: slow, not suitable for small objects
End User Mapping
©2012 AKAMAI | FASTER FORWARDTM
EDNS0 client-subnet
https://tools.ietf.org/html/draft-vandergaast-edns-client-subnet-02
The recursive resolver includes the end-user’s prefix in
the request to the authoritative nameserver
This allows the authoritative nameserver (the CDN) to
process this information and optimize the reply not
based on the requesting nameserver but the end-user’s
prefix
The Solution: EDNS0 client-subnet
©2012 AKAMAI | FASTER FORWARDTM
•  Open standard (draft)
•  Has to be supported by recursive resolver (3rd Party
DNS)
•  and by Authoritative NS (CDN)
•  Privacy: only prefix, not full address transmitted
The Solution: EDNS0 client-subnet
©2012 AKAMAI | FASTER FORWARDTM
Op0on-­‐Code	
  =	
  8	
  
Op0on-­‐Length	
  (in	
  bytes)	
  
Family	
  (1=v4,	
  2=v6)	
  
Source-­‐Netmask	
   Scope-­‐Netmask	
  
Address	
  
request: e.g. 24
0 for privacy
to be echoed
in reply
request = 0
reply can be <>
request, 0 for
not used
EDNS0 client-subnet implementation
©2012 AKAMAI | FASTER FORWARDTM
Mapping (EDNS0)
1)  end-user requests www.example.com from Google NS
2)  Google NS recursively looks up www.example.com being referred to authoritative
Akamai NS (by cname)
3)  Google NS asks Akamai NS including client-subnet
4)  Akamai NS looks up client-subnet and replies with IP of optimal cluster to serve
content (local cluster in that ISP)
5)  ISP NS replies to end-user who
6)  requests content from local Cluster
end-user
Google NS
8.8.8.8
root/tld/intermediate NS
(recursive lookup until
reaching authoritative NS)
Akamai NS
Local Akamai Cluster at ISP 5.6.7.8
example.com?
example.com?
a212.g.akamai.net
5.6.7.8
1
3
6
2
NS 8.8.8.8 (whitelisted for edns0)
client subnet=1.1.1.0/24
best cluster =
5.6.7.8
4
5
©2012 AKAMAI | FASTER FORWARDTM
Only prefix, not full IP transmitted
CDN already gets your full IP anyways (in the
subsequent HTTP request)
Set source-netmask/address to 0.0.0.0/0
•  Google DNS honors forwards request with 0.0.0.0/0
•  OpenDNS ignores at time of writing
Do not use client-subnet capable resolver if intention is
to hide client origin
Privacy concerns
©2012 AKAMAI | FASTER FORWARDTM
Scanning/walking the mapping algorithm
•  double whitelist (at recursive resolver & auth NS)
•  enforced replacement of client-tagged edns0 option
by Google & OpenDNS before being send to Akamai
Amplification
•  double whitelist
•  echoing request in reply
•  standard rate limiting methods work
Cache pollution of recursive resolver can be a problem
•  separate reply stored for each prefix
Security concerns
©2012 AKAMAI | FASTER FORWARDTM
Google/OpenDNS currently always send client-subnet
as /24 (for privacy/caching-efficiency reasons)
Mapping system has view of internet from it’s partners
with differing prefix-lenghts
•  client-subnet more specific than Akamai
•  e.g. Akamai has /20 from partner-> can be mapped
•  scope-netmask send to resolver for caching purposes
•  client-subnet less specific than Akamai
•  e.g. Akamai has /26s from partner in different locations -> no
clear choice to map -> will take first match
•  also send scope-netmask to resolver for information
Prefix-Length
©2012 AKAMAI | FASTER FORWARDTM
2"Jan& 9"Jan& 16"Jan& 23"Jan& 30"Jan& 6"Feb& 13"Feb& 20"Feb& 27"Feb&
average&distance&
Open&DNS&India&
Improvements with edns0 client-subnet
©2012 AKAMAI | FASTER FORWARDTM
can be used within a partner’s network instead of
distributed DNS architecture
A partner might have a widespread network (especially
in countries spanning large geographical areas and/or
different islands like Australia or Indonesia)
•  Would like to deploy clusters around the network to
localize traffic
•  But central DNS infrastructure makes mapping traffic
accurately difficult
Additional Use-Case
©2012 AKAMAI | FASTER FORWARDTM
Batam
Jakarta (NS)
Surabaya
Banjamarsin
Makassar
Denpasar
Akamai Cluster Nameserver
Example for distributed architecture
©2012 AKAMAI | FASTER FORWARDTM
Deploy additional NS in all locations
•  Benefit: better DNS responses (all traffic), can use anycast
frontend IP to simplify administration/failover (announcing
same frontend IP to all end-users, different backend), easy to
implement, easy to manage
•  Drawback: some additional CAPEX
Virtual (backend) IPs on existing NS given to different
geographic sets of end-users
•  Benefit: no additional CAPEX, easy to implement
•  Drawback: more difficult to administer, will require manual
allocation of IPs to clusters on CDN side, no clear fallback
EDNS0 client-subnet within the providers network
•  Benefit: no hardware changes, can scale for very small clusters
in remote places
•  Drawback: needs compatible NS software, high
overhead for management/set up
Solutions
©2012 AKAMAI | FASTER FORWARDTM
Matt Jansen mj@akamai.com
Questions?
1 of 24

Recommended

Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ... by
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...Amazon Web Services
4.4K views160 slides
(NET308) Consolidating DNS Data in the Cloud with Amazon Route 53 by
(NET308) Consolidating DNS Data in the Cloud with Amazon Route 53(NET308) Consolidating DNS Data in the Cloud with Amazon Route 53
(NET308) Consolidating DNS Data in the Cloud with Amazon Route 53Amazon Web Services
4.4K views42 slides
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ... by
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...Amazon Web Services
1.7K views175 slides
GTM vs AWS Route 53 with Cisco umbrella by
GTM vs AWS Route 53 with Cisco umbrellaGTM vs AWS Route 53 with Cisco umbrella
GTM vs AWS Route 53 with Cisco umbrellaDhruv Sharma
271 views50 slides
AWS Route53 by
AWS Route53AWS Route53
AWS Route53zekeLabs Technologies
2.3K views20 slides
AWS re:Invent 2016: Making Every Packet Count (NET404) by
AWS re:Invent 2016: Making Every Packet Count (NET404)AWS re:Invent 2016: Making Every Packet Count (NET404)
AWS re:Invent 2016: Making Every Packet Count (NET404)Amazon Web Services
1.5K views59 slides

More Related Content

What's hot

AWS re:Invent 2016: [JK REPEAT] Deep Dive on Amazon EC2 Instances, Featuring ... by
AWS re:Invent 2016: [JK REPEAT] Deep Dive on Amazon EC2 Instances, Featuring ...AWS re:Invent 2016: [JK REPEAT] Deep Dive on Amazon EC2 Instances, Featuring ...
AWS re:Invent 2016: [JK REPEAT] Deep Dive on Amazon EC2 Instances, Featuring ...Amazon Web Services
2.2K views52 slides
Challenges behind the scenes of the large Swiss e-Commerce shop apfelkiste.ch... by
Challenges behind the scenes of the large Swiss e-Commerce shop apfelkiste.ch...Challenges behind the scenes of the large Swiss e-Commerce shop apfelkiste.ch...
Challenges behind the scenes of the large Swiss e-Commerce shop apfelkiste.ch...nine
61 views27 slides
Content Growth by Kams Yueng by
Content Growth by Kams YuengContent Growth by Kams Yueng
Content Growth by Kams YuengMyNOG
3.8K views36 slides
Request routing in CDN by
Request routing in CDNRequest routing in CDN
Request routing in CDNSandeep Kath
6.3K views53 slides
Cdn cs6740 by
Cdn cs6740Cdn cs6740
Cdn cs6740Aravindharamanan S
341 views37 slides
AWS re:Invent 2016: Another Day, Another Billion Packets (NET401) by
AWS re:Invent 2016: Another Day, Another Billion Packets (NET401)AWS re:Invent 2016: Another Day, Another Billion Packets (NET401)
AWS re:Invent 2016: Another Day, Another Billion Packets (NET401)Amazon Web Services
1.8K views49 slides

What's hot(20)

AWS re:Invent 2016: [JK REPEAT] Deep Dive on Amazon EC2 Instances, Featuring ... by Amazon Web Services
AWS re:Invent 2016: [JK REPEAT] Deep Dive on Amazon EC2 Instances, Featuring ...AWS re:Invent 2016: [JK REPEAT] Deep Dive on Amazon EC2 Instances, Featuring ...
AWS re:Invent 2016: [JK REPEAT] Deep Dive on Amazon EC2 Instances, Featuring ...
Amazon Web Services2.2K views
Challenges behind the scenes of the large Swiss e-Commerce shop apfelkiste.ch... by nine
Challenges behind the scenes of the large Swiss e-Commerce shop apfelkiste.ch...Challenges behind the scenes of the large Swiss e-Commerce shop apfelkiste.ch...
Challenges behind the scenes of the large Swiss e-Commerce shop apfelkiste.ch...
nine61 views
Content Growth by Kams Yueng by MyNOG
Content Growth by Kams YuengContent Growth by Kams Yueng
Content Growth by Kams Yueng
MyNOG3.8K views
Request routing in CDN by Sandeep Kath
Request routing in CDNRequest routing in CDN
Request routing in CDN
Sandeep Kath6.3K views
AWS re:Invent 2016: Another Day, Another Billion Packets (NET401) by Amazon Web Services
AWS re:Invent 2016: Another Day, Another Billion Packets (NET401)AWS re:Invent 2016: Another Day, Another Billion Packets (NET401)
AWS re:Invent 2016: Another Day, Another Billion Packets (NET401)
Amazon Web Services1.8K views
Apache Hadoop YARN State of the Union by Weiwei Yang
Apache Hadoop YARN State of the UnionApache Hadoop YARN State of the Union
Apache Hadoop YARN State of the Union
Weiwei Yang75 views
(ARC204) Architecting Microsoft Workloads on AWS | AWS re:Invent 2014 by Amazon Web Services
(ARC204) Architecting Microsoft Workloads on AWS | AWS re:Invent 2014(ARC204) Architecting Microsoft Workloads on AWS | AWS re:Invent 2014
(ARC204) Architecting Microsoft Workloads on AWS | AWS re:Invent 2014
Amazon Web Services3.1K views
Improving HDFS Availability with Hadoop RPC Quality of Service by Ming Ma
Improving HDFS Availability with Hadoop RPC Quality of ServiceImproving HDFS Availability with Hadoop RPC Quality of Service
Improving HDFS Availability with Hadoop RPC Quality of Service
Ming Ma4K views
Cassandra Summit 2014: Novel Multi-Region Clusters — Cassandra Deployments Sp... by DataStax Academy
Cassandra Summit 2014: Novel Multi-Region Clusters — Cassandra Deployments Sp...Cassandra Summit 2014: Novel Multi-Region Clusters — Cassandra Deployments Sp...
Cassandra Summit 2014: Novel Multi-Region Clusters — Cassandra Deployments Sp...
DataStax Academy2.7K views
Measuring CDN performance and why you're doing it wrong by Fastly
Measuring CDN performance and why you're doing it wrongMeasuring CDN performance and why you're doing it wrong
Measuring CDN performance and why you're doing it wrong
Fastly8.2K views
Message Queuing on a Large Scale: IMVUs stateful real-time message queue for ... by Jon Watte
Message Queuing on a Large Scale: IMVUs stateful real-time message queue for ...Message Queuing on a Large Scale: IMVUs stateful real-time message queue for ...
Message Queuing on a Large Scale: IMVUs stateful real-time message queue for ...
Jon Watte8.2K views
(NET301) New Capabilities for Amazon Virtual Private Cloud by Amazon Web Services
(NET301) New Capabilities for Amazon Virtual Private Cloud(NET301) New Capabilities for Amazon Virtual Private Cloud
(NET301) New Capabilities for Amazon Virtual Private Cloud
HadoopCon2015 Multi-Cluster Live Synchronization with Kerberos Federated Hadoop by Yafang Chang
HadoopCon2015 Multi-Cluster Live Synchronization with Kerberos Federated HadoopHadoopCon2015 Multi-Cluster Live Synchronization with Kerberos Federated Hadoop
HadoopCon2015 Multi-Cluster Live Synchronization with Kerberos Federated Hadoop
Yafang Chang1.3K views
Leveraging Amazon Web Services for Scalable Media Distribution and Analytics ... by Amazon Web Services
Leveraging Amazon Web Services for Scalable Media Distribution and Analytics ...Leveraging Amazon Web Services for Scalable Media Distribution and Analytics ...
Leveraging Amazon Web Services for Scalable Media Distribution and Analytics ...
Amazon Web Services1.9K views

Viewers also liked

Dot BD Domain and Shared Registry Model- A Policy Proposal by
Dot BD Domain and Shared Registry Model- A Policy Proposal Dot BD Domain and Shared Registry Model- A Policy Proposal
Dot BD Domain and Shared Registry Model- A Policy Proposal Bangladesh Network Operators Group
752 views12 slides
Traffic Engineering for CDNs by
Traffic Engineering for CDNs Traffic Engineering for CDNs
Traffic Engineering for CDNs Bangladesh Network Operators Group
2.6K views45 slides
ICANN Engagement Update by
ICANN Engagement UpdateICANN Engagement Update
ICANN Engagement UpdateBangladesh Network Operators Group
734 views22 slides
Securing Asterisk: A practical approach by
Securing Asterisk: A practical approachSecuring Asterisk: A practical approach
Securing Asterisk: A practical approachBangladesh Network Operators Group
1.6K views29 slides
bdNOG Conference Report by
bdNOG Conference Report bdNOG Conference Report
bdNOG Conference Report Bangladesh Network Operators Group
662 views17 slides
IPv6 Address & Deployment Planning by
IPv6 Address & Deployment PlanningIPv6 Address & Deployment Planning
IPv6 Address & Deployment PlanningBangladesh Network Operators Group
1K views58 slides

Viewers also liked(20)

Similar to EDNS0 Client-Subnet for DNS Based CDNs

16 (IDNOG01) EDNS0 / How CDNS works by Matt Jansen by
16 (IDNOG01) EDNS0 / How CDNS works by Matt Jansen16 (IDNOG01) EDNS0 / How CDNS works by Matt Jansen
16 (IDNOG01) EDNS0 / How CDNS works by Matt JansenIndonesia Network Operators Group
4.4K views24 slides
EDNS0 Client-Subnet for DNS based CDNs by Matt Jansen by
EDNS0 Client-Subnet for DNS based CDNs by Matt JansenEDNS0 Client-Subnet for DNS based CDNs by Matt Jansen
EDNS0 Client-Subnet for DNS based CDNs by Matt JansenMyNOG
1.9K views25 slides
Traffic Engineering for CDNs by
Traffic Engineering for CDNsTraffic Engineering for CDNs
Traffic Engineering for CDNsMyNOG
1.7K views43 slides
Akamai company profile by
Akamai company profileAkamai company profile
Akamai company profilerahulp9999
1.4K views20 slides
Traffic Engineering for CDNs by Matt Jansen [APRICOT 2015] by
Traffic Engineering for CDNs by Matt Jansen [APRICOT 2015]Traffic Engineering for CDNs by Matt Jansen [APRICOT 2015]
Traffic Engineering for CDNs by Matt Jansen [APRICOT 2015]APNIC
709 views41 slides
40 - IDNOG03 - Bob Lau (Akamai) - BGP and Traffic Engineering by
40 - IDNOG03  - Bob Lau (Akamai) - BGP and Traffic Engineering40 - IDNOG03  - Bob Lau (Akamai) - BGP and Traffic Engineering
40 - IDNOG03 - Bob Lau (Akamai) - BGP and Traffic EngineeringIndonesia Network Operators Group
891 views44 slides

Similar to EDNS0 Client-Subnet for DNS Based CDNs (20)

EDNS0 Client-Subnet for DNS based CDNs by Matt Jansen by MyNOG
EDNS0 Client-Subnet for DNS based CDNs by Matt JansenEDNS0 Client-Subnet for DNS based CDNs by Matt Jansen
EDNS0 Client-Subnet for DNS based CDNs by Matt Jansen
MyNOG1.9K views
Traffic Engineering for CDNs by MyNOG
Traffic Engineering for CDNsTraffic Engineering for CDNs
Traffic Engineering for CDNs
MyNOG1.7K views
Akamai company profile by rahulp9999
Akamai company profileAkamai company profile
Akamai company profile
rahulp99991.4K views
Traffic Engineering for CDNs by Matt Jansen [APRICOT 2015] by APNIC
Traffic Engineering for CDNs by Matt Jansen [APRICOT 2015]Traffic Engineering for CDNs by Matt Jansen [APRICOT 2015]
Traffic Engineering for CDNs by Matt Jansen [APRICOT 2015]
APNIC709 views
PLNOG 6: Christian Kaufmann - How Akamai delivers your packets - the insight by PROIDEA
PLNOG 6: Christian Kaufmann - How Akamai delivers your packets - the insight PLNOG 6: Christian Kaufmann - How Akamai delivers your packets - the insight
PLNOG 6: Christian Kaufmann - How Akamai delivers your packets - the insight
PROIDEA107 views
PLNOG 6: Christian Kaufmann - How Akamai delivers your packets - the insight by PROIDEA
PLNOG 6: Christian Kaufmann - How Akamai delivers your packets - the insight PLNOG 6: Christian Kaufmann - How Akamai delivers your packets - the insight
PLNOG 6: Christian Kaufmann - How Akamai delivers your packets - the insight
PROIDEA17 views
BGP and Traffic Engineering with Akamai by Internet Society
BGP and Traffic Engineering with AkamaiBGP and Traffic Engineering with Akamai
BGP and Traffic Engineering with Akamai
Internet Society4.3K views
Scalable Web Applications in AWS, 2014 by Vadim Zendejas
Scalable Web Applications in AWS, 2014Scalable Web Applications in AWS, 2014
Scalable Web Applications in AWS, 2014
Vadim Zendejas98 views
Embedded CDNs in 2023 by MyNOG
Embedded CDNs in 2023Embedded CDNs in 2023
Embedded CDNs in 2023
MyNOG113 views
Scalable Web Applications Session at Codebase by Ian Massingham
Scalable Web Applications Session at CodebaseScalable Web Applications Session at Codebase
Scalable Web Applications Session at Codebase
Ian Massingham862 views
AWS를 활용한 웹, 모바일, 소셜 애플리케이션 구축 방법 by Amazon Web Services Korea
AWS를 활용한 웹, 모바일, 소셜 애플리케이션 구축 방법AWS를 활용한 웹, 모바일, 소셜 애플리케이션 구축 방법
AWS를 활용한 웹, 모바일, 소셜 애플리케이션 구축 방법
India Internet Access Problems Whitepaper_Ver 2.2 by Arin Burman
India Internet Access Problems Whitepaper_Ver 2.2India Internet Access Problems Whitepaper_Ver 2.2
India Internet Access Problems Whitepaper_Ver 2.2
Arin Burman106 views
Architecture Best Practices by AWS Germany
Architecture Best PracticesArchitecture Best Practices
Architecture Best Practices
AWS Germany5.8K views
AWS Webinar 201: Designing scalable, available & resilient cloud applications by Amazon Web Services
AWS Webinar 201: Designing scalable, available & resilient cloud applicationsAWS Webinar 201: Designing scalable, available & resilient cloud applications
AWS Webinar 201: Designing scalable, available & resilient cloud applications
Amazon Web Services3.7K views
Oracle E-Business Suite On Oracle Cloud by pasalapudi
Oracle E-Business Suite On Oracle CloudOracle E-Business Suite On Oracle Cloud
Oracle E-Business Suite On Oracle Cloud
pasalapudi446 views

More from Bangladesh Network Operators Group

IPv6 Deployment in South Asia 2022 by
IPv6 Deployment in South Asia  2022IPv6 Deployment in South Asia  2022
IPv6 Deployment in South Asia 2022Bangladesh Network Operators Group
43 views20 slides
Introduction to Software Defined Networking (SDN) by
Introduction to Software Defined Networking (SDN)Introduction to Software Defined Networking (SDN)
Introduction to Software Defined Networking (SDN)Bangladesh Network Operators Group
143 views27 slides
RPKI Deployment Status in Bangladesh by
RPKI Deployment Status in BangladeshRPKI Deployment Status in Bangladesh
RPKI Deployment Status in BangladeshBangladesh Network Operators Group
45 views21 slides
An Overview about open UDP Services by
An Overview about open UDP ServicesAn Overview about open UDP Services
An Overview about open UDP ServicesBangladesh Network Operators Group
217 views15 slides
12 Years in DNS Security As a Defender by
12 Years in DNS Security As a Defender12 Years in DNS Security As a Defender
12 Years in DNS Security As a DefenderBangladesh Network Operators Group
111 views21 slides
Contents Localization Initiatives to get better User Experience by
Contents Localization Initiatives to get better User ExperienceContents Localization Initiatives to get better User Experience
Contents Localization Initiatives to get better User ExperienceBangladesh Network Operators Group
78 views31 slides

More from Bangladesh Network Operators Group(20)

Recently uploaded

Cracking the Code Decoding Leased Line Quotes for Connectivity Excellence.pptx by
Cracking the Code Decoding Leased Line Quotes for Connectivity Excellence.pptxCracking the Code Decoding Leased Line Quotes for Connectivity Excellence.pptx
Cracking the Code Decoding Leased Line Quotes for Connectivity Excellence.pptxLeasedLinesQuote
5 views8 slides
ARNAB12.pdf by
ARNAB12.pdfARNAB12.pdf
ARNAB12.pdfArnabChakraborty499766
5 views83 slides
ATPMOUSE_융합2조.pptx by
ATPMOUSE_융합2조.pptxATPMOUSE_융합2조.pptx
ATPMOUSE_융합2조.pptxkts120898
35 views70 slides
WITS Deck by
WITS DeckWITS Deck
WITS DeckW.I.T.S.
36 views22 slides
40th TWNIC Open Policy Meeting: APNIC PDP update by
40th TWNIC Open Policy Meeting: APNIC PDP update40th TWNIC Open Policy Meeting: APNIC PDP update
40th TWNIC Open Policy Meeting: APNIC PDP updateAPNIC
106 views20 slides
The Dark Web : Hidden Services by
The Dark Web : Hidden ServicesThe Dark Web : Hidden Services
The Dark Web : Hidden ServicesAnshu Singh
22 views24 slides

Recently uploaded(13)

Cracking the Code Decoding Leased Line Quotes for Connectivity Excellence.pptx by LeasedLinesQuote
Cracking the Code Decoding Leased Line Quotes for Connectivity Excellence.pptxCracking the Code Decoding Leased Line Quotes for Connectivity Excellence.pptx
Cracking the Code Decoding Leased Line Quotes for Connectivity Excellence.pptx
ATPMOUSE_융합2조.pptx by kts120898
ATPMOUSE_융합2조.pptxATPMOUSE_융합2조.pptx
ATPMOUSE_융합2조.pptx
kts12089835 views
WITS Deck by W.I.T.S.
WITS DeckWITS Deck
WITS Deck
W.I.T.S.36 views
40th TWNIC Open Policy Meeting: APNIC PDP update by APNIC
40th TWNIC Open Policy Meeting: APNIC PDP update40th TWNIC Open Policy Meeting: APNIC PDP update
40th TWNIC Open Policy Meeting: APNIC PDP update
APNIC106 views
The Dark Web : Hidden Services by Anshu Singh
The Dark Web : Hidden ServicesThe Dark Web : Hidden Services
The Dark Web : Hidden Services
Anshu Singh22 views
40th TWNIC Open Policy Meeting: A quick look at QUIC by APNIC
40th TWNIC Open Policy Meeting: A quick look at QUIC40th TWNIC Open Policy Meeting: A quick look at QUIC
40th TWNIC Open Policy Meeting: A quick look at QUIC
APNIC109 views
Penetration Testing for Cybersecurity Professionals by 211 Check
Penetration Testing for Cybersecurity ProfessionalsPenetration Testing for Cybersecurity Professionals
Penetration Testing for Cybersecurity Professionals
211 Check49 views
40th TWNIC OPM: On LEOs (Low Earth Orbits) and Starlink Download by APNIC
40th TWNIC OPM: On LEOs (Low Earth Orbits) and Starlink Download40th TWNIC OPM: On LEOs (Low Earth Orbits) and Starlink Download
40th TWNIC OPM: On LEOs (Low Earth Orbits) and Starlink Download
APNIC112 views
cis5-Project-11a-Harry Lai by harrylai126
cis5-Project-11a-Harry Laicis5-Project-11a-Harry Lai
cis5-Project-11a-Harry Lai
harrylai1269 views

EDNS0 Client-Subnet for DNS Based CDNs

  • 1. EDNS0 Client-Subnet for DNS based CDNs Matt Jansen Akamai Technologies BDNOG3, Dhaka, May 18th 2015
  • 2. ©2012 AKAMAI | FASTER FORWARDTM The world’s largest on-demand, distributed computing platform delivers all forms of web content and applications The Akamai Intelligent Platform Typical daily traffic: •  More than 2 trillion requests served •  Delivering over 25 Terabits/second •  15-30% of all daily web traffic The Akamai Intelligent Platform: 170,000+ Servers 2,000+ Locations 102+ Countries 1,300+ Networks 700+ Cities
  • 3. ©2012 AKAMAI | FASTER FORWARDTM When content is requested from CDNs, the user is directed to the optimal server to serve this user There’s 2 common ways to do that: •  anycast: the content is served from the location the request is received (easy to build, requires symmetric routing to work well) •  DNS based: the CDN decides where to best serve the content from based on the resolver it receives the request from, and replies with the optimal server How CDNs Work
  • 4. ©2012 AKAMAI | FASTER FORWARDTM Users querying a DNS-based CDNs will be returned different A (and AAAA) records for the same hostname depending on the resolver the request comes from This is called “mapping” The better the mapping, the better the CDN How DNS based CDNs Work
  • 5. ©2012 AKAMAI | FASTER FORWARDTM Example of Akamai mapping • Notice the different A records for different locations: [NYC]% host www.symantec.com www.symantec.com CNAME e5211.b.akamaiedge.net. e5211.b.akamaiedge.net. A 207.40.194.46 e5211.b.akamaiedge.net. A 207.40.194.49 [Boston]% host www.symantec.com www.symantec.com CNAME e5211.b.akamaiedge.net. e5211.b.akamaiedge.net. A 81.23.243.152 e5211.b.akamaiedge.net. A 81.23.243.145 How Akamai’s CDN works
  • 6. ©2012 AKAMAI | FASTER FORWARDTM Akamai uses multiple criteria to choose the optimal server • These include standard network metrics: • Latency • Throughput • Packet loss • as well as internal ones such as: • CPU load on the server • HD space • network utilization How Akamai’s CDN works
  • 7. ©2012 AKAMAI | FASTER FORWARDTM Mapping (simplified) 1)  end-user requests www.example.com from ISP NS 2)  ISP NS recursively (multiple iterations) looks up www.example.com being referred to authoritative Akamai NS (by cname) 3)  ISP NS asks authoritative Akamai NS 4)  Akamai NS looks up IP of requestor (ISP NS) and replies with IP of optimal cluster to serve content (local cluster in that ISP) 5)  ISP NS replies to end-user who 6)  requests content from local Cluster end-user ISP NS 1.2.3.4 root/tld/intermediate NS (recursive lookup until reaching authoritative NS) Akamai NS Local Akamai Cluster at ISP 5.6.7.8 example.com? example.com? a212.g.akamai.net 5.6.7.8 1 3 6 2 NS 1.2.3.4? best cluster = 5.6.7.8 4 5
  • 8. ©2012 AKAMAI | FASTER FORWARDTM All of this works very well if the end-user used their provider’s DNS servers. However if the end-user is making use of a 3rd party DNS service like •  Google DNS (28 locations worldwide) https://developers.google.com/speed/public-dns/faq#locations •  OpenDNS (20 locations worldwide) http://www.opendns.com/network-map/ a DNS-based CDN does not know which network the request originated from, and can therefore in the best case serve it in the rough geographic area The Problem: 3rd Party DNS servers
  • 9. ©2012 AKAMAI | FASTER FORWARDTM How 3rd party (open) resolvers typically work global ‘frontend’ anycast address, local unique ‘backend’ address for recursive queries •  CDN can tell which NS location it came from (by backend-ip) •  but not which end-user location or network -> have to serve from a large infrastructure cluster (typically located at the big IXs) to ensure we can reach any end-user end-user Akamai NS NS 74.125.190.1? best cluster = ? Google DNS Frontend 8.8.8.8 Backend 74.125.190.1 request to 8.8.8.8 request from 74.125.190.1
  • 10. ©2012 AKAMAI | FASTER FORWARDTM relatively small numbers in most countries with a mature internet ecosystem: USA, Belgium, Singapore: less than 1% but very high percentage of users in developing countries and/or countries performing some form of DNS-based web-filtering: Turkey: 22%, Vietnam: 29%, Bangladesh: 23% Use of 3rd party DNS servers
  • 11. ©2012 AKAMAI | FASTER FORWARDTM ISP  DNS   Google   OpenDNS   Others   ISP  A   90.4%   3.3%   0.2%   6.1%   ISP  B   85.9%   6.4%   1.5%   6.2%   ISP  C   73.9%   19.7%   1.6%   4.8%   ISP  D   34.8%   0.7%   0.0%   64.4%   ISP  E   33.3%   46.2%   0.9%   19.6%   ISP  F   28.0%   0.4%   0.0%   71.5%   Use of 3rd party DNS servers in Bangladesh
  • 12. ©2012 AKAMAI | FASTER FORWARDTM Use end-user IP instead of NS IP for mapping Problem: at the time of authoritative DNS answer end- user IP is not known yet •  HTTP redirect •  Map based on DNS •  Measure RTT of initial request from end-user received (and therefore IP known), if over threshold: •  Redirect to better positioned server to reach end-user IP Problem: slow, not suitable for small objects End User Mapping
  • 13. ©2012 AKAMAI | FASTER FORWARDTM EDNS0 client-subnet https://tools.ietf.org/html/draft-vandergaast-edns-client-subnet-02 The recursive resolver includes the end-user’s prefix in the request to the authoritative nameserver This allows the authoritative nameserver (the CDN) to process this information and optimize the reply not based on the requesting nameserver but the end-user’s prefix The Solution: EDNS0 client-subnet
  • 14. ©2012 AKAMAI | FASTER FORWARDTM •  Open standard (draft) •  Has to be supported by recursive resolver (3rd Party DNS) •  and by Authoritative NS (CDN) •  Privacy: only prefix, not full address transmitted The Solution: EDNS0 client-subnet
  • 15. ©2012 AKAMAI | FASTER FORWARDTM Op0on-­‐Code  =  8   Op0on-­‐Length  (in  bytes)   Family  (1=v4,  2=v6)   Source-­‐Netmask   Scope-­‐Netmask   Address   request: e.g. 24 0 for privacy to be echoed in reply request = 0 reply can be <> request, 0 for not used EDNS0 client-subnet implementation
  • 16. ©2012 AKAMAI | FASTER FORWARDTM Mapping (EDNS0) 1)  end-user requests www.example.com from Google NS 2)  Google NS recursively looks up www.example.com being referred to authoritative Akamai NS (by cname) 3)  Google NS asks Akamai NS including client-subnet 4)  Akamai NS looks up client-subnet and replies with IP of optimal cluster to serve content (local cluster in that ISP) 5)  ISP NS replies to end-user who 6)  requests content from local Cluster end-user Google NS 8.8.8.8 root/tld/intermediate NS (recursive lookup until reaching authoritative NS) Akamai NS Local Akamai Cluster at ISP 5.6.7.8 example.com? example.com? a212.g.akamai.net 5.6.7.8 1 3 6 2 NS 8.8.8.8 (whitelisted for edns0) client subnet=1.1.1.0/24 best cluster = 5.6.7.8 4 5
  • 17. ©2012 AKAMAI | FASTER FORWARDTM Only prefix, not full IP transmitted CDN already gets your full IP anyways (in the subsequent HTTP request) Set source-netmask/address to 0.0.0.0/0 •  Google DNS honors forwards request with 0.0.0.0/0 •  OpenDNS ignores at time of writing Do not use client-subnet capable resolver if intention is to hide client origin Privacy concerns
  • 18. ©2012 AKAMAI | FASTER FORWARDTM Scanning/walking the mapping algorithm •  double whitelist (at recursive resolver & auth NS) •  enforced replacement of client-tagged edns0 option by Google & OpenDNS before being send to Akamai Amplification •  double whitelist •  echoing request in reply •  standard rate limiting methods work Cache pollution of recursive resolver can be a problem •  separate reply stored for each prefix Security concerns
  • 19. ©2012 AKAMAI | FASTER FORWARDTM Google/OpenDNS currently always send client-subnet as /24 (for privacy/caching-efficiency reasons) Mapping system has view of internet from it’s partners with differing prefix-lenghts •  client-subnet more specific than Akamai •  e.g. Akamai has /20 from partner-> can be mapped •  scope-netmask send to resolver for caching purposes •  client-subnet less specific than Akamai •  e.g. Akamai has /26s from partner in different locations -> no clear choice to map -> will take first match •  also send scope-netmask to resolver for information Prefix-Length
  • 20. ©2012 AKAMAI | FASTER FORWARDTM 2"Jan& 9"Jan& 16"Jan& 23"Jan& 30"Jan& 6"Feb& 13"Feb& 20"Feb& 27"Feb& average&distance& Open&DNS&India& Improvements with edns0 client-subnet
  • 21. ©2012 AKAMAI | FASTER FORWARDTM can be used within a partner’s network instead of distributed DNS architecture A partner might have a widespread network (especially in countries spanning large geographical areas and/or different islands like Australia or Indonesia) •  Would like to deploy clusters around the network to localize traffic •  But central DNS infrastructure makes mapping traffic accurately difficult Additional Use-Case
  • 22. ©2012 AKAMAI | FASTER FORWARDTM Batam Jakarta (NS) Surabaya Banjamarsin Makassar Denpasar Akamai Cluster Nameserver Example for distributed architecture
  • 23. ©2012 AKAMAI | FASTER FORWARDTM Deploy additional NS in all locations •  Benefit: better DNS responses (all traffic), can use anycast frontend IP to simplify administration/failover (announcing same frontend IP to all end-users, different backend), easy to implement, easy to manage •  Drawback: some additional CAPEX Virtual (backend) IPs on existing NS given to different geographic sets of end-users •  Benefit: no additional CAPEX, easy to implement •  Drawback: more difficult to administer, will require manual allocation of IPs to clusters on CDN side, no clear fallback EDNS0 client-subnet within the providers network •  Benefit: no hardware changes, can scale for very small clusters in remote places •  Drawback: needs compatible NS software, high overhead for management/set up Solutions
  • 24. ©2012 AKAMAI | FASTER FORWARDTM Matt Jansen mj@akamai.com Questions?