SlideShare a Scribd company logo
1 of 37
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
Recent Advances in HTTP,
controlling them using ruby
DeNA Co., Ltd.
Kazuho Oku
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
Who am I
 lead developer of H2O HTTP/2 server
⁃ one of the most sophisticated HTTP/2 impl.
⁃ initial public release: 2014/10 (license: MITL)
⁃ used by Fastly, etc.
 author of Cache-Digests Internet Draft
⁃ considered as an essential work for HTTP/2 push
 works at DeNA Co., Ltd.
 also developer of: Q4M, Starlet, pisojson, ...
2Recend Advances in HTTP2, controlling them using ruby
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
Current State of HTTP
3Recend Advances in HTTP2, controlling them using ruby
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
Why use HTTP/2?
 latency has become the bottleneck of the Web
 HTTP/2 to conceal latency by raising concurrency
⁃ 6 concurrent requests in HTTP/1
⁃ ~100 in HTTP/2
4Recend Advances in HTTP2, controlling them using ruby
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
Current state of HTTP
 HTTP/2 (RFC 7540) released on May 2015
1: https://github.com/HTTPWorkshop/workshop2016/blob/master/talks/http2-review-data.pdf
5Recend Advances in HTTP2, controlling them using ruby
45
28
37
41
18
31
0% 20% 40% 60% 80% 100%
2015/7
2016/7
# of transactions by Firefox1
HTTP HTTPS (H1) HTTPS (H2)
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
Key features of HTTP/2
 header compression (HPACK)
 multiplexing & prioritization
 push
6Recend Advances in HTTP2, controlling them using ruby
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
Header compression
 working well
 according to Mozilla1:
⁃ median – 90% reduction
⁃ 80th percentile – 75% reduction
⁃ 90th – 10% reduction
7Recend Advances in HTTP2, controlling them using ruby
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
Multiplexing & prioritization
 HTTP/2 multiplexes responses into one TCP conn.
⁃ client gives hint for prioritization
⁃ server uses the hint to schedule the responses
 but some client-server pairs don’t do it right
8Recend Advances in HTTP2, controlling them using ruby
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
Push
 positive reports:
⁃ “20-30% speedup on page render time”2
 negative comments:
⁃ many unnecessary pushes (47% are reset2)
⁃ increased render time in anti-patterns3
⁃ “consider preload instead of push”3
 push from edge
⁃ how?
2: https://github.com/HTTPWorkshop/workshop2016/blob/master/talks/server-push.pdf
3: https://docs.google.com/document/d/1K0NykTXBbbbTlv60t5MyJvXjqKGsCVNYHyLEXIxYMv0/edit
9Recend Advances in HTTP2, controlling them using ruby
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
Fixes?
10Recend Advances in HTTP2, controlling them using ruby
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
Flow of an ideal HTTP transaction
 respond to high-priority requests
immediately
 send resources in right order
⁃ first send CSS/JS
⁃ then send the HTML
⁃ then send the images
 push only the resources not cached
by the client
11Recend Advances in HTTP2, controlling them using ruby
client server
1RTT
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
The reality
 respond to high-priority requests
immediately
⁃ blocked by unsent data in TCP
 send resources in right order
⁃ some browsers don’t specify
priority, some servers fail to
respect priority
⁃ issues caused by hidden resources
 push only the resources not cached
by the client
⁃ how?
12Recend Advances in HTTP2, controlling them using ruby
client server
1RTT
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
TCP head-of-line blocking
 head-of-line (HoL) blocking:
⁃ high-priority data blocked by preceding data in
flight
 TCP HoL blocking:
⁃ data in TCP send buffer blocks following data of
higher priority
13Recend Advances in HTTP2, controlling them using ruby
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
TCP head-of-line blocking
14Recend Advances in HTTP2, controlling them using ruby
 typical H2 server writes much more than that can be
sent immediately
⁃ unsent data in TCP send buffer (and TLS buffer)
HOL-blocks following data
TCP send buffer
CWND
unacked poll threshold
TLS buf.
TLS Records
sent immediately not immediately sent
HTTP/2 frames
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
TCP head-of-line blocking: the solution
 write only what can be sent immediately
⁃ obtain CWND and unacked size using TCP_INFO
 adjust poll threshold to delay write notification until
TCP becomes ready to send some data immediately
15Recend Advances in HTTP2, controlling them using ruby
CWND
unacked poll threshold
TLS Records
sent immediately not immediately sent
HTTP/2 frames
TCP send buffer
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
TCP head-of-line blocking: benchmark 1
16Recend Advances in HTTP2, controlling them using ruby
 conditions:
⁃ server in Ireland, client in Tokyo (RTT 250ms)
⁃ load tiny js at the top of a large HTML
 result: delay decreased from 511ms to 250ms
⁃ i.e. JS fetch latency was 2RTT, became 1 RTT
• similar results in other environments
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
TCP head-of-line blocking: benchmark 2
 using same data as previous
 server: Sakura VPS (Ishikari DC)
17Recend Advances in HTTP2, controlling them using ruby
0
50
100
150
200
250
300
HTML JS
milliseconds
downloading HTML (and JS within)
RTT ~25ms
master latopt
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
HTTP/2 prioritization
18Recend Advances in HTTP2, controlling them using ruby
Root
Leader G
Follower G
weight: 1
HTML
weight: 32
Image
weight: 22
Image
weight: 22
Image
weight: 22
CSS
weight: 32
CSS
weight: 32
 hybrid approach using weights and chaining
⁃ servers are expected to obey to the priority
specified by the clients
 Firefox’s prioritization graph is shown below
JS
weight: 32
JS
weight: 32
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
HTTP/2 prioritization
 some web browsers fail to specify priority
⁃ Safari, Blink
⁃ older versions of Chrome also had issues
⁃ server-side countermeasures required
19Recend Advances in HTTP2, controlling them using ruby
Root
HTML
weight: 16
CSS
weight: 16
JS
weight: 16
Image
weight: 16
Image
weight: 16
Image
weight: 16
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
HTTP/2 prioritization: the solution
 bandwidth distribution on server-side:
⁃ use Weighted Fair Queuing (WFQ) or Deficit
Round Robin (DRR)
⁃ some servers do it right:
• nghttp2 (and Apache) implements WFQ in O(log N)
• H2O approximates WFQ in O(1)
 detect dumb clients and fallback to server-driven
prioritization
⁃ H2O reprioritizes CSS, JS for clients that do not
use priority chains
20Recend Advances in HTTP2, controlling them using ruby
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
HTTP/2 prioritization: benchmark
 differences between the times spent until first-paint
(red bar)
21Recend Advances in HTTP2, controlling them using ruby
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
Hidden resource
 hidden resource: a resource
specified in CSS (@import) or
JavaScript
⁃ was anti-pattern in HTTP/1
⁃ anti-pattern in HTTP/2 as well
 solution:
⁃ avoid use of hidden resources
that block rendering (e.g. CSS,
JS)
⁃ or, specify them using link:
rel=preload
22Recend Advances in HTTP2, controlling them using ruby
client server
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
Push
 three use-cases:
⁃ prioritization
⁃ push while processing request
⁃ push from edge
23Recend Advances in HTTP2, controlling them using ruby
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
Pushing for prioritization
24Recend Advances in HTTP2, controlling them using ruby
client server
GET /
GET
/style.css
HTTP/2 200 OK
<html>
<link
rel=style.css...
HTTP/2 200 OK
body: ...
#title: ...
1. send CSS, JS first
2. then send HTML
(can be rendered
progressively)
without push
client server
GET /
GET /style.css HTTP/2
HTTP/2 200 OK
body: ...
#title: ...
with push
HTTP/2 200 OK
<html>
<link rel=style.css ...
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
Push while processing request
 web applications involving DB access, etc.
25Recend Advances in HTTP2, controlling them using ruby
req.
processrequest
push-asset
HTML
push-asset
push-asset
push-asset
req.
processrequest
asset
HTML
asset
asset
asset
req.
450ms(5RTT+processingme)
250ms(1RTT+processingme)
without push with push
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
Push from edge
 CDNs’ use-case
⁃ utilize the conn. while waiting for app. response
26Recend Advances in HTTP2, controlling them using ruby
req.
push-asset
HTML
push-asset
push-asset
push-asset
client edge server (CDN) app. server
req.
HTML
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
How to push
 H2 server may push preloaded links
⁃ e.g. Link: </style.css>; rel=preload
⁃ H2 server may push preloaded links
⁃ recognized by Apache, H2O, nghttp2
⁃ patch exists for Nginx
 use nopush attribute to opt-out
⁃ e.g. Link: </dontpush.jpg>; rel=preload; nopush
 note: use of preload as a push indicator is upon the
process of standardization at W3C
27Recend Advances in HTTP2, controlling them using ruby
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
How to push while processing request
28Recend Advances in HTTP2, controlling them using ruby
 send Link: rel=preload as interim response
⁃ application sends 100 then processes the request
 supported in H2O 2.1
GET / HTTP/1.1
Host: example.com
HTTP/1.1 100 Continue
Link: </style.css>; rel=preload
HTTP/1.1 200 OK
Content-Type: text/html
<!DOCTYPE HTML>
...
HTTP/2 server app. server Web app.
GET /
100 Continue
Link: …
GET /
200 OK
200 OK
processrequest
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
How to push while processing request
 configure your H2 server
⁃ in case of H2O:
mruby.handler: |
Proc.new do |env|
push_paths = []
if /(/|.html)$/.match(env["PATH_INFO"])
push_paths << "/style.css”
...
end
[399, push_paths.empty? ? {} : {"link" =>
push_paths.map{|p| "<#{p}>; rel=preload"}.join("n")}, []]
end
file.dir: /path/to/doc-root
29Recend Advances in HTTP2, controlling them using ruby
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
BTW, you can do more by using mruby
 HTTP authentication
mruby.handler: |
require "htpasswd.rb"
Htpasswd.new("/path/to/.htpasswd", "realm-name")
 DoS mitigation
mruby.handler: |
require "dos_detector.rb"
DoSDetector.new({
:strategy => DoSDetector.CountingStrategy.new({
:period => 10,
:threshold => 100,
:ban_period => 300,
}),
})
30Recend Advances in HTTP2, controlling them using ruby
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
... and more
 Access Control
mruby.handler: |
acl {
allow { addr == "127.0.0.1" }
deny {
user_agent.match(/curl/i) && !addr.start_with?("192.168.")
}
respond(503, {}, ["Service Unavailable"]) {
addr == malicious_ip
}
redirect("https://example.com/", 301) {
path =~ /moved/
}
use Htpasswd.new("/path/to/.htpasswd", "realm") {
path.start_with?("/admin")
}
}
31Recend Advances in HTTP2, controlling them using ruby
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
... and more
 fast IPv4 address matching using Trie4
mruby.handler: |
require "trie_addr.rb"
trie = TrieAddr.new.add([
"192.168.0.0/16", "172.16.0.0/12", ...]
)
acl {
allow { trie.match?(addr) }
deny
}
4: http://dsas.blog.klab.org/archives/51293338.html
32Recend Advances in HTTP2, controlling them using ruby
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
How to push from edge
 depends on CDN
⁃ some CDNs may use RUM-based approach
⁃ others may provide DSL
• GCP provides http2-push-manifest (JSON-based)
⁃ though cannot be used for pushing from edge
⁃ anybody using (m)ruby on edge?
33Recend Advances in HTTP2, controlling them using ruby
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
Push vs. cache
 why would you ever push cached resources?
⁃ it’s waste of bandwidth (and time)
 several ways to avoid pushing cached resources
⁃ cookie-based
• supported by H2O
⁃ cache-digest
• supported by Apache, H2O
• needs browser support or ServiceWorker script
• standardization in process at IETF
⁃ implement your own
34Recend Advances in HTTP2, controlling them using ruby
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
Avoiding negative effect caused by push
 don’t push unless your mechanism is cache-aware
 only push resources that block rendering
⁃ reason:
• H2 endpoints have difficulty in distributing bandwidth
bet. pushed and pulled responses
• negative effect caused by HoL blocking, prioritization
and hidden resources becomes more apparent with
push
 above rules don’t apply to the tiny pushes
⁃ i.e. those used as a replacement for inlining (i.e.
<img src=“data:...”>)
35Recend Advances in HTTP2, controlling them using ruby
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
Summary
36Recend Advances in HTTP2, controlling them using ruby
Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved.
Summary
 HTTP/2 has become popular
 the effectiveness varies between implementations
⁃ HoL-blocking avoidance, prioritization, cache-
aware push, ...
⁃ upcoming specs (e.g. TLS/1.3, QUIC) may cause
even more difference
⁃ careful evaluation of servers / CDNs is important
 H2O is the leader in HTTP/2 server performance
⁃ and can be configured using mruby
37Recend Advances in HTTP2, controlling them using ruby

More Related Content

What's hot

Promise of Push (HTTP/2 Web Performance)
Promise of Push (HTTP/2 Web Performance)Promise of Push (HTTP/2 Web Performance)
Promise of Push (HTTP/2 Web Performance)Colin Bendell
 
HTTP2:新的机遇与挑战
HTTP2:新的机遇与挑战HTTP2:新的机遇与挑战
HTTP2:新的机遇与挑战Jerry Qu
 
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
 
HTTP/2 for Developers
HTTP/2 for DevelopersHTTP/2 for Developers
HTTP/2 for DevelopersSvetlin Nakov
 
HTTP2 and gRPC
HTTP2 and gRPCHTTP2 and gRPC
HTTP2 and gRPCGuo Jing
 
Nginx, PHP, Apache and Spelix
Nginx, PHP, Apache and SpelixNginx, PHP, Apache and Spelix
Nginx, PHP, Apache and SpelixHarald Zeitlhofer
 
Introduction to HTTP/2
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2Ido Flatow
 
HTTP/2 Introduction
HTTP/2 IntroductionHTTP/2 Introduction
HTTP/2 IntroductionWalter Liu
 
RIPE 71 and IETF 94 reports webinar
RIPE 71 and IETF 94 reports webinarRIPE 71 and IETF 94 reports webinar
RIPE 71 and IETF 94 reports webinarMen and Mice
 
Load Balancing with HAproxy
Load Balancing with HAproxyLoad Balancing with HAproxy
Load Balancing with HAproxyBrendan Jennings
 
HTTP/2 Update - FOSDEM 2016
HTTP/2 Update - FOSDEM 2016HTTP/2 Update - FOSDEM 2016
HTTP/2 Update - FOSDEM 2016Daniel Stenberg
 
How To Set Up SQL Load Balancing with HAProxy - Slides
How To Set Up SQL Load Balancing with HAProxy - SlidesHow To Set Up SQL Load Balancing with HAProxy - Slides
How To Set Up SQL Load Balancing with HAProxy - SlidesSeveralnines
 
Are we really ready to turn off IPv4?
Are we really ready to turn off IPv4?Are we really ready to turn off IPv4?
Are we really ready to turn off IPv4?APNIC
 
Revisiting HTTP/2
Revisiting HTTP/2Revisiting HTTP/2
Revisiting HTTP/2Fastly
 
HAProxy scale out using open source
HAProxy scale out using open sourceHAProxy scale out using open source
HAProxy scale out using open sourceIngo Walz
 
HTTP/2, HTTP/3 and SSL/TLS State of the Art in Our Servers
HTTP/2, HTTP/3 and SSL/TLS State of the Art in Our ServersHTTP/2, HTTP/3 and SSL/TLS State of the Art in Our Servers
HTTP/2, HTTP/3 and SSL/TLS State of the Art in Our ServersJean-Frederic Clere
 

What's hot (19)

Promise of Push (HTTP/2 Web Performance)
Promise of Push (HTTP/2 Web Performance)Promise of Push (HTTP/2 Web Performance)
Promise of Push (HTTP/2 Web Performance)
 
HTTP2:新的机遇与挑战
HTTP2:新的机遇与挑战HTTP2:新的机遇与挑战
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
 
HTTP/2 for Developers
HTTP/2 for DevelopersHTTP/2 for Developers
HTTP/2 for Developers
 
Grpc present
Grpc presentGrpc present
Grpc present
 
HTTP2 and gRPC
HTTP2 and gRPCHTTP2 and gRPC
HTTP2 and gRPC
 
Nginx, PHP, Apache and Spelix
Nginx, PHP, Apache and SpelixNginx, PHP, Apache and Spelix
Nginx, PHP, Apache and Spelix
 
Introduction to HTTP/2
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2
 
HTTP/2 Introduction
HTTP/2 IntroductionHTTP/2 Introduction
HTTP/2 Introduction
 
Http2 right now
Http2 right nowHttp2 right now
Http2 right now
 
RIPE 71 and IETF 94 reports webinar
RIPE 71 and IETF 94 reports webinarRIPE 71 and IETF 94 reports webinar
RIPE 71 and IETF 94 reports webinar
 
Load Balancing with HAproxy
Load Balancing with HAproxyLoad Balancing with HAproxy
Load Balancing with HAproxy
 
Http2
Http2Http2
Http2
 
HTTP/2 Update - FOSDEM 2016
HTTP/2 Update - FOSDEM 2016HTTP/2 Update - FOSDEM 2016
HTTP/2 Update - FOSDEM 2016
 
How To Set Up SQL Load Balancing with HAProxy - Slides
How To Set Up SQL Load Balancing with HAProxy - SlidesHow To Set Up SQL Load Balancing with HAProxy - Slides
How To Set Up SQL Load Balancing with HAProxy - Slides
 
Are we really ready to turn off IPv4?
Are we really ready to turn off IPv4?Are we really ready to turn off IPv4?
Are we really ready to turn off IPv4?
 
Revisiting HTTP/2
Revisiting HTTP/2Revisiting HTTP/2
Revisiting HTTP/2
 
HAProxy scale out using open source
HAProxy scale out using open sourceHAProxy scale out using open source
HAProxy scale out using open source
 
HTTP/2, HTTP/3 and SSL/TLS State of the Art in Our Servers
HTTP/2, HTTP/3 and SSL/TLS State of the Art in Our ServersHTTP/2, HTTP/3 and SSL/TLS State of the Art in Our Servers
HTTP/2, HTTP/3 and SSL/TLS State of the Art in Our Servers
 

Similar to Recent Advances in HTTP, controlling them using ruby

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
 
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
 
Reorganizing Website Architecture for HTTP/2 and Beyond
Reorganizing Website Architecture for HTTP/2 and BeyondReorganizing Website Architecture for HTTP/2 and Beyond
Reorganizing Website Architecture for HTTP/2 and BeyondKazuho Oku
 
Стек Linux HTTPS/TCP/IP для защиты от HTTP-DDoS-атак
Стек Linux HTTPS/TCP/IP для защиты от HTTP-DDoS-атакСтек Linux HTTPS/TCP/IP для защиты от HTTP-DDoS-атак
Стек Linux HTTPS/TCP/IP для защиты от HTTP-DDoS-атакPositive Hack Days
 
Introducing HTTP/2
Introducing HTTP/2Introducing HTTP/2
Introducing HTTP/2Ido Flatow
 
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
 
HTML5, HTTP2, and You 1.1
HTML5, HTTP2, and You 1.1HTML5, HTTP2, and You 1.1
HTML5, HTTP2, and You 1.1Daniel Austin
 
The new (is it really ) api stack
The new (is it really ) api stackThe new (is it really ) api stack
The new (is it really ) api stackLuca Mattia Ferrari
 
HTTP colon slash slash: end of the road? @ CakeFest 2013 in San Francisco
HTTP colon slash slash: end of the road? @ CakeFest 2013 in San FranciscoHTTP colon slash slash: end of the road? @ CakeFest 2013 in San Francisco
HTTP colon slash slash: end of the road? @ CakeFest 2013 in San FranciscoAlessandro Nadalin
 
CON5898 What Servlet 4.0 Means To You
CON5898 What Servlet 4.0 Means To YouCON5898 What Servlet 4.0 Means To You
CON5898 What Servlet 4.0 Means To YouEdward Burns
 
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
 
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
 
Servlet 4.0 at GeekOut 2015
Servlet 4.0 at GeekOut 2015Servlet 4.0 at GeekOut 2015
Servlet 4.0 at GeekOut 2015Edward Burns
 
Improving performance by changing the rules from fast to SPDY
Improving performance by changing the rules   from fast to SPDYImproving performance by changing the rules   from fast to SPDY
Improving performance by changing the rules from fast to SPDYCotendo
 
From Fast To SPDY
From Fast To SPDYFrom Fast To SPDY
From Fast To SPDYMike Belshe
 
Meetup Tech Talk on Web Performance
Meetup Tech Talk on Web PerformanceMeetup Tech Talk on Web Performance
Meetup Tech Talk on Web PerformanceJean Tunis
 
Http 2: Should I care?
Http 2: Should I care?Http 2: Should I care?
Http 2: Should I care?LivePerson
 

Similar to Recent Advances in HTTP, controlling them using ruby (20)

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
 
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
 
Reorganizing Website Architecture for HTTP/2 and Beyond
Reorganizing Website Architecture for HTTP/2 and BeyondReorganizing Website Architecture for HTTP/2 and Beyond
Reorganizing Website Architecture for HTTP/2 and Beyond
 
Стек Linux HTTPS/TCP/IP для защиты от HTTP-DDoS-атак
Стек Linux HTTPS/TCP/IP для защиты от HTTP-DDoS-атакСтек Linux HTTPS/TCP/IP для защиты от HTTP-DDoS-атак
Стек Linux HTTPS/TCP/IP для защиты от HTTP-DDoS-атак
 
Introducing HTTP/2
Introducing HTTP/2Introducing HTTP/2
Introducing HTTP/2
 
Next generation web protocols
Next generation web protocolsNext generation web protocols
Next generation web protocols
 
Http2
Http2Http2
Http2
 
Introduction to HTTP/2
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2
 
HTML5, HTTP2, and You 1.1
HTML5, HTTP2, and You 1.1HTML5, HTTP2, and You 1.1
HTML5, HTTP2, and You 1.1
 
The new (is it really ) api stack
The new (is it really ) api stackThe new (is it really ) api stack
The new (is it really ) api stack
 
HTTP colon slash slash: end of the road? @ CakeFest 2013 in San Francisco
HTTP colon slash slash: end of the road? @ CakeFest 2013 in San FranciscoHTTP colon slash slash: end of the road? @ CakeFest 2013 in San Francisco
HTTP colon slash slash: end of the road? @ CakeFest 2013 in San Francisco
 
CON5898 What Servlet 4.0 Means To You
CON5898 What Servlet 4.0 Means To YouCON5898 What Servlet 4.0 Means To You
CON5898 What Servlet 4.0 Means To You
 
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.
 
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
 
Servlet 4.0 at GeekOut 2015
Servlet 4.0 at GeekOut 2015Servlet 4.0 at GeekOut 2015
Servlet 4.0 at GeekOut 2015
 
Http/2
Http/2Http/2
Http/2
 
Improving performance by changing the rules from fast to SPDY
Improving performance by changing the rules   from fast to SPDYImproving performance by changing the rules   from fast to SPDY
Improving performance by changing the rules from fast to SPDY
 
From Fast To SPDY
From Fast To SPDYFrom Fast To SPDY
From Fast To SPDY
 
Meetup Tech Talk on Web Performance
Meetup Tech Talk on Web PerformanceMeetup Tech Talk on Web Performance
Meetup Tech Talk on Web Performance
 
Http 2: Should I care?
Http 2: Should I care?Http 2: Should I care?
Http 2: Should I care?
 

More from Kazuho Oku

QUIC標準化動向 〜2017/7
QUIC標準化動向 〜2017/7QUIC標準化動向 〜2017/7
QUIC標準化動向 〜2017/7Kazuho Oku
 
HTTP/2の課題と将来
HTTP/2の課題と将来HTTP/2の課題と将来
HTTP/2の課題と将来Kazuho Oku
 
TLS 1.3 と 0-RTT のこわ〜い話
TLS 1.3 と 0-RTT のこわ〜い話TLS 1.3 と 0-RTT のこわ〜い話
TLS 1.3 と 0-RTT のこわ〜い話Kazuho Oku
 
TLS & LURK @ IETF 95
TLS & LURK @ IETF 95TLS & LURK @ IETF 95
TLS & LURK @ IETF 95Kazuho Oku
 
HTTPとサーバ技術の最新動向
HTTPとサーバ技術の最新動向HTTPとサーバ技術の最新動向
HTTPとサーバ技術の最新動向Kazuho Oku
 
ウェブを速くするためにDeNAがやっていること - HTTP/2と、さらにその先
ウェブを速くするためにDeNAがやっていること - HTTP/2と、さらにその先ウェブを速くするためにDeNAがやっていること - HTTP/2と、さらにその先
ウェブを速くするためにDeNAがやっていること - HTTP/2と、さらにその先Kazuho Oku
 
HTTP/2時代のウェブサイト設計
HTTP/2時代のウェブサイト設計HTTP/2時代のウェブサイト設計
HTTP/2時代のウェブサイト設計Kazuho Oku
 
H2O - making HTTP better
H2O - making HTTP betterH2O - making HTTP better
H2O - making HTTP betterKazuho Oku
 
JSON SQL Injection and the Lessons Learned
JSON SQL Injection and the Lessons LearnedJSON SQL Injection and the Lessons Learned
JSON SQL Injection and the Lessons LearnedKazuho Oku
 
JSX 速さの秘密 - 高速なJavaScriptを書く方法
JSX 速さの秘密 - 高速なJavaScriptを書く方法JSX 速さの秘密 - 高速なJavaScriptを書く方法
JSX 速さの秘密 - 高速なJavaScriptを書く方法Kazuho Oku
 
JSX の現在と未来 - Oct 26 2013
JSX の現在と未来 - Oct 26 2013JSX の現在と未来 - Oct 26 2013
JSX の現在と未来 - Oct 26 2013Kazuho Oku
 
Using the Power to Prove
Using the Power to ProveUsing the Power to Prove
Using the Power to ProveKazuho Oku
 
JSX - 公開から1年を迎えて
JSX - 公開から1年を迎えてJSX - 公開から1年を迎えて
JSX - 公開から1年を迎えてKazuho Oku
 
JSX - developing a statically-typed programming language for the Web
JSX - developing a statically-typed programming language for the WebJSX - developing a statically-typed programming language for the Web
JSX - developing a statically-typed programming language for the WebKazuho Oku
 
ウェブブラウザの時代は終わるのか 〜スマホアプリとHTML5の未来〜
ウェブブラウザの時代は終わるのか 〜スマホアプリとHTML5の未来〜ウェブブラウザの時代は終わるのか 〜スマホアプリとHTML5の未来〜
ウェブブラウザの時代は終わるのか 〜スマホアプリとHTML5の未来〜Kazuho Oku
 
JSX Design Overview (日本語)
JSX Design Overview (日本語)JSX Design Overview (日本語)
JSX Design Overview (日本語)Kazuho Oku
 
Unix Programming with Perl 2
Unix Programming with Perl 2Unix Programming with Perl 2
Unix Programming with Perl 2Kazuho Oku
 

More from Kazuho Oku (20)

QUIC標準化動向 〜2017/7
QUIC標準化動向 〜2017/7QUIC標準化動向 〜2017/7
QUIC標準化動向 〜2017/7
 
HTTP/2の課題と将来
HTTP/2の課題と将来HTTP/2の課題と将来
HTTP/2の課題と将来
 
TLS 1.3 と 0-RTT のこわ〜い話
TLS 1.3 と 0-RTT のこわ〜い話TLS 1.3 と 0-RTT のこわ〜い話
TLS 1.3 と 0-RTT のこわ〜い話
 
TLS & LURK @ IETF 95
TLS & LURK @ IETF 95TLS & LURK @ IETF 95
TLS & LURK @ IETF 95
 
HTTPとサーバ技術の最新動向
HTTPとサーバ技術の最新動向HTTPとサーバ技術の最新動向
HTTPとサーバ技術の最新動向
 
ウェブを速くするためにDeNAがやっていること - HTTP/2と、さらにその先
ウェブを速くするためにDeNAがやっていること - HTTP/2と、さらにその先ウェブを速くするためにDeNAがやっていること - HTTP/2と、さらにその先
ウェブを速くするためにDeNAがやっていること - HTTP/2と、さらにその先
 
HTTP/2時代のウェブサイト設計
HTTP/2時代のウェブサイト設計HTTP/2時代のウェブサイト設計
HTTP/2時代のウェブサイト設計
 
H2O - making HTTP better
H2O - making HTTP betterH2O - making HTTP better
H2O - making HTTP better
 
JSON SQL Injection and the Lessons Learned
JSON SQL Injection and the Lessons LearnedJSON SQL Injection and the Lessons Learned
JSON SQL Injection and the Lessons Learned
 
JSX 速さの秘密 - 高速なJavaScriptを書く方法
JSX 速さの秘密 - 高速なJavaScriptを書く方法JSX 速さの秘密 - 高速なJavaScriptを書く方法
JSX 速さの秘密 - 高速なJavaScriptを書く方法
 
JSX の現在と未来 - Oct 26 2013
JSX の現在と未来 - Oct 26 2013JSX の現在と未来 - Oct 26 2013
JSX の現在と未来 - Oct 26 2013
 
Using the Power to Prove
Using the Power to ProveUsing the Power to Prove
Using the Power to Prove
 
JSX - 公開から1年を迎えて
JSX - 公開から1年を迎えてJSX - 公開から1年を迎えて
JSX - 公開から1年を迎えて
 
JSX - developing a statically-typed programming language for the Web
JSX - developing a statically-typed programming language for the WebJSX - developing a statically-typed programming language for the Web
JSX - developing a statically-typed programming language for the Web
 
ウェブブラウザの時代は終わるのか 〜スマホアプリとHTML5の未来〜
ウェブブラウザの時代は終わるのか 〜スマホアプリとHTML5の未来〜ウェブブラウザの時代は終わるのか 〜スマホアプリとHTML5の未来〜
ウェブブラウザの時代は終わるのか 〜スマホアプリとHTML5の未来〜
 
JSX
JSXJSX
JSX
 
JSX Optimizer
JSX OptimizerJSX Optimizer
JSX Optimizer
 
JSX Design Overview (日本語)
JSX Design Overview (日本語)JSX Design Overview (日本語)
JSX Design Overview (日本語)
 
JSX
JSXJSX
JSX
 
Unix Programming with Perl 2
Unix Programming with Perl 2Unix Programming with Perl 2
Unix Programming with Perl 2
 

Recently uploaded

Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on DeliveryCall Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Deliverybabeytanya
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Paul Calvano
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...
Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...
Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...akbard9823
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMartaLoveguard
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作ys8omjxb
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一Fs
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Roomdivyansh0kumar0
 
Denver Web Design brochure for public viewing
Denver Web Design brochure for public viewingDenver Web Design brochure for public viewing
Denver Web Design brochure for public viewingbigorange77
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Dana Luther
 
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一Fs
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Roomishabajaj13
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsThierry TROUIN ☁
 

Recently uploaded (20)

Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on DeliveryCall Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...
Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...
Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptx
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
 
Denver Web Design brochure for public viewing
Denver Web Design brochure for public viewingDenver Web Design brochure for public viewing
Denver Web Design brochure for public viewing
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
 
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with Flows
 

Recent Advances in HTTP, controlling them using ruby

  • 1. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. Recent Advances in HTTP, controlling them using ruby DeNA Co., Ltd. Kazuho Oku
  • 2. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. Who am I  lead developer of H2O HTTP/2 server ⁃ one of the most sophisticated HTTP/2 impl. ⁃ initial public release: 2014/10 (license: MITL) ⁃ used by Fastly, etc.  author of Cache-Digests Internet Draft ⁃ considered as an essential work for HTTP/2 push  works at DeNA Co., Ltd.  also developer of: Q4M, Starlet, pisojson, ... 2Recend Advances in HTTP2, controlling them using ruby
  • 3. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. Current State of HTTP 3Recend Advances in HTTP2, controlling them using ruby
  • 4. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. Why use HTTP/2?  latency has become the bottleneck of the Web  HTTP/2 to conceal latency by raising concurrency ⁃ 6 concurrent requests in HTTP/1 ⁃ ~100 in HTTP/2 4Recend Advances in HTTP2, controlling them using ruby
  • 5. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. Current state of HTTP  HTTP/2 (RFC 7540) released on May 2015 1: https://github.com/HTTPWorkshop/workshop2016/blob/master/talks/http2-review-data.pdf 5Recend Advances in HTTP2, controlling them using ruby 45 28 37 41 18 31 0% 20% 40% 60% 80% 100% 2015/7 2016/7 # of transactions by Firefox1 HTTP HTTPS (H1) HTTPS (H2)
  • 6. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. Key features of HTTP/2  header compression (HPACK)  multiplexing & prioritization  push 6Recend Advances in HTTP2, controlling them using ruby
  • 7. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. Header compression  working well  according to Mozilla1: ⁃ median – 90% reduction ⁃ 80th percentile – 75% reduction ⁃ 90th – 10% reduction 7Recend Advances in HTTP2, controlling them using ruby
  • 8. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. Multiplexing & prioritization  HTTP/2 multiplexes responses into one TCP conn. ⁃ client gives hint for prioritization ⁃ server uses the hint to schedule the responses  but some client-server pairs don’t do it right 8Recend Advances in HTTP2, controlling them using ruby
  • 9. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. Push  positive reports: ⁃ “20-30% speedup on page render time”2  negative comments: ⁃ many unnecessary pushes (47% are reset2) ⁃ increased render time in anti-patterns3 ⁃ “consider preload instead of push”3  push from edge ⁃ how? 2: https://github.com/HTTPWorkshop/workshop2016/blob/master/talks/server-push.pdf 3: https://docs.google.com/document/d/1K0NykTXBbbbTlv60t5MyJvXjqKGsCVNYHyLEXIxYMv0/edit 9Recend Advances in HTTP2, controlling them using ruby
  • 10. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. Fixes? 10Recend Advances in HTTP2, controlling them using ruby
  • 11. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. Flow of an ideal HTTP transaction  respond to high-priority requests immediately  send resources in right order ⁃ first send CSS/JS ⁃ then send the HTML ⁃ then send the images  push only the resources not cached by the client 11Recend Advances in HTTP2, controlling them using ruby client server 1RTT
  • 12. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. The reality  respond to high-priority requests immediately ⁃ blocked by unsent data in TCP  send resources in right order ⁃ some browsers don’t specify priority, some servers fail to respect priority ⁃ issues caused by hidden resources  push only the resources not cached by the client ⁃ how? 12Recend Advances in HTTP2, controlling them using ruby client server 1RTT
  • 13. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. TCP head-of-line blocking  head-of-line (HoL) blocking: ⁃ high-priority data blocked by preceding data in flight  TCP HoL blocking: ⁃ data in TCP send buffer blocks following data of higher priority 13Recend Advances in HTTP2, controlling them using ruby
  • 14. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. TCP head-of-line blocking 14Recend Advances in HTTP2, controlling them using ruby  typical H2 server writes much more than that can be sent immediately ⁃ unsent data in TCP send buffer (and TLS buffer) HOL-blocks following data TCP send buffer CWND unacked poll threshold TLS buf. TLS Records sent immediately not immediately sent HTTP/2 frames
  • 15. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. TCP head-of-line blocking: the solution  write only what can be sent immediately ⁃ obtain CWND and unacked size using TCP_INFO  adjust poll threshold to delay write notification until TCP becomes ready to send some data immediately 15Recend Advances in HTTP2, controlling them using ruby CWND unacked poll threshold TLS Records sent immediately not immediately sent HTTP/2 frames TCP send buffer
  • 16. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. TCP head-of-line blocking: benchmark 1 16Recend Advances in HTTP2, controlling them using ruby  conditions: ⁃ server in Ireland, client in Tokyo (RTT 250ms) ⁃ load tiny js at the top of a large HTML  result: delay decreased from 511ms to 250ms ⁃ i.e. JS fetch latency was 2RTT, became 1 RTT • similar results in other environments
  • 17. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. TCP head-of-line blocking: benchmark 2  using same data as previous  server: Sakura VPS (Ishikari DC) 17Recend Advances in HTTP2, controlling them using ruby 0 50 100 150 200 250 300 HTML JS milliseconds downloading HTML (and JS within) RTT ~25ms master latopt
  • 18. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. HTTP/2 prioritization 18Recend Advances in HTTP2, controlling them using ruby Root Leader G Follower G weight: 1 HTML weight: 32 Image weight: 22 Image weight: 22 Image weight: 22 CSS weight: 32 CSS weight: 32  hybrid approach using weights and chaining ⁃ servers are expected to obey to the priority specified by the clients  Firefox’s prioritization graph is shown below JS weight: 32 JS weight: 32
  • 19. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. HTTP/2 prioritization  some web browsers fail to specify priority ⁃ Safari, Blink ⁃ older versions of Chrome also had issues ⁃ server-side countermeasures required 19Recend Advances in HTTP2, controlling them using ruby Root HTML weight: 16 CSS weight: 16 JS weight: 16 Image weight: 16 Image weight: 16 Image weight: 16
  • 20. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. HTTP/2 prioritization: the solution  bandwidth distribution on server-side: ⁃ use Weighted Fair Queuing (WFQ) or Deficit Round Robin (DRR) ⁃ some servers do it right: • nghttp2 (and Apache) implements WFQ in O(log N) • H2O approximates WFQ in O(1)  detect dumb clients and fallback to server-driven prioritization ⁃ H2O reprioritizes CSS, JS for clients that do not use priority chains 20Recend Advances in HTTP2, controlling them using ruby
  • 21. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. HTTP/2 prioritization: benchmark  differences between the times spent until first-paint (red bar) 21Recend Advances in HTTP2, controlling them using ruby
  • 22. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. Hidden resource  hidden resource: a resource specified in CSS (@import) or JavaScript ⁃ was anti-pattern in HTTP/1 ⁃ anti-pattern in HTTP/2 as well  solution: ⁃ avoid use of hidden resources that block rendering (e.g. CSS, JS) ⁃ or, specify them using link: rel=preload 22Recend Advances in HTTP2, controlling them using ruby client server
  • 23. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. Push  three use-cases: ⁃ prioritization ⁃ push while processing request ⁃ push from edge 23Recend Advances in HTTP2, controlling them using ruby
  • 24. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. Pushing for prioritization 24Recend Advances in HTTP2, controlling them using ruby client server GET / GET /style.css HTTP/2 200 OK <html> <link rel=style.css... HTTP/2 200 OK body: ... #title: ... 1. send CSS, JS first 2. then send HTML (can be rendered progressively) without push client server GET / GET /style.css HTTP/2 HTTP/2 200 OK body: ... #title: ... with push HTTP/2 200 OK <html> <link rel=style.css ...
  • 25. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. Push while processing request  web applications involving DB access, etc. 25Recend Advances in HTTP2, controlling them using ruby req. processrequest push-asset HTML push-asset push-asset push-asset req. processrequest asset HTML asset asset asset req. 450ms(5RTT+processingme) 250ms(1RTT+processingme) without push with push
  • 26. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. Push from edge  CDNs’ use-case ⁃ utilize the conn. while waiting for app. response 26Recend Advances in HTTP2, controlling them using ruby req. push-asset HTML push-asset push-asset push-asset client edge server (CDN) app. server req. HTML
  • 27. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. How to push  H2 server may push preloaded links ⁃ e.g. Link: </style.css>; rel=preload ⁃ H2 server may push preloaded links ⁃ recognized by Apache, H2O, nghttp2 ⁃ patch exists for Nginx  use nopush attribute to opt-out ⁃ e.g. Link: </dontpush.jpg>; rel=preload; nopush  note: use of preload as a push indicator is upon the process of standardization at W3C 27Recend Advances in HTTP2, controlling them using ruby
  • 28. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. How to push while processing request 28Recend Advances in HTTP2, controlling them using ruby  send Link: rel=preload as interim response ⁃ application sends 100 then processes the request  supported in H2O 2.1 GET / HTTP/1.1 Host: example.com HTTP/1.1 100 Continue Link: </style.css>; rel=preload HTTP/1.1 200 OK Content-Type: text/html <!DOCTYPE HTML> ... HTTP/2 server app. server Web app. GET / 100 Continue Link: … GET / 200 OK 200 OK processrequest
  • 29. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. How to push while processing request  configure your H2 server ⁃ in case of H2O: mruby.handler: | Proc.new do |env| push_paths = [] if /(/|.html)$/.match(env["PATH_INFO"]) push_paths << "/style.css” ... end [399, push_paths.empty? ? {} : {"link" => push_paths.map{|p| "<#{p}>; rel=preload"}.join("n")}, []] end file.dir: /path/to/doc-root 29Recend Advances in HTTP2, controlling them using ruby
  • 30. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. BTW, you can do more by using mruby  HTTP authentication mruby.handler: | require "htpasswd.rb" Htpasswd.new("/path/to/.htpasswd", "realm-name")  DoS mitigation mruby.handler: | require "dos_detector.rb" DoSDetector.new({ :strategy => DoSDetector.CountingStrategy.new({ :period => 10, :threshold => 100, :ban_period => 300, }), }) 30Recend Advances in HTTP2, controlling them using ruby
  • 31. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. ... and more  Access Control mruby.handler: | acl { allow { addr == "127.0.0.1" } deny { user_agent.match(/curl/i) && !addr.start_with?("192.168.") } respond(503, {}, ["Service Unavailable"]) { addr == malicious_ip } redirect("https://example.com/", 301) { path =~ /moved/ } use Htpasswd.new("/path/to/.htpasswd", "realm") { path.start_with?("/admin") } } 31Recend Advances in HTTP2, controlling them using ruby
  • 32. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. ... and more  fast IPv4 address matching using Trie4 mruby.handler: | require "trie_addr.rb" trie = TrieAddr.new.add([ "192.168.0.0/16", "172.16.0.0/12", ...] ) acl { allow { trie.match?(addr) } deny } 4: http://dsas.blog.klab.org/archives/51293338.html 32Recend Advances in HTTP2, controlling them using ruby
  • 33. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. How to push from edge  depends on CDN ⁃ some CDNs may use RUM-based approach ⁃ others may provide DSL • GCP provides http2-push-manifest (JSON-based) ⁃ though cannot be used for pushing from edge ⁃ anybody using (m)ruby on edge? 33Recend Advances in HTTP2, controlling them using ruby
  • 34. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. Push vs. cache  why would you ever push cached resources? ⁃ it’s waste of bandwidth (and time)  several ways to avoid pushing cached resources ⁃ cookie-based • supported by H2O ⁃ cache-digest • supported by Apache, H2O • needs browser support or ServiceWorker script • standardization in process at IETF ⁃ implement your own 34Recend Advances in HTTP2, controlling them using ruby
  • 35. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. Avoiding negative effect caused by push  don’t push unless your mechanism is cache-aware  only push resources that block rendering ⁃ reason: • H2 endpoints have difficulty in distributing bandwidth bet. pushed and pulled responses • negative effect caused by HoL blocking, prioritization and hidden resources becomes more apparent with push  above rules don’t apply to the tiny pushes ⁃ i.e. those used as a replacement for inlining (i.e. <img src=“data:...”>) 35Recend Advances in HTTP2, controlling them using ruby
  • 36. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. Summary 36Recend Advances in HTTP2, controlling them using ruby
  • 37. Copyright (C) 2016 DeNA Co.,Ltd. All Rights Reserved. Summary  HTTP/2 has become popular  the effectiveness varies between implementations ⁃ HoL-blocking avoidance, prioritization, cache- aware push, ... ⁃ upcoming specs (e.g. TLS/1.3, QUIC) may cause even more difference ⁃ careful evaluation of servers / CDNs is important  H2O is the leader in HTTP/2 server performance ⁃ and can be configured using mruby 37Recend Advances in HTTP2, controlling them using ruby

Editor's Notes

  1. median – 90% reduction 80th percentile – 75% reduction 90th – 10% reduction TODO add source
  2. unicorn の場合も raw socket を取得して