SlideShare ist ein Scribd-Unternehmen logo
1 von 39
HTTP/2 Introduction
By Walter Liu 2015/03/11
Agenda
 The problem of HTTP/1.x
 What’s HTTP/2?
 HTTP/2 Status
The problem of http/1.x
httparchive.org – TCP connections
httparchive.org –
#Domain & Max request
httparchive.org –
Size and Total requests
Negate TCP flow control
Unfair resource sharing
Duplicated data
- DNS lookup (domain sharding)
- TCP 3-way handshaking
- TCP network buffer
- HTTP request/respond header
HTTP pipeline ?
Head of line blocking
Work around for HTTP/1.1
 Spriting
 Data: inlining
 Domain sharding
 Concatenation
Workaround - Spriting
Workaround – data inlining
 <img
src="data:image/gif;base64,R0lGODlhEAAOALMAAOazToeHh0tLS/7LZv/
0jvb29t/f3//Ub//ge8WSLf/rhf/3kdbW1mxsbP//mf///yH5BAAAAAAALAAAA
AAQAA4AAARe8L1Ekyky67QZ1hLnjM5UUde0ECwLJoExKcppV0aCcGC
mTIHEIUEqjgaORCMxIC6e0CcguWw6aFjsVMkkIr7g77ZKPJjPZqIyd7sJA
gVGoEGv2xsBxqNgYPj/gAwXEQA7” width="16" height="14"
alt="embedded folder icon”>
 Good: No additional request.
 No additional connection
 No additional HTTP request/response header
 Bad:
 Base64 is larger.
 Resources are not sharable.
Workaround - Domain sharding
 Browser: WAS 2 TCP connection for each domain.
 New browsers use 6~8, mobile browsers use 4~6 TCP connections.
 Good
 Parallel content download
 Bad:
 More TCP connection, negate TCP flow control, etc.
 More Overhead and unfair resource sharing
Workaround - Concatenation
$ cat *.js > site_global.js
* Reduce number of requests
* Reuse cached resources
What’s HTTP/2?
Key differences with HTTP/1.x
 Binary format
 Multiplex
 Server push
 Header compression
 Stream Prioritization
 Flow Control
HTTP/2 binary format (1/2)
HTTP/2 binary format (2/2)
Frame Type: DATA, HEADERS, PRIORITY, RST_STREAM, SETTINGS,
PUSH_PROMISE, PING, GOAWAY, WINDOW_UPDATE, CONTINUATION
* begin with a fixed 9-octet header followed by a variable-length payload
Stream Identifier: incremental, client odd, server even. New connection if
exhausted.
Connection, Stream, Message and
Frame
HTTP/2 Multiplex
HTTP/2 Header Compression
• Send diff
• Binary
• Huffman code
HTTP/2 Stream Prioritization
 Advisory
 Example,
 Highest: main html
 High: css files
 Mid: Javascript files
 Low: images
HTTP/2 Flow Control
 Like SSH sliding window flow control
 With each individual stream or the entire connection.
 Receiver advise the window size, both client and server.
 Only DATA frame are flow controled.
 Hop-by-hop, not end-to-end
 in SETTTINGS frames.
 No algorithm in SPEC. Depends on implementers.
Frame Extensions
 Not in SPEC right now. F.Y.I.
 Alternative Services (ALTSVC frame)
 Advisory and OPTIONAL
 Alternative service could be multiple. A client chooses the most suitable one.
 Example,
 ("http", "www.example.com", "80") => ("h2", "new.example.com", "81"), <TTL>
 Not work like redirect. Origin URI is not changed.
 Security context is applied on origin URI.
 Like TLS certificates.
 Security.consideration?
 Must use TLS or strong server authentication if host is changed..
 (Study more about how browsers implement this.)
 BLOCKED frame
 For flow control experiment.
Connect or Upgrade to HTTP/2
1. Send request with Upgrade header
2. SETTINGS is bas64 encoded.
3. Server declines upgrade.
4. Server accepts and change to HTTP/2.
• New HTTPS connection via TLS and ALPN.
• New HTTP connection with prior knowledge
• New HTTP connection without prior knowledge (Upgrade)
Some Examples
HEADER and DATA frame
Server push (1)
Server push (2)
Server push (2)
Core concepts of HTTP/2
 Preserve HTTP/1.1 paradigms
 Change
 How data is framed.
 How data is transported.
 Advantages
 Same HTTP APIs
 Cheaper Requests
 Network-server friendliness
 Cache pushing
 Like, if the server foresees the client will need below data.
 Or invalidate client side cache.
 Be able to change your mind (Need to close connection in HTTP/1.x)
 Send RST_STREAM to the server to stop sending data of a request.
 More encryption
 Firefox and Chrom will only support HTTP/2 over TLS.
 No more text
HTTP/2 Status
HTTP/2 has approved by the IESG,
and is in the RFC Editor’s publication queue.
Implementations
 https://github.com/http2/http2-
spec/wiki/Implementations
Browsers
 Firefox
 Supported in Firefox 35
 TLS only
 Chrome
 Supported in Chrome 40
 TLS only
 Chrome will remove SPDY in early 2016.
 IE
 Also support HTTP/2 over TCP
 Supported in IE 11 running on Windows 10.
 Safari
 Not announced yet.
5% of Google global traffic
On January 28th 2015
Server/CDN/Proxy/L4
 Nginx: End of 2015
 Apache: Not announced yet. (mod_h2?)
 IIS: Supported in Windows 10
 Akamai: Limited beta right now.
 Squid: Supported in 3.6 (Now stable version is 3.5)
 L4: unknown.
Tools
 Wireshark: Yes
 Fiddler: Not announced yet.
 CURL/libcurl
 Support both TLS and in-secure TCP
 URLLib in Python: Seems no
 Requests in Python: Seems no
 gRPC (http/2+ProtoBuff): RPC framework
References
 http://http2.github.io
 http://daniel.haxx.se/http2/
 http://www.slideshare.net/bagder/http2-right-now-fosdem2015
 http://www.slideshare.net/edburns/http2-comes-to-java-what-servlet-
40-means-to-you-devnexus-2015
 http://chimera.labs.oreilly.com/books/1230000000545/ch12.html
Q & A

Weitere ähnliche Inhalte

Was ist angesagt?

HTTP/2 standard for video streaming
HTTP/2 standard for video streamingHTTP/2 standard for video streaming
HTTP/2 standard for video streamingHung Thai Le
 
HTTP/2 Changes Everything
HTTP/2 Changes EverythingHTTP/2 Changes Everything
HTTP/2 Changes EverythingLori MacVittie
 
Introduction to WebSockets
Introduction to WebSocketsIntroduction to WebSockets
Introduction to WebSocketsGunnar Hillert
 
Apache Server Tutorial
Apache Server TutorialApache Server Tutorial
Apache Server TutorialJagat Kothari
 
HTTP2 and gRPC
HTTP2 and gRPCHTTP2 and gRPC
HTTP2 and gRPCGuo Jing
 
Reverse proxy & web cache with NGINX, HAProxy and Varnish
Reverse proxy & web cache with NGINX, HAProxy and VarnishReverse proxy & web cache with NGINX, HAProxy and Varnish
Reverse proxy & web cache with NGINX, HAProxy and VarnishEl Mahdi Benzekri
 
Getting started with MQTT - Virtual IoT Meetup presentation
Getting started with MQTT - Virtual IoT Meetup presentationGetting started with MQTT - Virtual IoT Meetup presentation
Getting started with MQTT - Virtual IoT Meetup presentationChristian Götz
 
Web development using javaScript, React js, Node js, HTML, CSS and SQL
Web development using javaScript, React js, Node js, HTML, CSS and SQLWeb development using javaScript, React js, Node js, HTML, CSS and SQL
Web development using javaScript, React js, Node js, HTML, CSS and SQLJayant Surana
 
Introduction MQTT in English
Introduction MQTT in EnglishIntroduction MQTT in English
Introduction MQTT in EnglishEric Xiao
 
Mqtt(Message queue telemetry protocol) presentation
Mqtt(Message queue telemetry protocol) presentation Mqtt(Message queue telemetry protocol) presentation
Mqtt(Message queue telemetry protocol) presentation Piyush Rathi
 
Back to the Basics - 1 - Introduction to Web Development
Back to the Basics - 1 - Introduction to Web DevelopmentBack to the Basics - 1 - Introduction to Web Development
Back to the Basics - 1 - Introduction to Web DevelopmentClint LaForest
 

Was ist angesagt? (20)

Http VS. Https
Http VS. HttpsHttp VS. Https
Http VS. Https
 
MERN PPT
MERN PPTMERN PPT
MERN PPT
 
HTTP/3
HTTP/3HTTP/3
HTTP/3
 
Apache web server
Apache web serverApache web server
Apache web server
 
HTTP/2 standard for video streaming
HTTP/2 standard for video streamingHTTP/2 standard for video streaming
HTTP/2 standard for video streaming
 
Http protocol
Http protocolHttp protocol
Http protocol
 
Http
HttpHttp
Http
 
HTTP Basics
HTTP BasicsHTTP Basics
HTTP Basics
 
HTTP/2 Changes Everything
HTTP/2 Changes EverythingHTTP/2 Changes Everything
HTTP/2 Changes Everything
 
Introduction to WebSockets
Introduction to WebSocketsIntroduction to WebSockets
Introduction to WebSockets
 
Apache Server Tutorial
Apache Server TutorialApache Server Tutorial
Apache Server Tutorial
 
HTTP2 and gRPC
HTTP2 and gRPCHTTP2 and gRPC
HTTP2 and gRPC
 
Reverse proxy & web cache with NGINX, HAProxy and Varnish
Reverse proxy & web cache with NGINX, HAProxy and VarnishReverse proxy & web cache with NGINX, HAProxy and Varnish
Reverse proxy & web cache with NGINX, HAProxy and Varnish
 
Getting started with MQTT - Virtual IoT Meetup presentation
Getting started with MQTT - Virtual IoT Meetup presentationGetting started with MQTT - Virtual IoT Meetup presentation
Getting started with MQTT - Virtual IoT Meetup presentation
 
Web development using javaScript, React js, Node js, HTML, CSS and SQL
Web development using javaScript, React js, Node js, HTML, CSS and SQLWeb development using javaScript, React js, Node js, HTML, CSS and SQL
Web development using javaScript, React js, Node js, HTML, CSS and SQL
 
Http Introduction
Http IntroductionHttp Introduction
Http Introduction
 
Introduction MQTT in English
Introduction MQTT in EnglishIntroduction MQTT in English
Introduction MQTT in English
 
gRPC - RPC rebirth?
gRPC - RPC rebirth?gRPC - RPC rebirth?
gRPC - RPC rebirth?
 
Mqtt(Message queue telemetry protocol) presentation
Mqtt(Message queue telemetry protocol) presentation Mqtt(Message queue telemetry protocol) presentation
Mqtt(Message queue telemetry protocol) presentation
 
Back to the Basics - 1 - Introduction to Web Development
Back to the Basics - 1 - Introduction to Web DevelopmentBack to the Basics - 1 - Introduction to Web Development
Back to the Basics - 1 - Introduction to Web Development
 

Andere mochten auch

HTTP/2 What's inside and Why
HTTP/2 What's inside and WhyHTTP/2 What's inside and Why
HTTP/2 What's inside and WhyAdrian Cole
 
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 youFastly
 
Seokomm 2016 Vortrag - Räume deine Website auf
Seokomm 2016 Vortrag - Räume deine Website auf Seokomm 2016 Vortrag - Räume deine Website auf
Seokomm 2016 Vortrag - Räume deine Website auf Dominik Wojcik
 
Attacking http2 implementations (1)
Attacking http2 implementations (1)Attacking http2 implementations (1)
Attacking http2 implementations (1)John Villamil
 
Akamai 서비스 트러블 슈팅 및 테스트 방법과 도구
Akamai 서비스 트러블 슈팅 및 테스트 방법과 도구Akamai 서비스 트러블 슈팅 및 테스트 방법과 도구
Akamai 서비스 트러블 슈팅 및 테스트 방법과 도구SangJin Kang
 
HTTP/2 - for TCP/IP Geeks Stockholm
HTTP/2 - for TCP/IP Geeks StockholmHTTP/2 - for TCP/IP Geeks Stockholm
HTTP/2 - for TCP/IP Geeks StockholmDaniel Stenberg
 
Akamai Korea - Tech Day (2015/03/11) HTTP/2
Akamai Korea - Tech Day (2015/03/11) HTTP/2Akamai Korea - Tech Day (2015/03/11) HTTP/2
Akamai Korea - Tech Day (2015/03/11) HTTP/2SangJin Kang
 
Over the Top Content Delivery: State of the Art and Challenges Ahead
Over the Top Content Delivery: State of the Art and Challenges AheadOver the Top Content Delivery: State of the Art and Challenges Ahead
Over the Top Content Delivery: State of the Art and Challenges AheadAlpen-Adria-Universität
 
Technical Overview of QUIC
Technical  Overview of QUICTechnical  Overview of QUIC
Technical Overview of QUICshigeki_ohtsu
 
더 빠른 웹을 위해: HTTP/2
더 빠른 웹을 위해: HTTP/2더 빠른 웹을 위해: HTTP/2
더 빠른 웹을 위해: HTTP/2EungJun Yi
 

Andere mochten auch (13)

HTTP/2 What's inside and Why
HTTP/2 What's inside and WhyHTTP/2 What's inside and Why
HTTP/2 What's inside and Why
 
Http2 right now
Http2 right nowHttp2 right now
Http2 right now
 
Http2
Http2Http2
Http2
 
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
 
Seokomm 2016 Vortrag - Räume deine Website auf
Seokomm 2016 Vortrag - Räume deine Website auf Seokomm 2016 Vortrag - Räume deine Website auf
Seokomm 2016 Vortrag - Räume deine Website auf
 
Attacking http2 implementations (1)
Attacking http2 implementations (1)Attacking http2 implementations (1)
Attacking http2 implementations (1)
 
Akamai 서비스 트러블 슈팅 및 테스트 방법과 도구
Akamai 서비스 트러블 슈팅 및 테스트 방법과 도구Akamai 서비스 트러블 슈팅 및 테스트 방법과 도구
Akamai 서비스 트러블 슈팅 및 테스트 방법과 도구
 
HTTP/2 - for TCP/IP Geeks Stockholm
HTTP/2 - for TCP/IP Geeks StockholmHTTP/2 - for TCP/IP Geeks Stockholm
HTTP/2 - for TCP/IP Geeks Stockholm
 
Akamai Korea - Tech Day (2015/03/11) HTTP/2
Akamai Korea - Tech Day (2015/03/11) HTTP/2Akamai Korea - Tech Day (2015/03/11) HTTP/2
Akamai Korea - Tech Day (2015/03/11) HTTP/2
 
Over the Top Content Delivery: State of the Art and Challenges Ahead
Over the Top Content Delivery: State of the Art and Challenges AheadOver the Top Content Delivery: State of the Art and Challenges Ahead
Over the Top Content Delivery: State of the Art and Challenges Ahead
 
Google QUIC
Google QUICGoogle QUIC
Google QUIC
 
Technical Overview of QUIC
Technical  Overview of QUICTechnical  Overview of QUIC
Technical Overview of QUIC
 
더 빠른 웹을 위해: HTTP/2
더 빠른 웹을 위해: HTTP/2더 빠른 웹을 위해: HTTP/2
더 빠른 웹을 위해: HTTP/2
 

Ähnlich wie HTTP/2 Introduction

Revisiting HTTP/2
Revisiting HTTP/2Revisiting HTTP/2
Revisiting HTTP/2Fastly
 
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 erapeychevi
 
Revisiting HTTP/2
Revisiting HTTP/2Revisiting HTTP/2
Revisiting HTTP/2Fastly
 
Next generation web protocols
Next generation web protocolsNext generation web protocols
Next generation web protocolsDaniel Austin
 
Introduction to HTTP/2
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2Ido Flatow
 
HTTP2:新的机遇与挑战
HTTP2:新的机遇与挑战HTTP2:新的机遇与挑战
HTTP2:新的机遇与挑战Jerry Qu
 
Проксирование HTTP-запросов web-акселератором / Александр Крижановский (Tempe...
Проксирование HTTP-запросов web-акселератором / Александр Крижановский (Tempe...Проксирование HTTP-запросов web-акселератором / Александр Крижановский (Tempe...
Проксирование HTTP-запросов web-акселератором / Александр Крижановский (Tempe...Ontico
 
Enabling Googley microservices with HTTP/2 and gRPC.
Enabling Googley microservices with HTTP/2 and gRPC.Enabling Googley microservices with HTTP/2 and gRPC.
Enabling Googley microservices with HTTP/2 and gRPC.Alex Borysov
 
Introduction to HTTP/2
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2Ido Flatow
 
A New Internet? Introduction to HTTP/2, QUIC and DOH
A New Internet? Introduction to HTTP/2, QUIC and DOHA New Internet? Introduction to HTTP/2, QUIC and DOH
A New Internet? Introduction to HTTP/2, QUIC and DOHAPNIC
 
A new Internet? Intro to HTTP/2, QUIC, DoH and DNS over QUIC
A new Internet? Intro to HTTP/2, QUIC, DoH and DNS over QUICA new Internet? Intro to HTTP/2, QUIC, DoH and DNS over QUIC
A new Internet? Intro to HTTP/2, QUIC, DoH and DNS over QUICAPNIC
 
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 WebAll Things Open
 
HTML5, HTTP2, and You 1.1
HTML5, HTTP2, and You 1.1HTML5, HTTP2, and You 1.1
HTML5, HTTP2, and You 1.1Daniel Austin
 
Introduction to HTTP/2
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2Okis Chuang
 
Taking a Quantum Leap with Html 5 WebSocket
Taking a Quantum Leap with Html 5 WebSocketTaking a Quantum Leap with Html 5 WebSocket
Taking a Quantum Leap with Html 5 WebSocketShahriar Hyder
 
Linux kernel TLS и HTTPS / Александр Крижановский (Tempesta Technologies)
Linux kernel TLS и HTTPS / Александр Крижановский (Tempesta Technologies)Linux kernel TLS и HTTPS / Александр Крижановский (Tempesta Technologies)
Linux kernel TLS и HTTPS / Александр Крижановский (Tempesta Technologies)Ontico
 
Web technology-guide
Web technology-guideWeb technology-guide
Web technology-guideSrihari
 

Ähnlich wie HTTP/2 Introduction (20)

Revisiting HTTP/2
Revisiting HTTP/2Revisiting HTTP/2
Revisiting HTTP/2
 
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
 
Http2 kotlin
Http2   kotlinHttp2   kotlin
Http2 kotlin
 
Revisiting HTTP/2
Revisiting HTTP/2Revisiting HTTP/2
Revisiting HTTP/2
 
Next generation web protocols
Next generation web protocolsNext generation web protocols
Next generation web protocols
 
Introduction to HTTP/2
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2
 
HTTP2:新的机遇与挑战
HTTP2:新的机遇与挑战HTTP2:新的机遇与挑战
HTTP2:新的机遇与挑战
 
Проксирование HTTP-запросов web-акселератором / Александр Крижановский (Tempe...
Проксирование HTTP-запросов web-акселератором / Александр Крижановский (Tempe...Проксирование HTTP-запросов web-акселератором / Александр Крижановский (Tempe...
Проксирование HTTP-запросов web-акселератором / Александр Крижановский (Tempe...
 
Enabling Googley microservices with HTTP/2 and gRPC.
Enabling Googley microservices with HTTP/2 and gRPC.Enabling Googley microservices with HTTP/2 and gRPC.
Enabling Googley microservices with HTTP/2 and gRPC.
 
Introduction to HTTP/2
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2
 
A New Internet? Introduction to HTTP/2, QUIC and DOH
A New Internet? Introduction to HTTP/2, QUIC and DOHA New Internet? Introduction to HTTP/2, QUIC and DOH
A New Internet? Introduction to HTTP/2, QUIC and DOH
 
A new Internet? Intro to HTTP/2, QUIC, DoH and DNS over QUIC
A new Internet? Intro to HTTP/2, QUIC, DoH and DNS over QUICA new Internet? Intro to HTTP/2, QUIC, DoH and DNS over QUIC
A new Internet? Intro to HTTP/2, QUIC, DoH and DNS over QUIC
 
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
 
HTML5, HTTP2, and You 1.1
HTML5, HTTP2, and You 1.1HTML5, HTTP2, and You 1.1
HTML5, HTTP2, and You 1.1
 
Introduction to HTTP/2
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2
 
Taking a Quantum Leap with Html 5 WebSocket
Taking a Quantum Leap with Html 5 WebSocketTaking a Quantum Leap with Html 5 WebSocket
Taking a Quantum Leap with Html 5 WebSocket
 
Linux kernel TLS и HTTPS / Александр Крижановский (Tempesta Technologies)
Linux kernel TLS и HTTPS / Александр Крижановский (Tempesta Technologies)Linux kernel TLS и HTTPS / Александр Крижановский (Tempesta Technologies)
Linux kernel TLS и HTTPS / Александр Крижановский (Tempesta Technologies)
 
Web technology-guide
Web technology-guideWeb technology-guide
Web technology-guide
 

Mehr von Walter Liu

Generative AI 在手機遊戲發行上的應用介紹.pdf
Generative AI 在手機遊戲發行上的應用介紹.pdfGenerative AI 在手機遊戲發行上的應用介紹.pdf
Generative AI 在手機遊戲發行上的應用介紹.pdfWalter Liu
 
Infrastructure as code using Kubernetes
Infrastructure as code using KubernetesInfrastructure as code using Kubernetes
Infrastructure as code using KubernetesWalter Liu
 
手機遊戲數位行銷工具淺談
手機遊戲數位行銷工具淺談手機遊戲數位行銷工具淺談
手機遊戲數位行銷工具淺談Walter Liu
 
關於第三方追蹤廣告再行銷的那些事兒
關於第三方追蹤廣告再行銷的那些事兒關於第三方追蹤廣告再行銷的那些事兒
關於第三方追蹤廣告再行銷的那些事兒Walter Liu
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes WorkshopWalter Liu
 
Using Kubernetes to deploy Django in GCP
Using Kubernetes to deploy Django in GCPUsing Kubernetes to deploy Django in GCP
Using Kubernetes to deploy Django in GCPWalter Liu
 
Game DDOS Prevention
Game DDOS PreventionGame DDOS Prevention
Game DDOS PreventionWalter Liu
 
Airflow - a data flow engine
Airflow - a data flow engineAirflow - a data flow engine
Airflow - a data flow engineWalter Liu
 
Super Fast Gevent Introduction
Super Fast Gevent IntroductionSuper Fast Gevent Introduction
Super Fast Gevent IntroductionWalter Liu
 
HTTP/2 to web dev
HTTP/2 to web devHTTP/2 to web dev
HTTP/2 to web devWalter Liu
 
Consul - service discovery and others
Consul - service discovery and othersConsul - service discovery and others
Consul - service discovery and othersWalter Liu
 
Docker introduction
Docker introductionDocker introduction
Docker introductionWalter Liu
 
WRS GIT Branching Model - draft
WRS GIT Branching Model - draftWRS GIT Branching Model - draft
WRS GIT Branching Model - draftWalter Liu
 
Salty OPS – Saltstack Introduction
Salty OPS – Saltstack IntroductionSalty OPS – Saltstack Introduction
Salty OPS – Saltstack IntroductionWalter Liu
 
Django deployment and rpm+yum
Django deployment and rpm+yumDjango deployment and rpm+yum
Django deployment and rpm+yumWalter Liu
 
Game Localization in Python
Game Localization in PythonGame Localization in Python
Game Localization in PythonWalter Liu
 
Service production from d3 pitfall viewpoint
Service production from d3 pitfall viewpointService production from d3 pitfall viewpoint
Service production from d3 pitfall viewpointWalter Liu
 
Celery in the Django
Celery in the DjangoCelery in the Django
Celery in the DjangoWalter Liu
 

Mehr von Walter Liu (18)

Generative AI 在手機遊戲發行上的應用介紹.pdf
Generative AI 在手機遊戲發行上的應用介紹.pdfGenerative AI 在手機遊戲發行上的應用介紹.pdf
Generative AI 在手機遊戲發行上的應用介紹.pdf
 
Infrastructure as code using Kubernetes
Infrastructure as code using KubernetesInfrastructure as code using Kubernetes
Infrastructure as code using Kubernetes
 
手機遊戲數位行銷工具淺談
手機遊戲數位行銷工具淺談手機遊戲數位行銷工具淺談
手機遊戲數位行銷工具淺談
 
關於第三方追蹤廣告再行銷的那些事兒
關於第三方追蹤廣告再行銷的那些事兒關於第三方追蹤廣告再行銷的那些事兒
關於第三方追蹤廣告再行銷的那些事兒
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshop
 
Using Kubernetes to deploy Django in GCP
Using Kubernetes to deploy Django in GCPUsing Kubernetes to deploy Django in GCP
Using Kubernetes to deploy Django in GCP
 
Game DDOS Prevention
Game DDOS PreventionGame DDOS Prevention
Game DDOS Prevention
 
Airflow - a data flow engine
Airflow - a data flow engineAirflow - a data flow engine
Airflow - a data flow engine
 
Super Fast Gevent Introduction
Super Fast Gevent IntroductionSuper Fast Gevent Introduction
Super Fast Gevent Introduction
 
HTTP/2 to web dev
HTTP/2 to web devHTTP/2 to web dev
HTTP/2 to web dev
 
Consul - service discovery and others
Consul - service discovery and othersConsul - service discovery and others
Consul - service discovery and others
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
WRS GIT Branching Model - draft
WRS GIT Branching Model - draftWRS GIT Branching Model - draft
WRS GIT Branching Model - draft
 
Salty OPS – Saltstack Introduction
Salty OPS – Saltstack IntroductionSalty OPS – Saltstack Introduction
Salty OPS – Saltstack Introduction
 
Django deployment and rpm+yum
Django deployment and rpm+yumDjango deployment and rpm+yum
Django deployment and rpm+yum
 
Game Localization in Python
Game Localization in PythonGame Localization in Python
Game Localization in Python
 
Service production from d3 pitfall viewpoint
Service production from d3 pitfall viewpointService production from d3 pitfall viewpoint
Service production from d3 pitfall viewpoint
 
Celery in the Django
Celery in the DjangoCelery in the Django
Celery in the Django
 

Kürzlich hochgeladen

Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Kürzlich hochgeladen (20)

Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

HTTP/2 Introduction

  • 2. Agenda  The problem of HTTP/1.x  What’s HTTP/2?  HTTP/2 Status
  • 3. The problem of http/1.x
  • 7. Negate TCP flow control Unfair resource sharing Duplicated data - DNS lookup (domain sharding) - TCP 3-way handshaking - TCP network buffer - HTTP request/respond header
  • 8. HTTP pipeline ? Head of line blocking
  • 9. Work around for HTTP/1.1  Spriting  Data: inlining  Domain sharding  Concatenation
  • 11. Workaround – data inlining  <img src="data:image/gif;base64,R0lGODlhEAAOALMAAOazToeHh0tLS/7LZv/ 0jvb29t/f3//Ub//ge8WSLf/rhf/3kdbW1mxsbP//mf///yH5BAAAAAAALAAAA AAQAA4AAARe8L1Ekyky67QZ1hLnjM5UUde0ECwLJoExKcppV0aCcGC mTIHEIUEqjgaORCMxIC6e0CcguWw6aFjsVMkkIr7g77ZKPJjPZqIyd7sJA gVGoEGv2xsBxqNgYPj/gAwXEQA7” width="16" height="14" alt="embedded folder icon”>  Good: No additional request.  No additional connection  No additional HTTP request/response header  Bad:  Base64 is larger.  Resources are not sharable.
  • 12. Workaround - Domain sharding  Browser: WAS 2 TCP connection for each domain.  New browsers use 6~8, mobile browsers use 4~6 TCP connections.  Good  Parallel content download  Bad:  More TCP connection, negate TCP flow control, etc.  More Overhead and unfair resource sharing
  • 13. Workaround - Concatenation $ cat *.js > site_global.js * Reduce number of requests * Reuse cached resources
  • 15. Key differences with HTTP/1.x  Binary format  Multiplex  Server push  Header compression  Stream Prioritization  Flow Control
  • 17. HTTP/2 binary format (2/2) Frame Type: DATA, HEADERS, PRIORITY, RST_STREAM, SETTINGS, PUSH_PROMISE, PING, GOAWAY, WINDOW_UPDATE, CONTINUATION * begin with a fixed 9-octet header followed by a variable-length payload Stream Identifier: incremental, client odd, server even. New connection if exhausted.
  • 20. HTTP/2 Header Compression • Send diff • Binary • Huffman code
  • 21. HTTP/2 Stream Prioritization  Advisory  Example,  Highest: main html  High: css files  Mid: Javascript files  Low: images
  • 22. HTTP/2 Flow Control  Like SSH sliding window flow control  With each individual stream or the entire connection.  Receiver advise the window size, both client and server.  Only DATA frame are flow controled.  Hop-by-hop, not end-to-end  in SETTTINGS frames.  No algorithm in SPEC. Depends on implementers.
  • 23. Frame Extensions  Not in SPEC right now. F.Y.I.  Alternative Services (ALTSVC frame)  Advisory and OPTIONAL  Alternative service could be multiple. A client chooses the most suitable one.  Example,  ("http", "www.example.com", "80") => ("h2", "new.example.com", "81"), <TTL>  Not work like redirect. Origin URI is not changed.  Security context is applied on origin URI.  Like TLS certificates.  Security.consideration?  Must use TLS or strong server authentication if host is changed..  (Study more about how browsers implement this.)  BLOCKED frame  For flow control experiment.
  • 24. Connect or Upgrade to HTTP/2 1. Send request with Upgrade header 2. SETTINGS is bas64 encoded. 3. Server declines upgrade. 4. Server accepts and change to HTTP/2. • New HTTPS connection via TLS and ALPN. • New HTTP connection with prior knowledge • New HTTP connection without prior knowledge (Upgrade)
  • 30. Core concepts of HTTP/2  Preserve HTTP/1.1 paradigms  Change  How data is framed.  How data is transported.  Advantages  Same HTTP APIs  Cheaper Requests  Network-server friendliness  Cache pushing  Like, if the server foresees the client will need below data.  Or invalidate client side cache.  Be able to change your mind (Need to close connection in HTTP/1.x)  Send RST_STREAM to the server to stop sending data of a request.  More encryption  Firefox and Chrom will only support HTTP/2 over TLS.  No more text
  • 32. HTTP/2 has approved by the IESG, and is in the RFC Editor’s publication queue.
  • 34. Browsers  Firefox  Supported in Firefox 35  TLS only  Chrome  Supported in Chrome 40  TLS only  Chrome will remove SPDY in early 2016.  IE  Also support HTTP/2 over TCP  Supported in IE 11 running on Windows 10.  Safari  Not announced yet.
  • 35. 5% of Google global traffic On January 28th 2015
  • 36. Server/CDN/Proxy/L4  Nginx: End of 2015  Apache: Not announced yet. (mod_h2?)  IIS: Supported in Windows 10  Akamai: Limited beta right now.  Squid: Supported in 3.6 (Now stable version is 3.5)  L4: unknown.
  • 37. Tools  Wireshark: Yes  Fiddler: Not announced yet.  CURL/libcurl  Support both TLS and in-secure TCP  URLLib in Python: Seems no  Requests in Python: Seems no  gRPC (http/2+ProtoBuff): RPC framework
  • 38. References  http://http2.github.io  http://daniel.haxx.se/http2/  http://www.slideshare.net/bagder/http2-right-now-fosdem2015  http://www.slideshare.net/edburns/http2-comes-to-java-what-servlet- 40-means-to-you-devnexus-2015  http://chimera.labs.oreilly.com/books/1230000000545/ch12.html
  • 39. Q & A

Hinweis der Redaktion

  1. Request and TCP connection growth with time
  2. Ref: https://css-tricks.com/css-sprites/
  3. Ref: http://www.websiteoptimization.com/speed/tweak/inline-images/
  4. Stream Identifier: client old, server even. Stream identifier is Unilaterally. Stream ID 0 is reserved as root stream ID. Stream ID must be greater. New connection should be opened if stream ID is exhausted. Client opens new stream. Server send GO_AWAY frame to force client re-open a connection.
  5. SETTINGS_MAX_CONCURRENT_STREAMS to client and server separately.
  6. HPACK
  7. Default value is 65535 octet.
  8. Usage Another service, host and port. When this server is down. When alt server has better performance to the user. Server want offer new protocol in alt server or use more secure protocol like TLS. Load balance or separate users
  9. Application-Layer Protocol Negotiation (ALPN)
  10. http://www.slideshare.net/Jxck/http2-hpack-pyfes-20131130
  11. I found a tech news that said Safari support it, but actually it’s not. It’s SPDY of Safari instead of HTTP/2.