SlideShare a Scribd company logo
1 of 37
© Copyright SELA Software & Education Labs Ltd. | 14-18 Baruch Hirsch St Bnei Brak, 51202 Israel | www.selagroup.com
Ido Flatow
Introducing HTTP/2
About Me
Senior Architect, Sela Group
Other titles: Microsoft Regional Director, IIS/ASPNET
MVP
Co-author of courses and books
Focus on server, web, and cloud
Manager of the Israeli Web Developers User Group
Agenda
Web (HTTP 1.1) and its current state
What is (HTTP/2) – and how fast is it?
Goals of HTTP/2
HTTP/2 concepts
How to troubleshoot
Web – Current State
HTTP 1.1 is huge
HTTP 1.0 RFC 1945 – released 1996 – 60 pages
HTTP 1.1 RFC 2626 – released 1999 – 176 pages
Now split into 6 documents – RFC 7230 and family
Incomplete implementation of RFC
Eg. HTTP pipelining
Inadequate use of TCP
Average Request +150% in 3 Years
Jan 2012 – Nov 2015
(http://httparchive.org) top 1000 sites
Shortcoming – Current Web
Concurrent connection limit
Head of line blocking
TCP slow start
Latency – page load time
Max Persistent Connections
From HTTP 1.1 RFC:
“Clients that use persistent connections SHOULD limit the number of simultaneous connections
that they maintain to a given server. A single-user client SHOULD NOT maintain more than 2
connections with any server or proxy. … These guidelines are intended to improve HTTP
response times and avoid congestion.”
Firefox 2 – 2
Firefox 3 and on – 6
Opera 9.26 – 4
Opera 12 – 6
Safari 3 – 4
Safari 5 – 6
IE 7 – 2
IE 8 – 6
IE 10 – 8
Chrome – 6
Avg. TCP connections during page load (Last 18 months)
Head-of-Line Blocking (No
Pipelining)
Each connection can
only handle one request
at a time
If current request
blocks, next request will
wait
HTTP 1.1 defines
pipelining, but most
browsers do not
implement it
TCP Slow Start
TCP does not use the full
bandwidth capacity from
start
TCP probes network to
find available capacity
Latency vs Bandwidth
Average web page has over 100 objects to download
Largest impact on page load time is latency, not
bandwidth
https://www.akamai.com/us/en/our-thinking/state-of-the-internet-report
What is 20ms of Latency?
(RTT = Round-trip time)
What Have we Done to Improvise?
Reduce # of requests and latency overhead
Spriting
Concatenation (JavaScript, CSS)
Inlining
Overcome max connection limit
Domain sharding
Problems with “optimizations”
Spriting
Painful and annoying preprocessing, cache
invalidations, slower executions
Inlining
Resource can’t be cached, inflates parent document
by 33% overhead
Concatenation
Less modular code, expensive cache invalidators,
slower execution
Domain sharding
TCP slowstart, excessive DNS lookup, latency
HTTP/2 to the Rescue
Improve latency and less RTT sensitive
Fix pipelining and remove “head of line blocking”
Does not require multiple connections
Achieved all this by retaining semantics of HTTP 1.1
It Began with SPDY
Originally proposed by Google as a wire format
extension to HTTP in 2011
Implements all the major features of HTTP/2
Serves as a testbed for improvements to HTTP
Without the burden of standardization
SPDY became the basis of HTTP/2 in 2012
SPDY will cease to exist in 2016, making way to
HTTP/2
What is HTTP/2
HTTP/2 uses a single, multiplexed connection
Max connection limit per domain can be ignored
HTTP/2 compresses header data and sends it in
a concise, binary format
Better than the plain text format used previously
Less need for popular HTTP 1.1 optimizations
HTTP/2 Specification
Started with SPDY - draft 3
Comprised out of two specifications
HTTP/2 – RFC7540
HPACK (header compression) – RFC7541
Implementations
HTTP/2 over TLS (h2)
HTTP/2 over TCP (h2c)
HTTP/2 Over TLS (h2)
HTTP/2 shipped with TLS as optional
Firefox and Chrome developer teams stated
they will only implement HTTP/2 over TLS
Today, only HTTPS:// is allowed for HTTP/2
TLS must be at least v1.2, with cipher suite
restrictions
https://http2.github.io/http2-spec/#BadCipherSuites
HTTP/2 Over TCP (h2c)
Uses the Upgrade header
Plans to support on IE, already supported in CURL
GET /page HTTP/1.1
Host: server.example.com
Connection: Upgrade, HTTP2-Settings
Upgrade: h2c
HTTP2-Settings: (SETTINGS payload)
HTTP/1.1 200 OK
Content-length: 243
Content-type: text/html
(... HTTP/1.1 response ...)
--- or ---
HTTP/1.1 101 Switching Protocols
Connection: Upgrade
Upgrade: h2c
(... HTTP/2 response ...)
HTTP/2 in One Slide
One TCP connection
Request → Stream
Streams are multiplexed
Streams are prioritized
Binary framing layer
Prioritization
Flow control
Server push
Header compression
(HPACK)
TCP Connections - HTTP 1.1 vs HTTP/2
HTTP 1.1
HTTP/2
Client
http://www.url.com
Client
http://www.url.com
Demo
How to Troubleshoot - Dev Tools
HTTP/2 Support
Servers
Microsoft IIS 10
(Win 10 / Server 2016)
Apache 2.4.12
Nginx 1.9.5
Jetty 9.3
Many more…
Browsers
Edge
IE11 (Windows 10)
Firefox 40+
Chrome 43+
Safari 9+
Opera 32+
iOS Safari 9.1+
Chrome for Android 46+
CURL
Google, Facebook, Twitter and many more are using HTTP/2 already
HTTP/2 is used by 4.5% of all websites (Dec. 2015
http://w3techs.com)
HTTP/2 Multiplexing
Each request/response stream has an ID
Streams comprise of frames (Header, Data…)
TCP connection can have multiple streams
Frames can be interleaved in the TCP channel
Stream dependencies control frame prioritization
Server (IIS/ASP.NET) sees streams as TCP
connections
Frame Types
Frame type Description
DATA HTTP body
HEADERS Header fields
PRIORITY Sender-advised priority of stream
RST_STREAM Signal termination of stream
SETTINGS Configuration parameters for the connection
PUSH_PROMISE Signal a promise (push) of referenced sources
PING Measure roundtrip time and “liveness”
GOAWAY Inform peer to stop creating streams for current connection
WINDOW_UPDATE Connection flow control
CONTINUATION Continue a segment of header block fragments
Header Compression (HPACK)
Demo
How to Troubleshoot - Wireshark
Works with Chrome and Firefox only (Windows, Linux, Mac)
Set SSLKeyLogFile for HTTPS sniffing
Wireshark->Preferences->Protocols->SSL
C:> set SSLKEYLOGFILE=c:tempsslkeylog.log
How to Troubleshoot - Wireshark
How to Troubleshoot - Wireshark
How to Troubleshoot - Wireshark
Demo
Server Push (Promise)
After the server responds with an HTML, it waits for
requests to embedded resources
Server code knows which resources client needs
JavaScript
CSS
Images
HTML pages of future navigation
Why not just push it to the client along with the HTML?
In ASP.NET, use HttpResponse.PushPromise
string path = Request.ApplicationPath;
Response.PushPromise(path + "/Images/1.png");
Response.PushPromise(path + "/Images/2.png");
Demo
Summary
Multiplexing
Multiple requests and responses
Fixes head-of-line blocking problem
Avoid the HTTP 1.1 hacks
Mechanism for request prioritization
Fewer TCP connections
Reduces TCP slow start
Header compression
Server Push
Resources
https://http2.github.io/faq
http://daniel.haxx.se/http2/http2-v1.10.pdf
https://tools.ietf.org/html/rfc7540
http://blogs.iis.net/davidso/http2
http://blogs.msdn.com/b/webdev/archive/2015
/04/30/updates-for-asp-net-4-6-web-forms-
mvc-5-web-api-2.aspx

More Related Content

What's hot

What's hot (20)

IEEE standards 802.3.&802.11
IEEE standards 802.3.&802.11IEEE standards 802.3.&802.11
IEEE standards 802.3.&802.11
 
Ethernet
EthernetEthernet
Ethernet
 
Ethernet - Networking presentation
Ethernet - Networking presentationEthernet - Networking presentation
Ethernet - Networking presentation
 
ePRTC in data centers – GNSS backup as a service (GBaaS)
ePRTC in data centers – GNSS backup as a service (GBaaS)ePRTC in data centers – GNSS backup as a service (GBaaS)
ePRTC in data centers – GNSS backup as a service (GBaaS)
 
Precision Time Protocol
Precision Time ProtocolPrecision Time Protocol
Precision Time Protocol
 
Study of 5G FAPI Specification
Study of 5G FAPI SpecificationStudy of 5G FAPI Specification
Study of 5G FAPI Specification
 
Ethernet technology
Ethernet technologyEthernet technology
Ethernet technology
 
Quic illustrated
Quic illustratedQuic illustrated
Quic illustrated
 
QoS (quality of service)
QoS (quality of service)QoS (quality of service)
QoS (quality of service)
 
29422920 overview-of-ng-sdh
29422920 overview-of-ng-sdh29422920 overview-of-ng-sdh
29422920 overview-of-ng-sdh
 
Ericsson MSC commands
Ericsson MSC commandsEricsson MSC commands
Ericsson MSC commands
 
HTTP/3, QUIC and streaming
HTTP/3, QUIC and streamingHTTP/3, QUIC and streaming
HTTP/3, QUIC and streaming
 
Téncicas de Conmutación
Téncicas de Conmutación Téncicas de Conmutación
Téncicas de Conmutación
 
Udp vs-tcp
Udp vs-tcpUdp vs-tcp
Udp vs-tcp
 
TCP vs UDP / Sumiet23
TCP vs UDP / Sumiet23TCP vs UDP / Sumiet23
TCP vs UDP / Sumiet23
 
GPRS/EDGE Basics / knowledge sharing
GPRS/EDGE Basics /  knowledge sharingGPRS/EDGE Basics /  knowledge sharing
GPRS/EDGE Basics / knowledge sharing
 
Http VS. Https
Http VS. HttpsHttp VS. Https
Http VS. Https
 
Wan technology
Wan technologyWan technology
Wan technology
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocol
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocol
 

Viewers also liked

Better Product Definition with Lean UX and Design Thinking
Better Product Definition with Lean UX and Design ThinkingBetter Product Definition with Lean UX and Design Thinking
Better Product Definition with Lean UX and Design Thinking
Jeff Gothelf
 

Viewers also liked (20)

Company_Profile_Digital_1
Company_Profile_Digital_1Company_Profile_Digital_1
Company_Profile_Digital_1
 
Java 9 modulo les modules devoxx fr 2017
Java 9 modulo les modules devoxx fr 2017Java 9 modulo les modules devoxx fr 2017
Java 9 modulo les modules devoxx fr 2017
 
Agile Wake Up #1 du 01/12/2015 : L'agilité à grande échelle
Agile Wake Up #1 du 01/12/2015 : L'agilité à grande échelleAgile Wake Up #1 du 01/12/2015 : L'agilité à grande échelle
Agile Wake Up #1 du 01/12/2015 : L'agilité à grande échelle
 
Better Product Definition with Lean UX and Design Thinking
Better Product Definition with Lean UX and Design ThinkingBetter Product Definition with Lean UX and Design Thinking
Better Product Definition with Lean UX and Design Thinking
 
WTF - What's The Fold - Bordeaux JUG 2013
WTF - What's The Fold - Bordeaux JUG 2013WTF - What's The Fold - Bordeaux JUG 2013
WTF - What's The Fold - Bordeaux JUG 2013
 
Séminaire en ligne - Email Kinetic - 30 Mai 2017
Séminaire en ligne - Email Kinetic - 30 Mai 2017Séminaire en ligne - Email Kinetic - 30 Mai 2017
Séminaire en ligne - Email Kinetic - 30 Mai 2017
 
Http2 right now
Http2 right nowHttp2 right now
Http2 right now
 
Perf ug comment ne plus rajouter de ram a vos jvm sans savoir pourquoi
Perf ug   comment ne plus rajouter de ram a vos jvm sans savoir pourquoiPerf ug   comment ne plus rajouter de ram a vos jvm sans savoir pourquoi
Perf ug comment ne plus rajouter de ram a vos jvm sans savoir pourquoi
 
Monitoring Compteur EDF avec node.js
Monitoring Compteur EDF avec node.jsMonitoring Compteur EDF avec node.js
Monitoring Compteur EDF avec node.js
 
Retours sur java 8 devoxx fr 2016
Retours sur java 8 devoxx fr 2016Retours sur java 8 devoxx fr 2016
Retours sur java 8 devoxx fr 2016
 
JAX-RS and CDI Bike the (Reactive) Bridge
JAX-RS and CDI Bike the (Reactive) BridgeJAX-RS and CDI Bike the (Reactive) Bridge
JAX-RS and CDI Bike the (Reactive) Bridge
 
What HTTP/2.0 Will Do For You
What HTTP/2.0 Will Do For YouWhat HTTP/2.0 Will Do For You
What HTTP/2.0 Will Do For You
 
Conference MicroServices101 - 1ere partie
Conference MicroServices101 - 1ere partieConference MicroServices101 - 1ere partie
Conference MicroServices101 - 1ere partie
 
How can your applications benefit from Java 9?
How can your applications benefit from Java 9?How can your applications benefit from Java 9?
How can your applications benefit from Java 9?
 
NightClazz Build Tools & Continuous Delivery Avancé
NightClazz Build Tools & Continuous Delivery AvancéNightClazz Build Tools & Continuous Delivery Avancé
NightClazz Build Tools & Continuous Delivery Avancé
 
So, you wanna migrate to Java 9?
So, you wanna migrate to Java 9?So, you wanna migrate to Java 9?
So, you wanna migrate to Java 9?
 
Microbox : Ma toolbox microservices - Julien Roy
Microbox : Ma toolbox microservices - Julien RoyMicrobox : Ma toolbox microservices - Julien Roy
Microbox : Ma toolbox microservices - Julien Roy
 
NightClazz Java 8 Decouverte
NightClazz Java 8 DecouverteNightClazz Java 8 Decouverte
NightClazz Java 8 Decouverte
 
Business intelligence v0.3
Business intelligence v0.3Business intelligence v0.3
Business intelligence v0.3
 
The Case for HTTP/2
The Case for HTTP/2The Case for HTTP/2
The Case for HTTP/2
 

Similar to Introducing HTTP/2

Similar to Introducing HTTP/2 (20)

Http2
Http2Http2
Http2
 
Http/2
Http/2Http/2
Http/2
 
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 era
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 eraHTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 era
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 era
 
HTTP Presentation
HTTP Presentation HTTP Presentation
HTTP Presentation
 
Introduction to HTTP/2
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2
 
Revisiting HTTP/2
Revisiting HTTP/2Revisiting HTTP/2
Revisiting HTTP/2
 
Проксирование HTTP-запросов web-акселератором / Александр Крижановский (Tempe...
Проксирование HTTP-запросов web-акселератором / Александр Крижановский (Tempe...Проксирование HTTP-запросов web-акселератором / Александр Крижановский (Tempe...
Проксирование HTTP-запросов web-акселератором / Александр Крижановский (Tempe...
 
HTML5, HTTP2, and You 1.1
HTML5, HTTP2, and You 1.1HTML5, HTTP2, and You 1.1
HTML5, HTTP2, and You 1.1
 
Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...
Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...
Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...
 
Http2
Http2Http2
Http2
 
Http2 kotlin
Http2   kotlinHttp2   kotlin
Http2 kotlin
 
Next generation web protocols
Next generation web protocolsNext generation web protocols
Next generation web protocols
 
Http2 is here! And why the web needs it
Http2 is here! And why the web needs itHttp2 is here! And why the web needs it
Http2 is here! And why the web needs it
 
Let's use modern protocols everywhere!
Let's use modern protocols everywhere!Let's use modern protocols everywhere!
Let's use modern protocols everywhere!
 
Introduction to HTTP2
Introduction to HTTP2Introduction to HTTP2
Introduction to HTTP2
 
Introduction to HTTP/2
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2
 
Meetup Tech Talk on Web Performance
Meetup Tech Talk on Web PerformanceMeetup Tech Talk on Web Performance
Meetup Tech Talk on Web Performance
 
Introduction to HTTP/2
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2
 
HTTP1.1/2 overview
HTTP1.1/2 overviewHTTP1.1/2 overview
HTTP1.1/2 overview
 
What is SPDY
What is SPDYWhat is SPDY
What is SPDY
 

More from Ido Flatow

More from Ido Flatow (20)

Google Cloud IoT Core
Google Cloud IoT CoreGoogle Cloud IoT Core
Google Cloud IoT Core
 
Production Debugging War Stories
Production Debugging War StoriesProduction Debugging War Stories
Production Debugging War Stories
 
Production debugging web applications
Production debugging web applicationsProduction debugging web applications
Production debugging web applications
 
From VMs to Containers: Introducing Docker Containers for Linux and Windows S...
From VMs to Containers: Introducing Docker Containers for Linux and Windows S...From VMs to Containers: Introducing Docker Containers for Linux and Windows S...
From VMs to Containers: Introducing Docker Containers for Linux and Windows S...
 
Building IoT and Big Data Solutions on Azure
Building IoT and Big Data Solutions on AzureBuilding IoT and Big Data Solutions on Azure
Building IoT and Big Data Solutions on Azure
 
Migrating Customers to Microsoft Azure: Lessons Learned From the Field
Migrating Customers to Microsoft Azure: Lessons Learned From the FieldMigrating Customers to Microsoft Azure: Lessons Learned From the Field
Migrating Customers to Microsoft Azure: Lessons Learned From the Field
 
The Essentials of Building Cloud-Based Web Apps with Azure
The Essentials of Building Cloud-Based Web Apps with AzureThe Essentials of Building Cloud-Based Web Apps with Azure
The Essentials of Building Cloud-Based Web Apps with Azure
 
Debugging your Way through .NET with Visual Studio 2015
Debugging your Way through .NET with Visual Studio 2015Debugging your Way through .NET with Visual Studio 2015
Debugging your Way through .NET with Visual Studio 2015
 
ASP.NET Core 1.0
ASP.NET Core 1.0ASP.NET Core 1.0
ASP.NET Core 1.0
 
Debugging the Web with Fiddler
Debugging the Web with FiddlerDebugging the Web with Fiddler
Debugging the Web with Fiddler
 
EF Core (RC2)
EF Core (RC2)EF Core (RC2)
EF Core (RC2)
 
Learning ASP.NET 5 and MVC 6
Learning ASP.NET 5 and MVC 6Learning ASP.NET 5 and MVC 6
Learning ASP.NET 5 and MVC 6
 
Powershell For Developers
Powershell For DevelopersPowershell For Developers
Powershell For Developers
 
IaaS vs. PaaS: Windows Azure Compute Solutions
IaaS vs. PaaS: Windows Azure Compute SolutionsIaaS vs. PaaS: Windows Azure Compute Solutions
IaaS vs. PaaS: Windows Azure Compute Solutions
 
ASP.NET Web API and HTTP Fundamentals
ASP.NET Web API and HTTP FundamentalsASP.NET Web API and HTTP Fundamentals
ASP.NET Web API and HTTP Fundamentals
 
Advanced WCF Workshop
Advanced WCF WorkshopAdvanced WCF Workshop
Advanced WCF Workshop
 
What's New in WCF 4.5
What's New in WCF 4.5What's New in WCF 4.5
What's New in WCF 4.5
 
IIS for Developers
IIS for DevelopersIIS for Developers
IIS for Developers
 
Debugging with Fiddler
Debugging with FiddlerDebugging with Fiddler
Debugging with Fiddler
 
Caching in Windows Azure
Caching in Windows AzureCaching in Windows Azure
Caching in Windows Azure
 

Recently uploaded

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Recently uploaded (20)

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 

Introducing HTTP/2

  • 1. © Copyright SELA Software & Education Labs Ltd. | 14-18 Baruch Hirsch St Bnei Brak, 51202 Israel | www.selagroup.com Ido Flatow Introducing HTTP/2
  • 2. About Me Senior Architect, Sela Group Other titles: Microsoft Regional Director, IIS/ASPNET MVP Co-author of courses and books Focus on server, web, and cloud Manager of the Israeli Web Developers User Group
  • 3. Agenda Web (HTTP 1.1) and its current state What is (HTTP/2) – and how fast is it? Goals of HTTP/2 HTTP/2 concepts How to troubleshoot
  • 4. Web – Current State HTTP 1.1 is huge HTTP 1.0 RFC 1945 – released 1996 – 60 pages HTTP 1.1 RFC 2626 – released 1999 – 176 pages Now split into 6 documents – RFC 7230 and family Incomplete implementation of RFC Eg. HTTP pipelining Inadequate use of TCP
  • 5. Average Request +150% in 3 Years Jan 2012 – Nov 2015 (http://httparchive.org) top 1000 sites
  • 6. Shortcoming – Current Web Concurrent connection limit Head of line blocking TCP slow start Latency – page load time
  • 7. Max Persistent Connections From HTTP 1.1 RFC: “Clients that use persistent connections SHOULD limit the number of simultaneous connections that they maintain to a given server. A single-user client SHOULD NOT maintain more than 2 connections with any server or proxy. … These guidelines are intended to improve HTTP response times and avoid congestion.” Firefox 2 – 2 Firefox 3 and on – 6 Opera 9.26 – 4 Opera 12 – 6 Safari 3 – 4 Safari 5 – 6 IE 7 – 2 IE 8 – 6 IE 10 – 8 Chrome – 6 Avg. TCP connections during page load (Last 18 months)
  • 8. Head-of-Line Blocking (No Pipelining) Each connection can only handle one request at a time If current request blocks, next request will wait HTTP 1.1 defines pipelining, but most browsers do not implement it
  • 9. TCP Slow Start TCP does not use the full bandwidth capacity from start TCP probes network to find available capacity
  • 10. Latency vs Bandwidth Average web page has over 100 objects to download Largest impact on page load time is latency, not bandwidth https://www.akamai.com/us/en/our-thinking/state-of-the-internet-report
  • 11. What is 20ms of Latency? (RTT = Round-trip time)
  • 12. What Have we Done to Improvise? Reduce # of requests and latency overhead Spriting Concatenation (JavaScript, CSS) Inlining Overcome max connection limit Domain sharding
  • 13. Problems with “optimizations” Spriting Painful and annoying preprocessing, cache invalidations, slower executions Inlining Resource can’t be cached, inflates parent document by 33% overhead Concatenation Less modular code, expensive cache invalidators, slower execution Domain sharding TCP slowstart, excessive DNS lookup, latency
  • 14. HTTP/2 to the Rescue Improve latency and less RTT sensitive Fix pipelining and remove “head of line blocking” Does not require multiple connections Achieved all this by retaining semantics of HTTP 1.1
  • 15. It Began with SPDY Originally proposed by Google as a wire format extension to HTTP in 2011 Implements all the major features of HTTP/2 Serves as a testbed for improvements to HTTP Without the burden of standardization SPDY became the basis of HTTP/2 in 2012 SPDY will cease to exist in 2016, making way to HTTP/2
  • 16. What is HTTP/2 HTTP/2 uses a single, multiplexed connection Max connection limit per domain can be ignored HTTP/2 compresses header data and sends it in a concise, binary format Better than the plain text format used previously Less need for popular HTTP 1.1 optimizations
  • 17. HTTP/2 Specification Started with SPDY - draft 3 Comprised out of two specifications HTTP/2 – RFC7540 HPACK (header compression) – RFC7541 Implementations HTTP/2 over TLS (h2) HTTP/2 over TCP (h2c)
  • 18. HTTP/2 Over TLS (h2) HTTP/2 shipped with TLS as optional Firefox and Chrome developer teams stated they will only implement HTTP/2 over TLS Today, only HTTPS:// is allowed for HTTP/2 TLS must be at least v1.2, with cipher suite restrictions https://http2.github.io/http2-spec/#BadCipherSuites
  • 19. HTTP/2 Over TCP (h2c) Uses the Upgrade header Plans to support on IE, already supported in CURL GET /page HTTP/1.1 Host: server.example.com Connection: Upgrade, HTTP2-Settings Upgrade: h2c HTTP2-Settings: (SETTINGS payload) HTTP/1.1 200 OK Content-length: 243 Content-type: text/html (... HTTP/1.1 response ...) --- or --- HTTP/1.1 101 Switching Protocols Connection: Upgrade Upgrade: h2c (... HTTP/2 response ...)
  • 20. HTTP/2 in One Slide One TCP connection Request → Stream Streams are multiplexed Streams are prioritized Binary framing layer Prioritization Flow control Server push Header compression (HPACK)
  • 21. TCP Connections - HTTP 1.1 vs HTTP/2 HTTP 1.1 HTTP/2 Client http://www.url.com Client http://www.url.com
  • 22. Demo
  • 23. How to Troubleshoot - Dev Tools
  • 24. HTTP/2 Support Servers Microsoft IIS 10 (Win 10 / Server 2016) Apache 2.4.12 Nginx 1.9.5 Jetty 9.3 Many more… Browsers Edge IE11 (Windows 10) Firefox 40+ Chrome 43+ Safari 9+ Opera 32+ iOS Safari 9.1+ Chrome for Android 46+ CURL Google, Facebook, Twitter and many more are using HTTP/2 already HTTP/2 is used by 4.5% of all websites (Dec. 2015 http://w3techs.com)
  • 25. HTTP/2 Multiplexing Each request/response stream has an ID Streams comprise of frames (Header, Data…) TCP connection can have multiple streams Frames can be interleaved in the TCP channel Stream dependencies control frame prioritization Server (IIS/ASP.NET) sees streams as TCP connections
  • 26. Frame Types Frame type Description DATA HTTP body HEADERS Header fields PRIORITY Sender-advised priority of stream RST_STREAM Signal termination of stream SETTINGS Configuration parameters for the connection PUSH_PROMISE Signal a promise (push) of referenced sources PING Measure roundtrip time and “liveness” GOAWAY Inform peer to stop creating streams for current connection WINDOW_UPDATE Connection flow control CONTINUATION Continue a segment of header block fragments
  • 28. Demo
  • 29. How to Troubleshoot - Wireshark Works with Chrome and Firefox only (Windows, Linux, Mac) Set SSLKeyLogFile for HTTPS sniffing Wireshark->Preferences->Protocols->SSL C:> set SSLKEYLOGFILE=c:tempsslkeylog.log
  • 30. How to Troubleshoot - Wireshark
  • 31. How to Troubleshoot - Wireshark
  • 32. How to Troubleshoot - Wireshark
  • 33. Demo
  • 34. Server Push (Promise) After the server responds with an HTML, it waits for requests to embedded resources Server code knows which resources client needs JavaScript CSS Images HTML pages of future navigation Why not just push it to the client along with the HTML? In ASP.NET, use HttpResponse.PushPromise string path = Request.ApplicationPath; Response.PushPromise(path + "/Images/1.png"); Response.PushPromise(path + "/Images/2.png");
  • 35. Demo
  • 36. Summary Multiplexing Multiple requests and responses Fixes head-of-line blocking problem Avoid the HTTP 1.1 hacks Mechanism for request prioritization Fewer TCP connections Reduces TCP slow start Header compression Server Push

Editor's Notes

  1. Pipelining in HTTP 1.1 is mostly supported in browsers, but not in proxies
  2. Diagrams via Akamai’s state of the Internet statistics https://www.igvita.com/2012/07/19/latency-the-new-web-performance-bottleneck/
  3. TLS must support SNI, disable compression and re-negotiation, minimal key length for ephemeral key exchange