Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
HTTP2
Search
Marcus Barcelos
May 11, 2016
Technology
120
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
HTTP2
Marcus Barcelos
May 11, 2016
Transcript
66 slides
pen4education Vamos falar sobre o futuro da Web: HTTP/2 Gabriell
Nascimento Marcus Barcelos Trilha Web @gabriellhrn @mvlbarcelos
pen4education Sysadmin DevOps Bluesoft Quem somos Gabriell
pen4education Arquiteto de soluções DevOps Bluesoft Quem somos Marcus Barcelos
pen4education Bluesoft
pen4education Bluesoft Labs
pen4education HTTP/0.9 1991 HTTP
pen4education Transferência de texto pela Internet (ASCII) HTTP/0.9 Funcionalidades
pen4education ➔ GET HTTP/0.9 Métodos
pen4education web em 1991 http://www.wired.co.uk/news/archive/2013-04/30/first-web-page http://arstechnica.com/information-technology/2013/04/first-website-ever-goes-back-online-on-the-open-webs-20th-birthday/
pen4education HTTP/0.9 1991 HTTP/1.0 1996 HTTP
pen4education ➔ Transferência de MIME ➔ Cabeçalhos ➔ Status codes
HTTP/1.0 Funcionalidades++
pen4education ➔ GET ➔ HEAD ➔ POST HTTP/1.0 Métodos
pen4education HTTP/0.9 1991 HTTP/1.0 HTTP/1.1 1996 1999 HTTP
pen4education ➔ Conexão persistente (keep alive) ➔ HTTP pipelining HTTP/1.1
Funcionalidades++
pen4education ➔ GET ➔ HEAD ➔ POST ➔ PUT ➔
DELETE HTTP/1.1 Métodos ➔ TRACE ➔ OPTIONS ➔ CONNECT ➔ PATCH
pen4education HTTP/0.9 1991 HTTP/1.0 HTTP/1.1 1996 1999 2009 SPDY SPDY
pen4education ➔ Carregamento 50% menor ➔ Compatibilidade com HTTP SPDY
Principais objetivos
pen4education HTTP/0.9 1991 HTTP/1.0 HTTP/1.1 1996 1999 2015 HTTP/2 HTTP
2009 SPDY
pen4education HTTP/2 (RFC 7540) + HPACK (RFC 7541)
pen4education ➔ Troca de mensagens binária ➔ Multiplexação HTTP/2 Funcionalidades++
pen4education ➔ Priorização de requisições ➔ Server push ➔ Compressão
de cabeçalho HTTP/2 Funcionalidades++
pen4education E por que um HTTP/2?
pen4education E por que um HTTP/2? HTTP/1.x não atende mais
pen4education ➔ Sites complexos ➔ Muitas requisições ➔ Mobile A
web atual
pen4education A web atual https://mobiforge.com/research-analysis/the-web-is-doom
pen4education HTTP/1.1 Boas práticas
pen4education ✓ Concatenação ✓ Sprites ✓ Domain sharding ✓ Cabeçalhos/Cookies
HTTP/1.1 Boas práticas ✓ CSS no topo ✓ JS no final ✓ Minificação ✓ Compressão (gzip)
pen4education HTTP/1.1 Diminuir requisições
pen4education ➔ Concatenar (CSS/JS) ➔ Sprites ➔ Domain sharding ◆
cdn1.bluesoft.com.br ◆ cdn2.bluesoft.com.br HTTP/1.1 Diminuir requisições
pen4education HTTP/1.1 Paralelismo: múltiplas conexões TCP Hi there! I’m HTTP/1.1
only :) https://h1.example.com Cliente Servidor
pen4education HTTP/1.1 Head of line blocking Hi there! I’m HTTP/1.1
only :) https://h1.example.com Cliente Servidor
pen4education HTTP/2 Multiplexação de mensagens
pen4education HTTP/2 Multiplexação de mensagens Hi there! I’m HTTP/2 :D
https://h2.example.com Cliente stream 7 DATA … stream 3 DATA stream 5 HEADERS stream 5 DATA stream 3 DATA Conexão HTTP/2 Servidor
$ nghttp -nv https://h2.example.com ... [ 0.009] recv HEADERS frame
<length=30, flags=0x04, stream_id=39> ; END_HEADERS (padlen=0) ; First response header [ 0.009] recv (stream_id=41) :status: 200 [ 0.009] recv (stream_id=41) content-length: 4864 [ 0.009] recv (stream_id=41) content-type: image/png [ 0.009] recv HEADERS frame <length=30, flags=0x04, stream_id=41> ; END_HEADERS (padlen=0) ; First response header [ 0.010] recv DATA frame <length=7456, flags=0x01, stream_id=39> ; END_STREAM [ 0.010] recv DATA frame <length=4864, flags=0x01, stream_id=41> ; END_STREAM [ 0.010] recv DATA frame <length=16384, flags=0x00, stream_id=43> [ 0.010] recv DATA frame <length=4883, flags=0x00, stream_id=45> ...
pen4education Multiplexação why it matters
pen4education Multiplexação why it matters
pen4education HTTP/1.1 Conexões HTTP 6.23s
pen4education HTTP/1.1 Conexões HTTP: domain sharding 2.17s
pen4education HTTP/2 Conexão com multiplexação 0.99s
pen4education HTTP/1.1 Priorização de requisições
pen4education ➔ CSS no topo ➔ JS no final HTTP/1.1
Priorização de requisições
pen4education HTTP/2 Priorização de requisições
pen4education Árvore de pesos e dependências HTTP/2 Priorização de requisições
pen4education HTTP/2 Priorização de requisições * A 1 B 8
C 8 D 12 E 4 A - main.css B - script.js C - style.css D - substyle.css E - favicon.ico
pen4education HTTP/1.1 Tamanho das requisições
pen4education ➔ Cabeçalhos e cookies HTTP/1.1 Tamanho das requisições
pen4education HTTP/2 Compressão de cabeçalho (HPACK)
pen4education HTTP/2 Compressão de cabeçalho Hi there! I’m HTTP/2 :D
https://h2.example.com Cliente Servidor stream 3 HEADERS 1 :method: GET 2 :path: /login 3 :scheme: https 1 :method: GET 2 :path: /home 3 :scheme: https
pen4education HTTP/2 Server push
pen4education HTTP/2 Server push Hi there! I’m HTTP/2 :D https://h2.example.com
Cliente Servidor
pen4education HTTP/2 Server push HTTP/2 https://blog.cloudflare.com/announcing-support-for-http-2-server-push-2/
pen4education HTTP/2 Server push HTTP/2 HTTP/2 + Server Push https://blog.cloudflare.com/announcing-support-for-http-2-server-push-2/
pen4education HTTP/2 Upgrade
pen4education TCP (HTTP) e TLS (HTTPS) HTTP/2 Mecanismo de upgrade
pen4education Na prática: HTTP/2 é com HTTPS
pen4education Resumindo...
pen4education ✓ Concatenação ✓ Sprites ✓ Domain sharding ✓ Cabeçalhos/Cookies
HTTP/1.1 Boas práticas ✓ CSS no topo ✓ JS no final ✓ Minificação ✓ Compressão (gzip)
pen4education ✗ Concatenação ✗ Sprites ✗ Domain sharding ✗ Cabeçalhos/Cookies
HTTP/2 Boas práticas ✗ CSS no topo ✗ JS no final ✓ Minificação ✓ Compressão (gzip)
pen4education HTTP/2 Suporte
pen4education ✓ Google Chrome ✓ Internet Explorer ✓ Microsoft Edge
✓ Mozilla Firefox ✓ Safari HTTP/2 Navegadores https://github.com/http2/http2-spec/wiki/Implementations https://en.wikipedia.org/wiki/Comparison_of_web_browsers#Protocol_support * Versões mais recentes
pen4education ✓ Apache HTTP Server 2.4.17+ ✓ Apache Tomcat 8.5+
✓ Microsoft IIS WinServer 2016 ✓ Nginx 1.9.5+ HTTP/2 Servidores web https://github.com/http2/http2-spec/wiki/Implementations https://en.wikipedia.org/wiki/HTTP/2#Software_and_services_supporting_HTTP.2F2
pen4education ✓ Akamai ✓ CloudFlare HTTP/2 CDNs https://en.wikipedia.org/wiki/HTTP/2#Software_and_services_supporting_HTTP.2F2
pen4education HTTP/2 To use or not to use?
pen4education Nginx http://labs.bluesoft.com.br/habilite-o-http2-no-seu- site-hoje/ Apache http://labs.bluesoft.com.br/habilite-o-http2-no-seu- site-agora-com-apache/ HTTP/2 Artigos
pen4education $ docker pull bluesoftbr/nginx-h2 $ docker pull bluesoftbr/httpd-h2 https://github.com/bluesoft/dockerfiles
HTTP/2 Imagens Docker
pen4education Obrigado! @gabriellhrn @mvlbarcelos bluesoft bluesoftbr http://labs.bluesoft.com.br
More Decks by Marcus Barcelos
See All by Marcus Barcelos
TDC - Integração continua
mvlbarcelos
1
640
Arquitetando e evoluindo um ERP para a Nuvem
mvlbarcelos
1
320
Other Decks in Technology
See All in Technology
あの日、見つかっていなかったらどうなっていたか
kazzpapa3
2
240
Datadog の権限統制 〜Org 統合に向けて調べた注意点 / JDDUG-Meetup_24
visional_engineering_and_design
1
180
ぼくのClaude Codeの使い方
falken
PRO
5
7.5k
人の努力に頼らないセキュリティをエンジニアリングする在り方 / An approach to engineering security that does not rely on human effort
carta_engineering
0
200
文書画像からの情報抽出を行うエージェントを、軌跡の正解データ無しで作れるか
sansantech
PRO
2
170
個人ASを取得して、自宅Kubernetes上のVMをグローバルIPで公開した話
munenick
0
150
コピーオンライト型ファイルシステムと ランダム書き込み
sat
PRO
2
120
マネジメントされる側の仕事は「文句」を言うこと
riyaamemiya
7
5.7k
Context parameters で作る!はじめての型クラス
kworkdev
PRO
1
150
さようならSSH鍵、こんにちはゼロトラスト ― AIフレンドリーで快適な自宅鯖SSH
atalie2m
14
6.8k
Shared Signals Framework 仕様解説
oidfj
0
480
Quick Automate | 目指せ Quick マスター 12
inariku
PRO
1
130
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
680
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
6
930
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
680
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
830
AI: The stuff that nobody shows you
jnunemaker
PRO
12
1.3k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.4k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k