SlideShare a Scribd company logo
Wprowadzenie do HTTP/2
Gabor Wnuk, Software Architect / Team Leader
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
Mobile vs desktop
What’s all the fuss about?
- pageviews desktop (lipiec 2015) – 3,5 mld
- screenviews mobile (lipiec 2015) – 832 mln (24%)
- pageviews desktop (maj 2015) – 3,7 mld
- screenviews mobile (maj 2015) – 694 mln (18%)
Wzrost o 17% w dwa miesiące.
Źródło: Megapanel PBI/Gemius, maj 2015 i lipiec 2015
Optymalizacja aplikacji
I moment, w którym uderzamy w sufit
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
OPTYMALIZACJA DEPLOY
CACHE
Czy tak naprawdę potrzebujemy?
Apache, nginx, ???
Keep Alive?
ZAKOŃCZENIE
generated 12344 bytes in 5
msecs, YAY!
BAZA DANYCH
Mamy indeksy? :) Potrzebujemy SQL?
CACHE CONTROL
E-Tag + If-None-Match, Cache-
Control
STRESSTEST
funkload, locust, ab
Użytkownika to średnio interesuje.
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
(o ile zrobiłaś / zrobiłeś to w miarę dobrze)
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
HTTP/1.1 (bez Keep Alive)
Typowy timeline requestu
DNS
(cache’owane)
CONNECTING
(3-Way handshake, TLS handshake)
SENDING
(request: nagłowki, ciastka,
zależne od ilości danych)
WAITING
(zależy od szybkości endpointu)
RECEIVING
(pobieramy dane z serwera,
zależne od ilości danych)
130 ms 127 ms 298 ms 5 ms 250 ms
Total: 885 ms
3G, Orange, zasięg 4/5.
Connection: close
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
HTTP/1.1 (bez Keep Alive)
Typowy timeline requestu
Connection: close
Connection: close
Connection: close
3 assety, total: ~3150 ms
3G, Orange, zasięg 4/5.
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
HTTP/1.1 (Keep Alive)
Jedno połączenie, oszczędzamy czas na nawiązaniu kolejnych
…
3 assety, total: ~2769 ms
3G, Orange, zasięg 4/5.
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
HTTP/1.1 (Keep Alive)
Timeline dla kilku requestów (~5 połączeń per domena)
CZEKAMY
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
HTTP/1.1 (Keep Alive)
CNAME (p1.pudelek.pl, p2.pudelek.pl, p3.pudelek.pl …)
HTTP/1.1 ma prawie 20 lat.
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
(i nie starzeje się z godnością)
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
Wirtualna Polska kiedyś
Grudzień 1998
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
Mobile kiedyś
Grudzień 1998
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
Mobile kiedyś
Grudzień 1998
HTTP/2 to the rescue!
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
(SPDY)
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
Goodies
HTTP/2
- 1:1 zgodność z HTTP/1.1 - (te same metody, kody statusów, semantyka)
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
Goodies
HTTP/2
- 1:1 zgodność z HTTP/1.1 - (te same metody, kody statusów, semantyka)
- protokół binarny - (łatwiejszy do zinterpretowania przez serwer)
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
Goodies
HTTP/2
- 1:1 zgodność z HTTP/1.1 - (te same metody, kody statusów, semantyka)
- protokół binarny - (łatwiejszy do zinterpretowania przez serwer)
- kompresja nagłówków (HPACK)
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
Kompresja nagłówków (HPACK)
HTTP/2
:authority
:
gabo.re
:method GET
:path /test/test.html
:scheme https
accept text/html,applicatio
n/xhtml+xml,applic
ation/xml;q=0.9,im
age/webp,*/*;q=0.8
user-
agent
Mozilla/5.0
(Macintosh; Intel
Mac OS X 10_11_0)
AppleWebKit/537.3
6 (KHTML, like
Gecko)
Chrome/45.0.2454.
85 Safari/537.36
REQUEST
1 :authority
:
gabo.re
2 :method GET
… … …
25 :path /test/test.htm
l
… … …
67 :scheme https
… … …
88 accept text/html,app
lication/xhtml
…
89 user-
agent
Mozilla/5.0
(Macintosh;
Intel…
1
2
…
25 :path /test/bla.html
…
67
…
88
89
ENCODED HEADERS
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
Goodies
HTTP/2
- 1:1 zgodność z HTTP/1.1 - (te same metody, kody statusów, semantyka)
- protokół binarny - (łatwiejszy do zinterpretowania przez serwer)
- kompresja nagłówków (HPACK)
- multiplexing - (flow control, priorytety)
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
Multiplexing
HTTP/2
3 assety, total: ~810 ms
3G, Orange, zasięg 4/5.
…
KOMPRESJA
NAGŁOWKÓW
KOMPRESJA
NAGŁOWKÓW
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
Demo
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
Kompresja nagłówków (HPACK)
HTTP/2
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
Goodies
HTTP/2
- 1:1 zgodność z HTTP/1.1 - (te same metody, kody statusów, semantyka)
- protokół binarny - (łatwiejszy do zinterpretowania przez serwer)
- kompresja nagłówków (HPACK)
- multiplexing - (flow control, priorytety)
- server push - (WIP)
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
Server push
HTTP/2
GET /index.html
/index.html
/script.js
/styles.css
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
Goodies
HTTP/2
- 1:1 zgodność z HTTP/1.1 - (te same metody, kody statusów, semantyka)
- protokół binarny - (łatwiejszy do zinterpretowania przez serwer)
- kompresja nagłówków (HPACK)
- multiplexing - (flow control, priorytety)
- server push - (WIP)
- stream termination
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
Early Adopters
HTTP/2
- facebook.com – spdy/3.1
- google.com – QUIC + spdy/3.0
- yahoo.com – spdy/3.1
- twitter.com – http/2
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
Early Adopters
HTTP/2
- facebook.com – spdy/3.1
- google.com – QUIC + spdy/3.0
- yahoo.com – spdy/3.1
- twitter.com – http/2
- Wirtualna Polska (API native mobile + Image Resizer) - spdy/3.1 + http/2
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
Przeglądarki
HTTP/2 - wsparcie
- Chrome + Chrome Android + Chrome dla iOS
- Firefox >= 36
- Internet Explorer 11
- Microsoft Edge
- Opera >= 29
- Safari >= 9
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
Native Mobile
HTTP/2 - wsparcie
- iOS8 - SPDY, iOS9 - globalnie HTTP2 (NSURLSession)
- Android 2.3 - HTTP2 + SPDY (OkHttp)
- Windows Phone 8.1 - SPDY, Windows 10 - HTTP/2
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
i co dalej?
Jak zacząć?
- Python - hyper - https://github.com/lukasa/hyper
- Go - http2 - https://github.com/bradfitz/http2
- Server, client + narzędzia - https://nghttp2.org
- nginx (super alpha, non production) - http://nginx.org/patches/http2/
+ ~40 implementacji (Java, Ruby, Swift, etc.) - https://http2.github.io
Dziękuję!
Bye, bye.
Jest coś co przykuło Twoją uwagę w tej
prezentacji? Porozmawiajmy!
Optymalizacja
HTTP/1.1
HTTP/2
Co dalej?
Gabor Wnuk
Software Architect / Team Leader
Zespół Aplikacji Mobilnych
gabor.wnuk@grupawp.pl

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Wprowadzenie do HTTP/2

Editor's Notes

  1. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  2. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  3. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  4. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  5. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  6. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  7. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  8. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  9. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  10. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  11. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  12. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  13. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  14. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  15. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  16. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  17. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  18. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  19. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  20. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  21. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  22. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  23. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  24. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  25. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  26. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  27. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  28. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  29. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio
  30. This template has several Blank Master pages. When you alter navigation you have to change it on all master pages. If you like this file please take a minute to rate it 5 stars! It only takes 5 seconds ☺ http://graphicriver.net/user/Kilik/portfolio