HTTP/1.1 -> SPDY/3.1 -> HTTP/2
by
Tatsuhiko Kubo
Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
HTTP/1.1 -> SPDY/3.1 -> HTTP/2 Tatsuhiko Kubo@cubicdaiya http2 RFCൃߦه೦LT@2015/04/14
Slide 2
Slide 2 text
ࣗݾհ • ٱอୡ(Tatsuhiko Kubo) • bokko@cubicdaiya • Software Engineer in Infrastructure Engineering • Mercari, Inc.
Slide 3
Slide 3 text
is powered by SPDY/3.1(nginx)
Slide 4
Slide 4 text
OSS࡞ͬͨΓίϯτϦϏϡʔτͨ͠Γ
Slide 5
Slide 5 text
Agenda • HTTP/1.1Ͱ௨৴͢ΔWebαΠτͷύϑΥʔϚϯενϡʔχϯά • ↑Λ্ͬͨͰHTTP/2Խͯ͠Έͨ • ࣮ࡍͷWebΞϓϦέʔγϣϯ(Zabbix)Λݩʹܭଌ • Google Develper ToolsͰܭଌ • ࠨԼͷεςʔλεόʔʹදࣔ͞ΕͯΔͭ
Slide 6
Slide 6 text
ຊ͔Βւ֎ͷZabbix dashboardʹΞΫηε
Slide 7
Slide 7 text
Client • MacBookPro • Google Chrome • HTTP/2༗ޮ • ϒϥβΩϟογϡৗʹແޮˣ
Slide 8
Slide 8 text
Server(ॳظঢ়ଶ) • Apache(prefork) + mod_php • தZabbix • KeepAlive Off • gzipѹॖແޮ • TLS Session Cache & Tickets༗ޮ
Slide 9
Slide 9 text
Server(ॳظঢ়ଶ) "QBDIF 1PSU HTTPS Server (PPHMF"VUI1SPYZ "QBDIF 1PSU SSLऴ Ϣʔβೝূ Zabbix
Slide 10
Slide 10 text
ύϑΥʔϚϯε(ॳظঢ়ଶ) ໊߲ ܭଌ લճ ͱͷൺֱ ॳظঢ়ଶ ͱͷൺֱ 3FDFJWFESFRVFTUT %BUB5SBOTGFS ,# -PBE5JNF TFD %0.$POUFOU-PBE FE5JNF TFD
Slide 11
Slide 11 text
νϡʔχϯά ͦͷ1 KeepAlive On KeepAliveΛ༗ޮʹ͢Δ
Slide 12
Slide 12 text
ύϑΥʔϚϯε ໊߲ ܭଌ લճ ͱͷൺֱ ॳظঢ়ଶ ͱͷൺֱ 3FDFJWFESFRVFTUT %BUB5SBOTGFS ,# ,# ,# -PBE5JNF TFD TFD TFD %0.$POUFOU-PBE FE5JNF TFD TFD TFD
Slide 13
Slide 13 text
νϡʔχϯά ͦͷ2 AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/js AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/json-rpc gzipѹॖΛ༗ޮʹ͢Δ
Slide 14
Slide 14 text
ύϑΥʔϚϯε ໊߲ ܭଌ લճ ͱͷൺֱ ॳظঢ়ଶ ͱͷൺֱ 3FDFJWFESFRVFTUT %BUB5SBOTGFS ,# ,# ,# -PBE5JNF TFD TFD TFD %0.$POUFOU-PBEF E5JNF TFD TFD TFD
Slide 15
Slide 15 text
νϡʔχϯάͦͷ3 "QBDIF 1PSU HTTPS Server (PPHMF"VUI1SPYZ "QBDIF 1PSU SSLऴ Ϣʔβೝূ Zabbix OHJOY 1PSU SSLऴΛnginxͰߦ͏
Slide 16
Slide 16 text
νϡʔχϯάͦͷ3 # nginx.conf # in main context worker_processes auto; tcp_nopush on; keepalive_timeout 65s; open_file_cache max=1000 inactive=20s; ssl_session_cache shared:SSL:30m; gzip on; gzip_comp_level 9; gzip_types text/css text/plain text/js text/javascript application/javascript application/json-rpc; # in event context accept_mutex_delay 100ms; # in event context ੩తϑΝΠϧશ෦nginxͰ৴͢Δ
Slide 17
Slide 17 text
ύϑΥʔϚϯε ໊߲ ܭଌ લճ ͱͷൺֱ ॳظঢ়ଶ ͱͷൺֱ 3FDFJWFESFRVFTUT %BUB5SBOTGFS ,# ,# ,# -PBE5JNF TFD TFD TFD %0.$POUFOU-PBEF E5JNF TFD TFD TFD
Slide 18
Slide 18 text
νϡʔχϯάͦͷ4 listen 443 ssl spdy; SPDY/3.1Λ༗ޮʹ͢Δ
Slide 19
Slide 19 text
ύϑΥʔϚϯε ໊߲ ܭଌ લճ ͱͷൺֱ ॳظঢ়ଶ ͱͷൺֱ 3FDFJWFESFRVFTUT %BUB5SBOTGFS ,# ,# ,# -PBE5JNF TFD TFD TFD %0.$POUFOU-PBEF E5JNF TFD TFD TFD
Slide 20
Slide 20 text
νϡʔχϯάͦͷ5 HTTPS Server (PPHMF"VUI1SPYZ "QBDIF 1PSU SSLऴ Ϣʔβೝূ Zabbix OHJOY 1PSU SSLऴΛh2o(HTTP/2)Ͱߦ͏ IP 1PSU
Slide 21
Slide 21 text
ͳ͓ɺh2ogzipѹॖΛ αϙʔτ͍ͯ͠ͳ͍ͷͰ gzipѹॖApacheͰߦ͍·ͨ͠ (gzipѹॖࡁΈϑΝΠϧͷ৴Ͱ͖ΔΑ)
Slide 22
Slide 22 text
ύϑΥʔϚϯε ໊߲ ܭଌ લճ ͱͷൺֱ ॳظঢ়ଶ ͱͷൺֱ 3FDFJWFESFRVFTUT %BUB5SBOTGFS ,# ,# ,# -PBE5JNF TFD TFD TFD %0.$POUFOU-PBEF E5JNF TFD TFD TFD
Slide 23
Slide 23 text
·ͱΊ • WebαΠτ(Zabbix)ΛHTTPαʔόͷνϡʔχϯά͚ͩͰͯ͘͠Έͨ • 4ඵ͔͔ͬͯͨWebϖʔδͷϩʔυ͕1ඵʹͳͬͨ • h2o+HTTP/2ͱnginx+SPDY/3.1Ͱ΄΅ಉ͡ • సૹྔSPDY/3.1ͷ࣌ͱൺͯ7KBݮগ • ϔομѹॖ(HPACK)͕ޮ͍ͯΔ༷ • CPUόϯυͳϕϯνϚʔΫͳΒh2oͷํ͕͍ͣ • ࠓճωοτϫʔΫϨΠςϯγͷ؍͔Βܭଌͯ͠Έ·ͨ͠