How LinkedIn used TCP Anycast to make the site faster Ritesh Maheshwari Shawn Zandi.

Slides:



Advertisements
Similar presentations
SIP, Firewalls and NATs Oh My!. SIP Summit SIP, Firewalls and NATs, Oh My! Getting SIP Through Firewalls Firewalls Typically.
Advertisements

Module 13: Implementing ISA Server 2004 Enterprise Edition: Site-to-Site VPN Scenario.
Internetworking II: MPLS, Security, and Traffic Engineering
Transitioning to IPv6 April 15,2005 Presented By: Richard Moore PBS Enterprise Technology.
IPv6 Victor T. Norman.
Chapter 8 Managing Windows Server 2008 Network Services
Resolving IP Connectivity Issues Lesson 2. Objectives 2.
NAT Traversal for P2PSIP Philip Matthews Avaya. Peer X Peer Y Peer W 2. P2PSIP Network Establishing new Peer Protocol connection Peer Protocol messages.
© 2006 Cisco Systems, Inc. All rights reserved. MPLS v2.2—2-1 Label Assignment and Distribution Introducing Typical Label Distribution in Frame-Mode MPLS.
Multicast Fundamentals n The communication ways of the hosts n IP multicast n Application level multicast.
A Question of Protocol Geoff Huston APNIC. Originally there was RFC791:
June 2007APTLD Meeting/Dubai ANYCAST Alireza Saleh.ir ccTLD
An Engineering Approach to Computer Networking
11- IP Network Layer4-1. Network Layer4-2 The Internet Network layer forwarding table Host, router network layer functions: Routing protocols path selection.
CDNs & Replication Prof. Vern Paxson EE122 Fall 2007 TAs: Lisa Fowler, Daniel Killebrew, Jorge Ortiz.
Kyushu University Graduate School of Information Science and Electrical Engineering Department of Advanced Information Technology Supervisor: Professor.
COS 420 Day 16. Agenda Assignment 3 Corrected Poor results 1 C and 2 Ds Spring Break?? Assignment 4 Posted Chap Due April 6 Individual Project Presentations.
Understanding Networks Charles Zangla. Network Models Before I can explain how connections are made from across the country, I would like to provide you.
The internet and the WWW
A question of protocol Geoff Huston APNIC 36. Originally there was RFC791: “All hosts must be prepared to accept datagrams of up to 576 octets (whether.
1 Content Distribution Networks. 2 Replication Issues Request distribution: how to transparently distribute requests for content among replication servers.
Module 1: Reviewing the Suite of TCP/IP Protocols.
Day15 IP Space/Setup. IP Suite of protocols –TCP –UDP –ICMP –GRE… Gives us many benefits –Routing of packets over internet –Fragmentation/Reassembly of.
Packet Filtering. 2 Objectives Describe packets and packet filtering Explain the approaches to packet filtering Recommend specific filtering rules.
Redirection and Load Balancing
Syllabus outcomes Describes and applies problem-solving processes when creating solutions Designs, produces and evaluates appropriate solutions.
Presentation on Osi & TCP/IP MODEL
Lecture 2 TCP/IP Protocol Suite Reference: TCP/IP Protocol Suite, 4 th Edition (chapter 2) 1.
Chapter 4. After completion of this chapter, you should be able to: Explain “what is the Internet? And how we connect to the Internet using an ISP. Explain.
Global NetWatch Copyright © 2003 Global NetWatch, Inc. Factors Affecting Web Performance Getting Maximum Performance Out Of Your Web Server.
Configuring Global Server Load Balancing (GSLB)
Examining TCP/IP.
Networks – Network Architecture Network architecture is specification of design principles (including data formats and procedures) for creating a network.
Module 4: Planning, Optimizing, and Troubleshooting DHCP
An Efficient Approach for Content Delivery in Overlay Networks Mohammad Malli Chadi Barakat, Walid Dabbous Planete Project To appear in proceedings of.
Commercial Peering Service Community Attribute Use in Internet2 CPS Caren Litvanyi lead network engineer peering team Internet2 NOC GigaPoP Geeks BOF January.

1 Chapter 7: NAT in Internet and Intranet Designs Designs That Include NAT Essential NAT Design Concepts Data Protection in NAT Designs NAT Design Optimization.
1 TCP/IP Internetting ä Subnet layer ä Links stations on same subnet ä Often IEEE LAN standards ä PPP for telephone connections ä TCP/IP specifies.
Vytautas Valancius, Nick Feamster, Akihiro Nakao, and Jennifer Rexford.
CSC 600 Internetworking with TCP/IP Unit 7: IPv6 (ch. 33) Dr. Cheer-Sun Yang Spring 2001.
Module 10: How Middleboxes Impact Performance
COP 5611 Operating Systems Spring 2010 Dan C. Marinescu Office: HEC 439 B Office hours: M-Wd 2:00-3:00 PM.
Homework 02 NAT 、 DHCP 、 Firewall 、 Proxy. Computer Center, CS, NCTU 2 Basic Knowledge  DHCP Dynamically assigning IPs to clients  NAT Translating addresses.
TCP/IP (Transmission Control Protocol / Internet Protocol)
1 Mean Time to Innocence Your Dashboards are Green – but your end users are still complaining. Now What? Phil Stanhope October 2015.
IP addresses IPv4 and IPv6. IP addresses (IP=Internet Protocol) Each computer connected to the Internet must have a unique IP address.
Internet Protocols. ICMP ICMP – Internet Control Message Protocol Each ICMP message is encapsulated in an IP packet – Treated like any other datagram,
Net 221D:Computer Networks Fundamentals
1 Distributed Monitoring CERNET's experience Xing Li
Topic 6, Lesson 3: The Internet Computer Communications and Networking.
John S. Otto Mario A. Sánchez John P. Rula Fabián E. Bustamante Northwestern, EECS.
IP - Internet Protocol No. 1  Seattle Pacific University IP: The Internet Protocol Kevin Bolding Electrical Engineering Seattle Pacific University.
Introduction and Overview of Network and Telecommunications (contd.)
Mobile IP THE 12 TH MEETING. Mobile IP  Incorporation of mobile users in the network.  Cellular system (e.g., GSM) started with mobility in mind. 
June 11, 2002 Abilene Route Quality Control Initiative Aaron D. Britt Guy Almes Route Optimization.
Quality and Value for the Exam 100% Guarantee to Pass Your Exam Based on Real Exams Scenarios Verified Answers Researched by Industry.
Multi Node Label Routing – A layer 2.5 routing protocol
Border Gateway Protocol
BGP supplement Abhigyan Sharma.
Utilization of Azure CDN for the large file distribution
Internet Networking recitation #12
How do we decide where to deploy to next?
Buy September 2018 Valid Amazon AWS-SysOps Dumps Questions - Amazon AWS-SysOps Braindumps Realexamdumps.com
Ewan MacKellar & Mario Tevanian
I. Basic Network Concepts
Computer Networking TCP/IP Part 2
COS 561: Advanced Computer Networks
COS 561: Advanced Computer Networks
Presentation transcript:

How LinkedIn used TCP Anycast to make the site faster Ritesh Maheshwari Shawn Zandi

Anycast Anycast provides a distributed service via routing. It is not really different than unicast. NLRI object with multiple next-hops. It simply works for both TCP and UDP applications. (use with cautions!)

SF CHI NYC Bob :db8::1/ :db8::1/ :db8::1/56

Anycast with ECMP Not a real issue in today’s internet Consistent flow routing is required (per packet load balancing breaks Anycast) – Pretty Much Standard Most BGP implementations do not load balance across different AS-PATHs even with same size.

Anycast Complications Broken MTU Challenges ICMP message may not reach the intended receiver to report MTU problem. Adjusting MSS can help. RPF Checks Multiple covering prefixes - Only one Service Address should be covered by each advertised prefix /24 or /56 Monitoring!

But! How to measure Anycast effectiveness?

What is RUM? JavaScript (Client-code) to measure performance DNS Time Connection time First Byte Time Download Time Page Load Time

What are PoPs? Point of Presence / PoP Small-scale data centers Proxy servers at LinkedIn (ATS)

Without PoPs BrowserData Center connection time 250ms

Without PoPs BrowserData Center connection time server compute time 250ms 500ms

Without PoPs BrowserData Center connection time 3-5 round trips first byte time + page download time 5 RTTs = 5x250ms = 1250ms server compute time 250ms Total = 2000ms 500ms

With PoPs BrowserData CenterPoP 100ms 250ms

With PoPs BrowserData CenterPoP 100ms connection time Old TCP Connection

With PoPs BrowserData CenterPoP 100ms connection time one round trip first byte time + page download time Old TCP Connection server compute time 500ms

With PoPs BrowserData CenterPoP 100ms connection time one round trip 5 RTTs = 5x100ms = 500ms Total = 1100ms 900 ms gain! first byte time + page download time Old TCP Connection 500ms server compute time

How are users assigned to PoPs? Through DNS: IP handed based on user’s resolver country # Spain $ +short # California $ dig +short

Should India connect to Singapore or Dublin? How to assure optimal PoPs assignment?

RUM beacons Fetch a tiny object from each candidate PoP For each pop_name, 1.Start timer 2.Fetch {pop_name}.perf.linkedin.com/pop/admin 3.Stop timer Send data back to our servers Millions of agents! Analyze data to find “optimal” PoP per country

We can assign countries to new PoPs! CountryPoP Median Beacon Time(ms) ChinaHong Kong434 ChinaDublin1216 ChinaSingapore515 IndiaHong Kong1368 IndiaDublin1042 IndiaSingapore898

We can audit current assignment! CountryIs PoP optimal?Current PoPOptimal PoP IndiaTRUESingapore PakistanFALSESingaporeDublin SpainTRUEDublin BrazilFALSEUS West CoastUS East Coast NetherlandsTRUEDublin UAEFALSEUS West CoastDublin ItalyTRUEDublin MexicoTRUEUS West Coast RussiaFALSEUS West CoastDublin

Plot Twist: Assignment far from optimal About 31% of US traffic gets assigned to a suboptimal PoP. – 45% of East Coast About 10% of traffic globally gets assigned to a suboptimal PoP.

DNS PoP assignment is suboptimal Assignment based on Resolver IP, not Client IP DNS Resolver DNS Resolver PoP US East PoP US East PoP US West New YorkCalifornia

DNS PoP assignment is suboptimal Assignment based on Resolver IP, not Client IP Bad IP to Geo databases – Resolver really in NY, but database says CA

Story so far 1.We built PoPs 2.…used RUM to assign users to Optimal PoPs 3.…found DNS based assignment is suboptimal

Accurate PoP assignment Problem Bug our DNS providers (31% -> 27%) Run our own DNS How about Anycast?

Anycast – One IP, Multiple Servers PoP A PoP B PoP C Bob Client IP, not Resolver IP used! No Geo-IP Databases

How does Anycast compare to DNS? Will anycast send more users to optimal PoP?  Lets test it!

RUM to rescue For each PoP: 1.Announce same anycast IP ( ) 2.Configure a domain ac.perf.linkedin.com to point to

RUM to rescue For each page view: 1.RUM downloads a tiny object : ac.perf.linkedin.com/pop/admin 2.Read X-Li-Pop response header to record which PoP served the object 3.Send this back to LinkedIn with RUM data Data: 1.For each user, the anycast PoP 2.For each user, the optimal PoP (from pop beacons)

Results Region or Country DNS % Optimal Assignment Anycast % Optimal Assignment Illinois7090 Florida7395 Georgia7593 Pennsylvania8595

Results  Region or Country DNS % Optimal Assignment Anycast % Optimal Assignment Arizona6039 Brazil8833 New York7774

Fewer hops != Lower Latency Carriers prefer to haul packets within their own network Peering can create inter-continental short cuts Z Z X X Alice Y Y inter-continental link

Maybe DNS wasn’t so bad Continent-level assignments City / State level assignments

“Regional” Anycast DNS-based 1 anycast IP per continent Ran a RUM experiment, all was fine Z Z X X Alice Y Y inter-continental link

USA Ramp Results Ramp outside USA In progress Ramp outside USA In progress

Story so far 1.We built PoPs 2.…used RUM to assign users to Optimal PoPs 3.…found DNS based assignment is suboptimal 4.…evaluated Anycast as a solution using RUM 5.…now using Anycast to assign users to PoPs Next play: Build more PoPs!

Story: The End Learnings Clients are your measurement agents Trust, but verify You can have a bigger impact if you collaborate Next Play Keep evaluating Anycast Keep building new PoPs

©2014 LinkedIn Corporation. All Rights Reserved.