SlideShare a Scribd company logo
HTTP at your local BigCo:How the internet sausage gets made	 Peter Griess @pgriess
Goals and non-goals Basics of TCP/IP, DNS and HTTP and how they work together; pitfalls and optimizations A 1,000 foot view of scaling out HTTP infrastructure All manner of load balancing / traffic shaping Living on the edge Not: how to make a fast application (database access, rendering performance, etc)
Background: DNS Map hostnames to IP(s) www.facebook.com 69.171.229.12, 69.171.228.40 Resolution process Recursion (and what does the DNS server see?) Caching Latencies: on-host, cached in LAN, cached at ISP, miss
Background: TCP Stateful protocol Negotiated by a synchronous 3-way handshake: 2xRTT before first byte is sent! e.g. USA => South America ~250ms RTT Seamless failover is hard (but not impossible) Load balancing must be aware of flows
Background: HTTP Layered on top of TCP/TLS Has some useful bits Compression Connection re-use Pipelining Caching Kind of sucks Headers on all requests/responses Compression on bodies only Pipelining has to be disabled most of the time Pipelining suffers from head-of-line blocking
mycutekittens.tv 68.193.17.4 Big bad internet HTTP
Problem?
Problem Availability Server goes down (kernel panic?) Network goes down (cable cut?) Datacenter goes down (EC2?) Overload Shed load (good, can be transparent) Get infinitely slow (not good)
mycutekittens.tv: multi-server Big bad internet ???
We have options DNS load balancing IP load balancing HTTP load balancing
DNS load balancing mycutekittens.tv resolves to IPs: A, B, C, D Add new IPs to scale out Remove IPs when hosts go down Benefits Don’t need extra hardware to do load balancing Can span datacenters DNS servers are cheap / fast Drawbacks Hotspots due to caching Hotspots due to ordering in result list Hotspots due to resolver size TTL / flexibility trade-off
mycutekittens.tv: DNS Big bad internet DNS Server DNS 68.193.17.4 68.193.17.5 68.193.17.6
IP load balancing (1) mycutekittens.tv resolves to 1 public IP owned by an IP load balancer Add new backend hosts w/ private IPs to scale out Load balancer health-checks hosts actively or passively to avoid dead hosts Scheduling policies vs. failover DSR
IP load balancing (2) Benefits Only 1 public IP (high DNS TTL) Backend network capacity/membership transparent to the internet Cheap-ish Failover is possible, not insanely difficult Drawbacks Can’t do what you can with HTTP
mycutekittens.tv: IP 10.0.0.1 Big bad internet 10.0.0.2 GW 68.193.17.4 10.0.0.3 LB
HTTP load balancing (1) mycutekittens.tv resolves to 1 public IP owned by an HTTP load balancer Largely same as IP load balancing Terminates TCP connections (sees all bytes) Can make routing decisions based on HTTP Can autonomously serve requests (caching, access control, etc) Examples: Send requests for /foo/* to pool A 401 requests without cookie Q
HTTP load balancing (2) Benefits Largely the same as IP More flexible rules Can terminate TLS (security+, cost+) Drawbacks No DSR Failover difficult Not as performant as IP
mycutekittens.tv: HTTP 10.0.0.1 Big bad internet 10.0.0.2 68.193.17.4 LB HTTP(S) 10.0.0.3
mycutekittens.tv: MOAR Eventually a single LB is going to be a problem Not enough capacity Availability Turtles all the day way down LB of LBs! DNS load balancing between datacenters …
HTTPS: myths and reality Too computationally expensive Only a few percent (imperialviolet.org); is your webserver actually CPU bound? doubt it SSL acceleration cards, GPUs, etc Too much latency Handshaking is 5-7xRTT Session resume False start Snap start Caching breaks
My latency is huge in Japan RTT to USA is (or any single DC) can be huge Re-use connections (connection: keep-alive) Send work in parallel (pipelining) Use compression (content-encoding) Lots of tricks for static resources (bundling, CDNs, caching, etc) Pre-fetch data
Let’s get crazy: SPDY Don’t limit yourself to HTTP; use a different protocol SPDY developed by Google, supported by Chrome, google.com (and soon facebook.com) Connection re-use w/o head-of-line blocking Headers always compressed Always SSL (but breaks caching)
Let’s get crazy: TCP termination Synchronous RTTs: the silent killer Opening new TCP connections is very costly Run proxies close to users and proxy traffic back to core using optimized protocol Low RTT to proxy Do SPDY-like tricks between edge + core Potentially faster network to core than public internet Advertise these proxies via DNS Geo-targetting AS-adjacency Akamai CDN does this, sort of
Let’s get crazy: DNS anycast Remember how DNS resolutions were slow? DNS servers could be far away from a user Advertise multiple network routes for the same DNS IP, let the IP stack pick the closest one

More Related Content

What's hot

Introducing HTTP/2
Introducing HTTP/2Introducing HTTP/2
Introducing HTTP/2
Ido Flatow
 
HTTP/2 Introduction
HTTP/2 IntroductionHTTP/2 Introduction
HTTP/2 Introduction
Walter Liu
 
So that was HTTP/2, what's next?
So that was HTTP/2, what's next?So that was HTTP/2, what's next?
So that was HTTP/2, what's next?
Daniel Stenberg
 
Load Balancing with HAproxy
Load Balancing with HAproxyLoad Balancing with HAproxy
Load Balancing with HAproxy
Brendan Jennings
 
Web server
Web serverWeb server
Web server
Sai Visal
 
HTTP/2: What no one is telling you
HTTP/2: What no one is telling youHTTP/2: What no one is telling you
HTTP/2: What no one is telling you
Fastly
 
Http2 right now
Http2 right nowHttp2 right now
Http2 right now
Daniel Stenberg
 
HTTP/2 for Developers
HTTP/2 for DevelopersHTTP/2 for Developers
HTTP/2 for Developers
Svetlin Nakov
 
Introduction to HTTP/2
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2
Ido Flatow
 
HTTP2 is Here!
HTTP2 is Here!HTTP2 is Here!
HTTP2 is Here!
Andy Davies
 
HTTP/2 standard for video streaming
HTTP/2 standard for video streamingHTTP/2 standard for video streaming
HTTP/2 standard for video streaming
Hung Thai Le
 
HTTP 2.0 – What do I need to know?
HTTP 2.0 – What do I need to know? HTTP 2.0 – What do I need to know?
HTTP 2.0 – What do I need to know?
Sigma Software
 
Http/2
Http/2Http/2
ChinaNetCloud Training - HAProxy Intro
ChinaNetCloud Training - HAProxy IntroChinaNetCloud Training - HAProxy Intro
ChinaNetCloud Training - HAProxy Intro
ChinaNetCloud
 
Netkitmig
NetkitmigNetkitmig
Netkitmig
renyufei
 
Web Server Load Balancer
Web Server Load BalancerWeb Server Load Balancer
Web Server Load Balancer
MobME Technical
 
Choosing A Proxy Server - Apachecon 2014
Choosing A Proxy Server - Apachecon 2014Choosing A Proxy Server - Apachecon 2014
Choosing A Proxy Server - Apachecon 2014
bryan_call
 
6 technical-dns-workshop-day3
6 technical-dns-workshop-day36 technical-dns-workshop-day3
6 technical-dns-workshop-day3
DNS Entrepreneurship Center
 
HAProxy scale out using open source
HAProxy scale out using open sourceHAProxy scale out using open source
HAProxy scale out using open source
Ingo Walz
 
SPDY and HTTP/2
SPDY and HTTP/2SPDY and HTTP/2
SPDY and HTTP/2
Fabian Frank
 

What's hot (20)

Introducing HTTP/2
Introducing HTTP/2Introducing HTTP/2
Introducing HTTP/2
 
HTTP/2 Introduction
HTTP/2 IntroductionHTTP/2 Introduction
HTTP/2 Introduction
 
So that was HTTP/2, what's next?
So that was HTTP/2, what's next?So that was HTTP/2, what's next?
So that was HTTP/2, what's next?
 
Load Balancing with HAproxy
Load Balancing with HAproxyLoad Balancing with HAproxy
Load Balancing with HAproxy
 
Web server
Web serverWeb server
Web server
 
HTTP/2: What no one is telling you
HTTP/2: What no one is telling youHTTP/2: What no one is telling you
HTTP/2: What no one is telling you
 
Http2 right now
Http2 right nowHttp2 right now
Http2 right now
 
HTTP/2 for Developers
HTTP/2 for DevelopersHTTP/2 for Developers
HTTP/2 for Developers
 
Introduction to HTTP/2
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2
 
HTTP2 is Here!
HTTP2 is Here!HTTP2 is Here!
HTTP2 is Here!
 
HTTP/2 standard for video streaming
HTTP/2 standard for video streamingHTTP/2 standard for video streaming
HTTP/2 standard for video streaming
 
HTTP 2.0 – What do I need to know?
HTTP 2.0 – What do I need to know? HTTP 2.0 – What do I need to know?
HTTP 2.0 – What do I need to know?
 
Http/2
Http/2Http/2
Http/2
 
ChinaNetCloud Training - HAProxy Intro
ChinaNetCloud Training - HAProxy IntroChinaNetCloud Training - HAProxy Intro
ChinaNetCloud Training - HAProxy Intro
 
Netkitmig
NetkitmigNetkitmig
Netkitmig
 
Web Server Load Balancer
Web Server Load BalancerWeb Server Load Balancer
Web Server Load Balancer
 
Choosing A Proxy Server - Apachecon 2014
Choosing A Proxy Server - Apachecon 2014Choosing A Proxy Server - Apachecon 2014
Choosing A Proxy Server - Apachecon 2014
 
6 technical-dns-workshop-day3
6 technical-dns-workshop-day36 technical-dns-workshop-day3
6 technical-dns-workshop-day3
 
HAProxy scale out using open source
HAProxy scale out using open sourceHAProxy scale out using open source
HAProxy scale out using open source
 
SPDY and HTTP/2
SPDY and HTTP/2SPDY and HTTP/2
SPDY and HTTP/2
 

Viewers also liked

A póker titkai mike caro
A póker titkai   mike caroA póker titkai   mike caro
A póker titkai mike carocsiti
 
Introwebinargettingdiversebuttsthedwcgroup7 11-dc-edits-2
Introwebinargettingdiversebuttsthedwcgroup7 11-dc-edits-2Introwebinargettingdiversebuttsthedwcgroup7 11-dc-edits-2
Introwebinargettingdiversebuttsthedwcgroup7 11-dc-edits-2
western justice center
 
Slidesharetest
SlidesharetestSlidesharetest
Slidesharetest
western justice center
 
The New Black Test
The New Black   TestThe New Black   Test
The New Black Test
Jasoneldridge
 
donotusethisversion-dc-edits
donotusethisversion-dc-editsdonotusethisversion-dc-edits
donotusethisversion-dc-edits
western justice center
 
Augmented Reality
Augmented RealityAugmented Reality
Augmented Reality
yasenslavov
 

Viewers also liked (7)

A póker titkai mike caro
A póker titkai   mike caroA póker titkai   mike caro
A póker titkai mike caro
 
Itay
ItayItay
Itay
 
Introwebinargettingdiversebuttsthedwcgroup7 11-dc-edits-2
Introwebinargettingdiversebuttsthedwcgroup7 11-dc-edits-2Introwebinargettingdiversebuttsthedwcgroup7 11-dc-edits-2
Introwebinargettingdiversebuttsthedwcgroup7 11-dc-edits-2
 
Slidesharetest
SlidesharetestSlidesharetest
Slidesharetest
 
The New Black Test
The New Black   TestThe New Black   Test
The New Black Test
 
donotusethisversion-dc-edits
donotusethisversion-dc-editsdonotusethisversion-dc-edits
donotusethisversion-dc-edits
 
Augmented Reality
Augmented RealityAugmented Reality
Augmented Reality
 

Similar to HTTP at your local BigCo

Next generation web protocols
Next generation web protocolsNext generation web protocols
Next generation web protocols
Daniel Austin
 
HTTP/2 turns 3 years old // Web Performance Meetup wao.io 20180612
HTTP/2 turns 3 years old // Web Performance Meetup wao.io 20180612HTTP/2 turns 3 years old // Web Performance Meetup wao.io 20180612
HTTP/2 turns 3 years old // Web Performance Meetup wao.io 20180612
Avenga Germany GmbH
 
Computer network (10)
Computer network (10)Computer network (10)
Computer network (10)
NYversity
 
Data center disaster recovery.ppt
Data center disaster recovery.ppt Data center disaster recovery.ppt
Data center disaster recovery.ppt
omalreda
 
Http2
Http2Http2
HTML5, HTTP2, and You 1.1
HTML5, HTTP2, and You 1.1HTML5, HTTP2, and You 1.1
HTML5, HTTP2, and You 1.1
Daniel Austin
 
Scaling Streaming - Concepts, Research, Goals
Scaling Streaming - Concepts, Research, GoalsScaling Streaming - Concepts, Research, Goals
Scaling Streaming - Concepts, Research, Goals
kamaelian
 
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014
Amazon Web Services
 
From Fast To SPDY
From Fast To SPDYFrom Fast To SPDY
From Fast To SPDY
Mike Belshe
 
Improving performance by changing the rules from fast to SPDY
Improving performance by changing the rules   from fast to SPDYImproving performance by changing the rules   from fast to SPDY
Improving performance by changing the rules from fast to SPDY
Cotendo
 
Linux HTTPS/TCP/IP Stack for the Fast and Secure Web
Linux HTTPS/TCP/IP Stack for the Fast and Secure WebLinux HTTPS/TCP/IP Stack for the Fast and Secure Web
Linux HTTPS/TCP/IP Stack for the Fast and Secure Web
All Things Open
 
Serverless (Distributed computing)
Serverless (Distributed computing)Serverless (Distributed computing)
Serverless (Distributed computing)
Sri Prasanna
 
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the Web
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the WebCleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the Web
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the Web
Steffen Gebert
 
My other computer_is_a_datacentre
My other computer_is_a_datacentreMy other computer_is_a_datacentre
My other computer_is_a_datacentre
Steve Loughran
 
HBaseCon 2015: HBase at Scale in an Online and High-Demand Environment
HBaseCon 2015: HBase at Scale in an Online and  High-Demand EnvironmentHBaseCon 2015: HBase at Scale in an Online and  High-Demand Environment
HBaseCon 2015: HBase at Scale in an Online and High-Demand Environment
HBaseCon
 
Http2 in practice
Http2 in practiceHttp2 in practice
Http2 in practice
Patrick Meenan
 
Stephan Ewen - Experiences running Flink at Very Large Scale
Stephan Ewen -  Experiences running Flink at Very Large ScaleStephan Ewen -  Experiences running Flink at Very Large Scale
Stephan Ewen - Experiences running Flink at Very Large Scale
Ververica
 
Network and distributed systems
Network and distributed systemsNetwork and distributed systems
Network and distributed systems
Sri Prasanna
 
MNPHP Scalable Architecture 101 - Feb 3 2011
MNPHP Scalable Architecture 101 - Feb 3 2011MNPHP Scalable Architecture 101 - Feb 3 2011
MNPHP Scalable Architecture 101 - Feb 3 2011
Mike Willbanks
 
Knowledge share about scalable application architecture
Knowledge share about scalable application architectureKnowledge share about scalable application architecture
Knowledge share about scalable application architecture
AHM Pervej Kabir
 

Similar to HTTP at your local BigCo (20)

Next generation web protocols
Next generation web protocolsNext generation web protocols
Next generation web protocols
 
HTTP/2 turns 3 years old // Web Performance Meetup wao.io 20180612
HTTP/2 turns 3 years old // Web Performance Meetup wao.io 20180612HTTP/2 turns 3 years old // Web Performance Meetup wao.io 20180612
HTTP/2 turns 3 years old // Web Performance Meetup wao.io 20180612
 
Computer network (10)
Computer network (10)Computer network (10)
Computer network (10)
 
Data center disaster recovery.ppt
Data center disaster recovery.ppt Data center disaster recovery.ppt
Data center disaster recovery.ppt
 
Http2
Http2Http2
Http2
 
HTML5, HTTP2, and You 1.1
HTML5, HTTP2, and You 1.1HTML5, HTTP2, and You 1.1
HTML5, HTTP2, and You 1.1
 
Scaling Streaming - Concepts, Research, Goals
Scaling Streaming - Concepts, Research, GoalsScaling Streaming - Concepts, Research, Goals
Scaling Streaming - Concepts, Research, Goals
 
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014
 
From Fast To SPDY
From Fast To SPDYFrom Fast To SPDY
From Fast To SPDY
 
Improving performance by changing the rules from fast to SPDY
Improving performance by changing the rules   from fast to SPDYImproving performance by changing the rules   from fast to SPDY
Improving performance by changing the rules from fast to SPDY
 
Linux HTTPS/TCP/IP Stack for the Fast and Secure Web
Linux HTTPS/TCP/IP Stack for the Fast and Secure WebLinux HTTPS/TCP/IP Stack for the Fast and Secure Web
Linux HTTPS/TCP/IP Stack for the Fast and Secure Web
 
Serverless (Distributed computing)
Serverless (Distributed computing)Serverless (Distributed computing)
Serverless (Distributed computing)
 
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the Web
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the WebCleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the Web
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the Web
 
My other computer_is_a_datacentre
My other computer_is_a_datacentreMy other computer_is_a_datacentre
My other computer_is_a_datacentre
 
HBaseCon 2015: HBase at Scale in an Online and High-Demand Environment
HBaseCon 2015: HBase at Scale in an Online and  High-Demand EnvironmentHBaseCon 2015: HBase at Scale in an Online and  High-Demand Environment
HBaseCon 2015: HBase at Scale in an Online and High-Demand Environment
 
Http2 in practice
Http2 in practiceHttp2 in practice
Http2 in practice
 
Stephan Ewen - Experiences running Flink at Very Large Scale
Stephan Ewen -  Experiences running Flink at Very Large ScaleStephan Ewen -  Experiences running Flink at Very Large Scale
Stephan Ewen - Experiences running Flink at Very Large Scale
 
Network and distributed systems
Network and distributed systemsNetwork and distributed systems
Network and distributed systems
 
MNPHP Scalable Architecture 101 - Feb 3 2011
MNPHP Scalable Architecture 101 - Feb 3 2011MNPHP Scalable Architecture 101 - Feb 3 2011
MNPHP Scalable Architecture 101 - Feb 3 2011
 
Knowledge share about scalable application architecture
Knowledge share about scalable application architectureKnowledge share about scalable application architecture
Knowledge share about scalable application architecture
 

Recently uploaded

53286592-Global-Entrepreneurship-and-the-Successful-Growth-Strategies-of-Earl...
53286592-Global-Entrepreneurship-and-the-Successful-Growth-Strategies-of-Earl...53286592-Global-Entrepreneurship-and-the-Successful-Growth-Strategies-of-Earl...
53286592-Global-Entrepreneurship-and-the-Successful-Growth-Strategies-of-Earl...
MarynaYurchenko2
 
欧洲杯下注-欧洲杯下注下注app-欧洲杯下注盘口app|【​网址​🎉ac22.net🎉​】
欧洲杯下注-欧洲杯下注下注app-欧洲杯下注盘口app|【​网址​🎉ac22.net🎉​】欧洲杯下注-欧洲杯下注下注app-欧洲杯下注盘口app|【​网址​🎉ac22.net🎉​】
欧洲杯下注-欧洲杯下注下注app-欧洲杯下注盘口app|【​网址​🎉ac22.net🎉​】
asjpkomrxo
 
Charging and Fueling Infrastructure Grant: Round 2 by Brandt Hertenstein
Charging and Fueling Infrastructure Grant: Round 2 by Brandt HertensteinCharging and Fueling Infrastructure Grant: Round 2 by Brandt Hertenstein
Charging and Fueling Infrastructure Grant: Round 2 by Brandt Hertenstein
Forth
 
How driver behavior monitoring helps fleet managers?
How driver behavior monitoring helps fleet managers?How driver behavior monitoring helps fleet managers?
How driver behavior monitoring helps fleet managers?
jennifermiller8137
 
EV Charging at MFH Properties by Whitaker Jamieson
EV Charging at MFH Properties by Whitaker JamiesonEV Charging at MFH Properties by Whitaker Jamieson
EV Charging at MFH Properties by Whitaker Jamieson
Forth
 
Infineon_AURIX_HSM Revealed_Training_Slides.pdf
Infineon_AURIX_HSM Revealed_Training_Slides.pdfInfineon_AURIX_HSM Revealed_Training_Slides.pdf
Infineon_AURIX_HSM Revealed_Training_Slides.pdf
maicuongdt21
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
u2cz10zq
 
原版制作(澳洲WSU毕业证书)西悉尼大学毕业证文凭证书一模一样
原版制作(澳洲WSU毕业证书)西悉尼大学毕业证文凭证书一模一样原版制作(澳洲WSU毕业证书)西悉尼大学毕业证文凭证书一模一样
原版制作(澳洲WSU毕业证书)西悉尼大学毕业证文凭证书一模一样
g1inbfro
 
定制(london学位证书)英国伦敦大学毕业证本科学历原版一模一样
定制(london学位证书)英国伦敦大学毕业证本科学历原版一模一样定制(london学位证书)英国伦敦大学毕业证本科学历原版一模一样
定制(london学位证书)英国伦敦大学毕业证本科学历原版一模一样
utuvvas
 
快速办理(napier毕业证书)英国龙比亚大学毕业证在读证明一模一样
快速办理(napier毕业证书)英国龙比亚大学毕业证在读证明一模一样快速办理(napier毕业证书)英国龙比亚大学毕业证在读证明一模一样
快速办理(napier毕业证书)英国龙比亚大学毕业证在读证明一模一样
78tq3hi2
 
按照学校原版(UniSA文凭证书)南澳大学毕业证快速办理
按照学校原版(UniSA文凭证书)南澳大学毕业证快速办理按照学校原版(UniSA文凭证书)南澳大学毕业证快速办理
按照学校原版(UniSA文凭证书)南澳大学毕业证快速办理
ggany
 
car rentals in nassau bahamas | atv rental nassau bahamas
car rentals in nassau bahamas | atv rental nassau bahamascar rentals in nassau bahamas | atv rental nassau bahamas
car rentals in nassau bahamas | atv rental nassau bahamas
justinwilson0857
 
Charging Fueling & Infrastructure (CFI) Program Resources by Cat Plein
Charging Fueling & Infrastructure (CFI) Program Resources by Cat PleinCharging Fueling & Infrastructure (CFI) Program Resources by Cat Plein
Charging Fueling & Infrastructure (CFI) Program Resources by Cat Plein
Forth
 
一比一原版南昆士兰大学毕业证(USQ毕业证书)学历如何办理
一比一原版南昆士兰大学毕业证(USQ毕业证书)学历如何办理一比一原版南昆士兰大学毕业证(USQ毕业证书)学历如何办理
一比一原版南昆士兰大学毕业证(USQ毕业证书)学历如何办理
pycfbo
 
一比一原版皇家墨尔本理工大学毕业证(RMIT毕业证书)学历如何办理
一比一原版皇家墨尔本理工大学毕业证(RMIT毕业证书)学历如何办理一比一原版皇家墨尔本理工大学毕业证(RMIT毕业证书)学历如何办理
一比一原版皇家墨尔本理工大学毕业证(RMIT毕业证书)学历如何办理
pycfbo
 
Kenwood DDX71/491/471/371/3108/30718/271/2071 User Manual
Kenwood DDX71/491/471/371/3108/30718/271/2071 User ManualKenwood DDX71/491/471/371/3108/30718/271/2071 User Manual
Kenwood DDX71/491/471/371/3108/30718/271/2071 User Manual
derekmelino
 
EV Charging at Multifamily Properties by Kevin Donnelly
EV Charging at Multifamily Properties by Kevin DonnellyEV Charging at Multifamily Properties by Kevin Donnelly
EV Charging at Multifamily Properties by Kevin Donnelly
Forth
 
原版定做(mmu学位证书)英国曼彻斯特城市大学毕业证本科文凭原版一模一样
原版定做(mmu学位证书)英国曼彻斯特城市大学毕业证本科文凭原版一模一样原版定做(mmu学位证书)英国曼彻斯特城市大学毕业证本科文凭原版一模一样
原版定做(mmu学位证书)英国曼彻斯特城市大学毕业证本科文凭原版一模一样
utuvvas
 
一比一原版(Columbia文凭证书)哥伦比亚大学毕业证如何办理
一比一原版(Columbia文凭证书)哥伦比亚大学毕业证如何办理一比一原版(Columbia文凭证书)哥伦比亚大学毕业证如何办理
一比一原版(Columbia文凭证书)哥伦比亚大学毕业证如何办理
afkxen
 
Top-Quality AC Service for Mini Cooper Optimal Cooling Performance
Top-Quality AC Service for Mini Cooper Optimal Cooling PerformanceTop-Quality AC Service for Mini Cooper Optimal Cooling Performance
Top-Quality AC Service for Mini Cooper Optimal Cooling Performance
Motor Haus
 

Recently uploaded (20)

53286592-Global-Entrepreneurship-and-the-Successful-Growth-Strategies-of-Earl...
53286592-Global-Entrepreneurship-and-the-Successful-Growth-Strategies-of-Earl...53286592-Global-Entrepreneurship-and-the-Successful-Growth-Strategies-of-Earl...
53286592-Global-Entrepreneurship-and-the-Successful-Growth-Strategies-of-Earl...
 
欧洲杯下注-欧洲杯下注下注app-欧洲杯下注盘口app|【​网址​🎉ac22.net🎉​】
欧洲杯下注-欧洲杯下注下注app-欧洲杯下注盘口app|【​网址​🎉ac22.net🎉​】欧洲杯下注-欧洲杯下注下注app-欧洲杯下注盘口app|【​网址​🎉ac22.net🎉​】
欧洲杯下注-欧洲杯下注下注app-欧洲杯下注盘口app|【​网址​🎉ac22.net🎉​】
 
Charging and Fueling Infrastructure Grant: Round 2 by Brandt Hertenstein
Charging and Fueling Infrastructure Grant: Round 2 by Brandt HertensteinCharging and Fueling Infrastructure Grant: Round 2 by Brandt Hertenstein
Charging and Fueling Infrastructure Grant: Round 2 by Brandt Hertenstein
 
How driver behavior monitoring helps fleet managers?
How driver behavior monitoring helps fleet managers?How driver behavior monitoring helps fleet managers?
How driver behavior monitoring helps fleet managers?
 
EV Charging at MFH Properties by Whitaker Jamieson
EV Charging at MFH Properties by Whitaker JamiesonEV Charging at MFH Properties by Whitaker Jamieson
EV Charging at MFH Properties by Whitaker Jamieson
 
Infineon_AURIX_HSM Revealed_Training_Slides.pdf
Infineon_AURIX_HSM Revealed_Training_Slides.pdfInfineon_AURIX_HSM Revealed_Training_Slides.pdf
Infineon_AURIX_HSM Revealed_Training_Slides.pdf
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
 
原版制作(澳洲WSU毕业证书)西悉尼大学毕业证文凭证书一模一样
原版制作(澳洲WSU毕业证书)西悉尼大学毕业证文凭证书一模一样原版制作(澳洲WSU毕业证书)西悉尼大学毕业证文凭证书一模一样
原版制作(澳洲WSU毕业证书)西悉尼大学毕业证文凭证书一模一样
 
定制(london学位证书)英国伦敦大学毕业证本科学历原版一模一样
定制(london学位证书)英国伦敦大学毕业证本科学历原版一模一样定制(london学位证书)英国伦敦大学毕业证本科学历原版一模一样
定制(london学位证书)英国伦敦大学毕业证本科学历原版一模一样
 
快速办理(napier毕业证书)英国龙比亚大学毕业证在读证明一模一样
快速办理(napier毕业证书)英国龙比亚大学毕业证在读证明一模一样快速办理(napier毕业证书)英国龙比亚大学毕业证在读证明一模一样
快速办理(napier毕业证书)英国龙比亚大学毕业证在读证明一模一样
 
按照学校原版(UniSA文凭证书)南澳大学毕业证快速办理
按照学校原版(UniSA文凭证书)南澳大学毕业证快速办理按照学校原版(UniSA文凭证书)南澳大学毕业证快速办理
按照学校原版(UniSA文凭证书)南澳大学毕业证快速办理
 
car rentals in nassau bahamas | atv rental nassau bahamas
car rentals in nassau bahamas | atv rental nassau bahamascar rentals in nassau bahamas | atv rental nassau bahamas
car rentals in nassau bahamas | atv rental nassau bahamas
 
Charging Fueling & Infrastructure (CFI) Program Resources by Cat Plein
Charging Fueling & Infrastructure (CFI) Program Resources by Cat PleinCharging Fueling & Infrastructure (CFI) Program Resources by Cat Plein
Charging Fueling & Infrastructure (CFI) Program Resources by Cat Plein
 
一比一原版南昆士兰大学毕业证(USQ毕业证书)学历如何办理
一比一原版南昆士兰大学毕业证(USQ毕业证书)学历如何办理一比一原版南昆士兰大学毕业证(USQ毕业证书)学历如何办理
一比一原版南昆士兰大学毕业证(USQ毕业证书)学历如何办理
 
一比一原版皇家墨尔本理工大学毕业证(RMIT毕业证书)学历如何办理
一比一原版皇家墨尔本理工大学毕业证(RMIT毕业证书)学历如何办理一比一原版皇家墨尔本理工大学毕业证(RMIT毕业证书)学历如何办理
一比一原版皇家墨尔本理工大学毕业证(RMIT毕业证书)学历如何办理
 
Kenwood DDX71/491/471/371/3108/30718/271/2071 User Manual
Kenwood DDX71/491/471/371/3108/30718/271/2071 User ManualKenwood DDX71/491/471/371/3108/30718/271/2071 User Manual
Kenwood DDX71/491/471/371/3108/30718/271/2071 User Manual
 
EV Charging at Multifamily Properties by Kevin Donnelly
EV Charging at Multifamily Properties by Kevin DonnellyEV Charging at Multifamily Properties by Kevin Donnelly
EV Charging at Multifamily Properties by Kevin Donnelly
 
原版定做(mmu学位证书)英国曼彻斯特城市大学毕业证本科文凭原版一模一样
原版定做(mmu学位证书)英国曼彻斯特城市大学毕业证本科文凭原版一模一样原版定做(mmu学位证书)英国曼彻斯特城市大学毕业证本科文凭原版一模一样
原版定做(mmu学位证书)英国曼彻斯特城市大学毕业证本科文凭原版一模一样
 
一比一原版(Columbia文凭证书)哥伦比亚大学毕业证如何办理
一比一原版(Columbia文凭证书)哥伦比亚大学毕业证如何办理一比一原版(Columbia文凭证书)哥伦比亚大学毕业证如何办理
一比一原版(Columbia文凭证书)哥伦比亚大学毕业证如何办理
 
Top-Quality AC Service for Mini Cooper Optimal Cooling Performance
Top-Quality AC Service for Mini Cooper Optimal Cooling PerformanceTop-Quality AC Service for Mini Cooper Optimal Cooling Performance
Top-Quality AC Service for Mini Cooper Optimal Cooling Performance
 

HTTP at your local BigCo

  • 1. HTTP at your local BigCo:How the internet sausage gets made Peter Griess @pgriess
  • 2. Goals and non-goals Basics of TCP/IP, DNS and HTTP and how they work together; pitfalls and optimizations A 1,000 foot view of scaling out HTTP infrastructure All manner of load balancing / traffic shaping Living on the edge Not: how to make a fast application (database access, rendering performance, etc)
  • 3. Background: DNS Map hostnames to IP(s) www.facebook.com 69.171.229.12, 69.171.228.40 Resolution process Recursion (and what does the DNS server see?) Caching Latencies: on-host, cached in LAN, cached at ISP, miss
  • 4. Background: TCP Stateful protocol Negotiated by a synchronous 3-way handshake: 2xRTT before first byte is sent! e.g. USA => South America ~250ms RTT Seamless failover is hard (but not impossible) Load balancing must be aware of flows
  • 5. Background: HTTP Layered on top of TCP/TLS Has some useful bits Compression Connection re-use Pipelining Caching Kind of sucks Headers on all requests/responses Compression on bodies only Pipelining has to be disabled most of the time Pipelining suffers from head-of-line blocking
  • 8. Problem Availability Server goes down (kernel panic?) Network goes down (cable cut?) Datacenter goes down (EC2?) Overload Shed load (good, can be transparent) Get infinitely slow (not good)
  • 10. We have options DNS load balancing IP load balancing HTTP load balancing
  • 11. DNS load balancing mycutekittens.tv resolves to IPs: A, B, C, D Add new IPs to scale out Remove IPs when hosts go down Benefits Don’t need extra hardware to do load balancing Can span datacenters DNS servers are cheap / fast Drawbacks Hotspots due to caching Hotspots due to ordering in result list Hotspots due to resolver size TTL / flexibility trade-off
  • 12. mycutekittens.tv: DNS Big bad internet DNS Server DNS 68.193.17.4 68.193.17.5 68.193.17.6
  • 13. IP load balancing (1) mycutekittens.tv resolves to 1 public IP owned by an IP load balancer Add new backend hosts w/ private IPs to scale out Load balancer health-checks hosts actively or passively to avoid dead hosts Scheduling policies vs. failover DSR
  • 14. IP load balancing (2) Benefits Only 1 public IP (high DNS TTL) Backend network capacity/membership transparent to the internet Cheap-ish Failover is possible, not insanely difficult Drawbacks Can’t do what you can with HTTP
  • 15. mycutekittens.tv: IP 10.0.0.1 Big bad internet 10.0.0.2 GW 68.193.17.4 10.0.0.3 LB
  • 16. HTTP load balancing (1) mycutekittens.tv resolves to 1 public IP owned by an HTTP load balancer Largely same as IP load balancing Terminates TCP connections (sees all bytes) Can make routing decisions based on HTTP Can autonomously serve requests (caching, access control, etc) Examples: Send requests for /foo/* to pool A 401 requests without cookie Q
  • 17. HTTP load balancing (2) Benefits Largely the same as IP More flexible rules Can terminate TLS (security+, cost+) Drawbacks No DSR Failover difficult Not as performant as IP
  • 18. mycutekittens.tv: HTTP 10.0.0.1 Big bad internet 10.0.0.2 68.193.17.4 LB HTTP(S) 10.0.0.3
  • 19. mycutekittens.tv: MOAR Eventually a single LB is going to be a problem Not enough capacity Availability Turtles all the day way down LB of LBs! DNS load balancing between datacenters …
  • 20. HTTPS: myths and reality Too computationally expensive Only a few percent (imperialviolet.org); is your webserver actually CPU bound? doubt it SSL acceleration cards, GPUs, etc Too much latency Handshaking is 5-7xRTT Session resume False start Snap start Caching breaks
  • 21. My latency is huge in Japan RTT to USA is (or any single DC) can be huge Re-use connections (connection: keep-alive) Send work in parallel (pipelining) Use compression (content-encoding) Lots of tricks for static resources (bundling, CDNs, caching, etc) Pre-fetch data
  • 22. Let’s get crazy: SPDY Don’t limit yourself to HTTP; use a different protocol SPDY developed by Google, supported by Chrome, google.com (and soon facebook.com) Connection re-use w/o head-of-line blocking Headers always compressed Always SSL (but breaks caching)
  • 23. Let’s get crazy: TCP termination Synchronous RTTs: the silent killer Opening new TCP connections is very costly Run proxies close to users and proxy traffic back to core using optimized protocol Low RTT to proxy Do SPDY-like tricks between edge + core Potentially faster network to core than public internet Advertise these proxies via DNS Geo-targetting AS-adjacency Akamai CDN does this, sort of
  • 24. Let’s get crazy: DNS anycast Remember how DNS resolutions were slow? DNS servers could be far away from a user Advertise multiple network routes for the same DNS IP, let the IP stack pick the closest one