SlideShare ist ein Scribd-Unternehmen logo
1 von 9
Copyright (C) 2015 DeNA Co.,Ltd. All Rights Reserved.
Cache-aware Server Push
in H2O version 1.5
Kazuho Oku
DeNA Co., Ltd.
1Cache-aware Server Push in H2O version 1.5
Copyright (C) 2015 DeNA Co.,Ltd. All Rights Reserved.
Finding out what is NOT cached
2Cache-aware Server Push in H2O version 1.5
Copyright (C) 2015 DeNA Co.,Ltd. All Rights Reserved.
Cache Fingerprinting
 include in every HTTP request a fingerprint of
the cached blocking assets (e.g. CSS and script files)
belonging to the same origin
⁃ server uses the fingerprint to determine what
should be pushed
 algorithm: Golomb compressed sets
⁃ compressed form of Bloom filter
⁃ key(asset) = sha1(asset_URL + asset_etag)
⁃ estimated size: 1.x * N * log2(1/P) bits
⁃ N: # of entries, P: possibility of false positive
⁃ e.g. 800 bits for 100 asset files, 1% false positive
3Cache-aware Server Push in H2O version 1.5
Copyright (C) 2015 DeNA Co.,Ltd. All Rights Reserved.
Calculating the Fingerprint
 ServiceWorker
⁃ iterate though the SW cache and calculate
⁃ the issue: SW may not be running
• esp. for first visit or returning user (after some time),
in which case we need to push things
 Cookie
⁃ calculate in server, and set it as a Cookie
⁃ can always be used
⁃ the issue: can't update when a cache entry gets
purged
• means there might be false positives
4Cache-aware Server Push in H2O version 1.5
Copyright (C) 2015 DeNA Co.,Ltd. All Rights Reserved.
Calculating the Fingerprint
 hybrid approach
⁃ use Cookie header to send the fingerprint
⁃ store response in SW cache whenever possible
• even if SW is not activated (yet)
⁃ in SW, always recalculate the fingerprint and
update the Cookie
• so that the values becomes precise
5Cache-aware Server Push in H2O version 1.5
Copyright (C) 2015 DeNA Co.,Ltd. All Rights Reserved.
Cookie-based impl. in H2O version 1.5
 tracking issue: github.com/h2o/h2o/issues/421
⁃ thanks to Jxck, Ilya, Tatsuhiro for the feedbacks!
 H2O cancels push indications sent from backend, if
client is likely to already have the data in cache
 hybrid impl. in the works
6Cache-aware Server Push in H2O version 1.5
Copyright (C) 2015 DeNA Co.,Ltd. All Rights Reserved.
Configuration (H2O 1.5)
mruby.handler: |
lambda do |env|
push_paths = []
if /(/|.html)$/.match(env["PATH_INFO"])
push_paths << "/search/jquery-1.9.1.min.js"
push_paths << "/search/oktavia-jquery-ui.js"
...
end
return [
399, # delegate the request to next handler
push_paths.empty? ? {}
: {"link" =>
push_paths.map{|p| "<#{p}>; rel=preload"}.join("n")},
[]
]
end
file.dir: /path/to/doc-root
7Cache-aware Server Push in H2O version 1.5
Copyright (C) 2015 DeNA Co.,Ltd. All Rights Reserved.
Demo
 Web server (H2O) tracks the cache fingerprint
⁃ and cancels the push if the client has the asset
• or, we might push 304
⁃ or actually does the push if otherwise
8Cache-aware Server Push in H2O version 1.5
Copyright (C) 2015 DeNA Co.,Ltd. All Rights Reserved.
Benchmark scores
 first-paint does not change
⁃ reason: no dependency chain bet. assets,
packets arriving in batch for every RTT
 unload is delayed (since assets arrive before HTML)
9Cache-aware Server Push in H2O version 1.5

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Recent Advances in HTTP, controlling them using ruby
Recent Advances in HTTP, controlling them using rubyRecent Advances in HTTP, controlling them using ruby
Recent Advances in HTTP, controlling them using ruby
 
HTTP/2で 速くなるとき ならないとき
HTTP/2で 速くなるとき ならないときHTTP/2で 速くなるとき ならないとき
HTTP/2で 速くなるとき ならないとき
 
Make gRPC great again
Make gRPC great againMake gRPC great again
Make gRPC great again
 
HTTP2 and gRPC
HTTP2 and gRPCHTTP2 and gRPC
HTTP2 and gRPC
 
HTTP2:新的机遇与挑战
HTTP2:新的机遇与挑战HTTP2:新的机遇与挑战
HTTP2:新的机遇与挑战
 
Technical Overview of QUIC
Technical  Overview of QUICTechnical  Overview of QUIC
Technical Overview of QUIC
 
LF_OVS_17_OvS manipulation with Go at DigitalOcean
LF_OVS_17_OvS manipulation with Go at DigitalOceanLF_OVS_17_OvS manipulation with Go at DigitalOcean
LF_OVS_17_OvS manipulation with Go at DigitalOcean
 
Introduction to Haproxy
Introduction to HaproxyIntroduction to Haproxy
Introduction to Haproxy
 
redGuardian DP100 large scale DDoS mitigation solution
redGuardian DP100 large scale DDoS mitigation solutionredGuardian DP100 large scale DDoS mitigation solution
redGuardian DP100 large scale DDoS mitigation solution
 
Keeping your rack cool
Keeping your rack cool Keeping your rack cool
Keeping your rack cool
 
SPDY & HTTP2.0 & QUIC - #bpstudy 2013-08-28
SPDY & HTTP2.0 & QUIC - #bpstudy 2013-08-28SPDY & HTTP2.0 & QUIC - #bpstudy 2013-08-28
SPDY & HTTP2.0 & QUIC - #bpstudy 2013-08-28
 
Introduction to QUIC
Introduction to QUICIntroduction to QUIC
Introduction to QUIC
 
Taking Security Groups to Ludicrous Speed with OVS (OpenStack Summit 2015)
Taking Security Groups to Ludicrous Speed with OVS (OpenStack Summit 2015)Taking Security Groups to Ludicrous Speed with OVS (OpenStack Summit 2015)
Taking Security Groups to Ludicrous Speed with OVS (OpenStack Summit 2015)
 
HTTP/3 over QUIC. All is new but still the same!
HTTP/3 over QUIC. All is new but still the same!HTTP/3 over QUIC. All is new but still the same!
HTTP/3 over QUIC. All is new but still the same!
 
Implementing BGP Flowspec at IP transit network
Implementing BGP Flowspec at IP transit networkImplementing BGP Flowspec at IP transit network
Implementing BGP Flowspec at IP transit network
 
Load Balancing with HAproxy
Load Balancing with HAproxyLoad Balancing with HAproxy
Load Balancing with HAproxy
 
How to Troubleshoot OpenStack Without Losing Sleep
How to Troubleshoot OpenStack Without Losing SleepHow to Troubleshoot OpenStack Without Losing Sleep
How to Troubleshoot OpenStack Without Losing Sleep
 
Observability with HAProxy
Observability with HAProxyObservability with HAProxy
Observability with HAProxy
 
BGP zombie routes
BGP zombie routesBGP zombie routes
BGP zombie routes
 
Ripe71 FastNetMon open source DoS / DDoS mitigation
Ripe71 FastNetMon open source DoS / DDoS mitigationRipe71 FastNetMon open source DoS / DDoS mitigation
Ripe71 FastNetMon open source DoS / DDoS mitigation
 

Andere mochten auch

Skunksby Mia
Skunksby MiaSkunksby Mia
Skunksby Mia
vebrya
 
Posjet dvd u šišljavić
Posjet dvd u šišljavićPosjet dvd u šišljavić
Posjet dvd u šišljavić
Gavranica
 
最新のマーケットアルゴリズムと、 アルゴリズムを踏まえてのプロモーション
最新のマーケットアルゴリズムと、 アルゴリズムを踏まえてのプロモーション最新のマーケットアルゴリズムと、 アルゴリズムを踏まえてのプロモーション
最新のマーケットアルゴリズムと、 アルゴリズムを踏まえてのプロモーション
VOYAGE GROUP
 
強化学習入門
強化学習入門強化学習入門
強化学習入門
Shunta Saito
 

Andere mochten auch (20)

David Speaks!
David Speaks!David Speaks!
David Speaks!
 
Skunksby Mia
Skunksby MiaSkunksby Mia
Skunksby Mia
 
Kene
KeneKene
Kene
 
Effects of the ISIS Recommender System.
Effects of the ISIS Recommender System.Effects of the ISIS Recommender System.
Effects of the ISIS Recommender System.
 
P.E.R
P.E.RP.E.R
P.E.R
 
Posjet dvd u šišljavić
Posjet dvd u šišljavićPosjet dvd u šišljavić
Posjet dvd u šišljavić
 
H2O - making HTTP better
H2O - making HTTP betterH2O - making HTTP better
H2O - making HTTP better
 
Reinforcement learning
Reinforcement learningReinforcement learning
Reinforcement learning
 
Quipperエンジニアセミナー 20121107
Quipperエンジニアセミナー 20121107Quipperエンジニアセミナー 20121107
Quipperエンジニアセミナー 20121107
 
最新のマーケットアルゴリズムと、 アルゴリズムを踏まえてのプロモーション
最新のマーケットアルゴリズムと、 アルゴリズムを踏まえてのプロモーション最新のマーケットアルゴリズムと、 アルゴリズムを踏まえてのプロモーション
最新のマーケットアルゴリズムと、 アルゴリズムを踏まえてのプロモーション
 
Company Info and M&A
Company Info and M&ACompany Info and M&A
Company Info and M&A
 
全脳アーキテクチャ若手の会 強化学習
全脳アーキテクチャ若手の会 強化学習全脳アーキテクチャ若手の会 強化学習
全脳アーキテクチャ若手の会 強化学習
 
強化学習入門
強化学習入門強化学習入門
強化学習入門
 
Wine Of Austria
Wine Of AustriaWine Of Austria
Wine Of Austria
 
Using Simulations to Evaluated the Effects of Recommender Systems for Learner...
Using Simulations to Evaluated the Effects of Recommender Systems for Learner...Using Simulations to Evaluated the Effects of Recommender Systems for Learner...
Using Simulations to Evaluated the Effects of Recommender Systems for Learner...
 
A Long Walk to Water: Lesson12 unit2
A Long Walk to Water: Lesson12 unit2A Long Walk to Water: Lesson12 unit2
A Long Walk to Water: Lesson12 unit2
 
Are you a monkey or an astronaut?
Are you a monkey or an astronaut?Are you a monkey or an astronaut?
Are you a monkey or an astronaut?
 
So You Think You Can Speak: From Proposal to Podium
So You Think You Can Speak: From Proposal to PodiumSo You Think You Can Speak: From Proposal to Podium
So You Think You Can Speak: From Proposal to Podium
 
Do dodane vrednosti s Twitterjem in drugimi socialnimi orodji
Do dodane vrednosti s Twitterjem in drugimi socialnimi orodjiDo dodane vrednosti s Twitterjem in drugimi socialnimi orodji
Do dodane vrednosti s Twitterjem in drugimi socialnimi orodji
 
Lyddie: Unit2 lesson4
Lyddie:  Unit2 lesson4Lyddie:  Unit2 lesson4
Lyddie: Unit2 lesson4
 

Ähnlich wie Cache aware-server-push in H2O version 1.5

Caching with Varnish
Caching with VarnishCaching with Varnish
Caching with Varnish
schoefmax
 
idea: talk about the Active Cache
idea: talk about the Active Cacheidea: talk about the Active Cache
idea: talk about the Active Cache
Ching Yi Chan
 

Ähnlich wie Cache aware-server-push in H2O version 1.5 (20)

HTTP cache @ PUG Rome 03-29-2011
HTTP cache @ PUG Rome 03-29-2011HTTP cache @ PUG Rome 03-29-2011
HTTP cache @ PUG Rome 03-29-2011
 
Fluentd Overview, Now and Then
Fluentd Overview, Now and ThenFluentd Overview, Now and Then
Fluentd Overview, Now and Then
 
Spring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel Lavoie
Spring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel LavoieSpring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel Lavoie
Spring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel Lavoie
 
HP Helion European Webinar Series ,Webinar #3
HP Helion European Webinar Series ,Webinar #3 HP Helion European Webinar Series ,Webinar #3
HP Helion European Webinar Series ,Webinar #3
 
Developing cacheable PHP applications - Confoo 2018
Developing cacheable PHP applications - Confoo 2018Developing cacheable PHP applications - Confoo 2018
Developing cacheable PHP applications - Confoo 2018
 
php & performance
 php & performance php & performance
php & performance
 
SpringOne Tour Denver - Spring Boot & Spring Cloud on Pivotal Application Ser...
SpringOne Tour Denver - Spring Boot & Spring Cloud on Pivotal Application Ser...SpringOne Tour Denver - Spring Boot & Spring Cloud on Pivotal Application Ser...
SpringOne Tour Denver - Spring Boot & Spring Cloud on Pivotal Application Ser...
 
Developing cacheable PHP applications - PHPLimburgBE 2018
Developing cacheable PHP applications - PHPLimburgBE 2018Developing cacheable PHP applications - PHPLimburgBE 2018
Developing cacheable PHP applications - PHPLimburgBE 2018
 
Ten Battle-Tested Tips for Atlassian Connect Add-ons
Ten Battle-Tested Tips for Atlassian Connect Add-onsTen Battle-Tested Tips for Atlassian Connect Add-ons
Ten Battle-Tested Tips for Atlassian Connect Add-ons
 
Azure + DataStax Enterprise (DSE) Powers Office365 Per User Store
Azure + DataStax Enterprise (DSE) Powers Office365 Per User StoreAzure + DataStax Enterprise (DSE) Powers Office365 Per User Store
Azure + DataStax Enterprise (DSE) Powers Office365 Per User Store
 
CEP Integration for Apache Stratos 4.0.0
CEP Integration for Apache Stratos 4.0.0CEP Integration for Apache Stratos 4.0.0
CEP Integration for Apache Stratos 4.0.0
 
From nothing to Prometheus : one year after
From nothing to Prometheus : one year afterFrom nothing to Prometheus : one year after
From nothing to Prometheus : one year after
 
KACE Agent Architecture and Troubleshooting Overview
KACE Agent Architecture and Troubleshooting OverviewKACE Agent Architecture and Troubleshooting Overview
KACE Agent Architecture and Troubleshooting Overview
 
Caching with Varnish
Caching with VarnishCaching with Varnish
Caching with Varnish
 
Timothy Spann [StreamNative] | Using FLaNK with InfluxDB for EdgeAI IoT at Sc...
Timothy Spann [StreamNative] | Using FLaNK with InfluxDB for EdgeAI IoT at Sc...Timothy Spann [StreamNative] | Using FLaNK with InfluxDB for EdgeAI IoT at Sc...
Timothy Spann [StreamNative] | Using FLaNK with InfluxDB for EdgeAI IoT at Sc...
 
Using FLiP with influxdb for EdgeAI IoT at Scale
Using FLiP with influxdb for EdgeAI IoT at ScaleUsing FLiP with influxdb for EdgeAI IoT at Scale
Using FLiP with influxdb for EdgeAI IoT at Scale
 
How to Build Streaming Apps with Confluent II
How to Build Streaming Apps with Confluent IIHow to Build Streaming Apps with Confluent II
How to Build Streaming Apps with Confluent II
 
Debugging Effectively in the Cloud - Felipe Fidelix - Presentation at eZ Con...
Debugging Effectively in the Cloud - Felipe Fidelix - Presentation at  eZ Con...Debugging Effectively in the Cloud - Felipe Fidelix - Presentation at  eZ Con...
Debugging Effectively in the Cloud - Felipe Fidelix - Presentation at eZ Con...
 
idea: talk about the Active Cache
idea: talk about the Active Cacheidea: talk about the Active Cache
idea: talk about the Active Cache
 
Varnish and Drupal- Accelerating Website Performance and Flexibility with Var...
Varnish and Drupal- Accelerating Website Performance and Flexibility with Var...Varnish and Drupal- Accelerating Website Performance and Flexibility with Var...
Varnish and Drupal- Accelerating Website Performance and Flexibility with Var...
 

Mehr von Kazuho Oku

ウェブを速くするためにDeNAがやっていること - HTTP/2と、さらにその先
ウェブを速くするためにDeNAがやっていること - HTTP/2と、さらにその先ウェブを速くするためにDeNAがやっていること - HTTP/2と、さらにその先
ウェブを速くするためにDeNAがやっていること - HTTP/2と、さらにその先
Kazuho 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 Web
Kazuho Oku
 
ウェブブラウザの時代は終わるのか 〜スマホアプリとHTML5の未来〜
ウェブブラウザの時代は終わるのか 〜スマホアプリとHTML5の未来〜ウェブブラウザの時代は終わるのか 〜スマホアプリとHTML5の未来〜
ウェブブラウザの時代は終わるのか 〜スマホアプリとHTML5の未来〜
Kazuho Oku
 
JSX Design Overview (日本語)
JSX Design Overview (日本語)JSX Design Overview (日本語)
JSX Design Overview (日本語)
Kazuho Oku
 
例えば牛丼を避ける
例えば牛丼を避ける例えば牛丼を避ける
例えば牛丼を避ける
Kazuho Oku
 

Mehr von 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時代のウェブサイト設計
 
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
 
例えば牛丼を避ける
例えば牛丼を避ける例えば牛丼を避ける
例えば牛丼を避ける
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Kürzlich hochgeladen (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
[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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Cache aware-server-push in H2O version 1.5

  • 1. Copyright (C) 2015 DeNA Co.,Ltd. All Rights Reserved. Cache-aware Server Push in H2O version 1.5 Kazuho Oku DeNA Co., Ltd. 1Cache-aware Server Push in H2O version 1.5
  • 2. Copyright (C) 2015 DeNA Co.,Ltd. All Rights Reserved. Finding out what is NOT cached 2Cache-aware Server Push in H2O version 1.5
  • 3. Copyright (C) 2015 DeNA Co.,Ltd. All Rights Reserved. Cache Fingerprinting  include in every HTTP request a fingerprint of the cached blocking assets (e.g. CSS and script files) belonging to the same origin ⁃ server uses the fingerprint to determine what should be pushed  algorithm: Golomb compressed sets ⁃ compressed form of Bloom filter ⁃ key(asset) = sha1(asset_URL + asset_etag) ⁃ estimated size: 1.x * N * log2(1/P) bits ⁃ N: # of entries, P: possibility of false positive ⁃ e.g. 800 bits for 100 asset files, 1% false positive 3Cache-aware Server Push in H2O version 1.5
  • 4. Copyright (C) 2015 DeNA Co.,Ltd. All Rights Reserved. Calculating the Fingerprint  ServiceWorker ⁃ iterate though the SW cache and calculate ⁃ the issue: SW may not be running • esp. for first visit or returning user (after some time), in which case we need to push things  Cookie ⁃ calculate in server, and set it as a Cookie ⁃ can always be used ⁃ the issue: can't update when a cache entry gets purged • means there might be false positives 4Cache-aware Server Push in H2O version 1.5
  • 5. Copyright (C) 2015 DeNA Co.,Ltd. All Rights Reserved. Calculating the Fingerprint  hybrid approach ⁃ use Cookie header to send the fingerprint ⁃ store response in SW cache whenever possible • even if SW is not activated (yet) ⁃ in SW, always recalculate the fingerprint and update the Cookie • so that the values becomes precise 5Cache-aware Server Push in H2O version 1.5
  • 6. Copyright (C) 2015 DeNA Co.,Ltd. All Rights Reserved. Cookie-based impl. in H2O version 1.5  tracking issue: github.com/h2o/h2o/issues/421 ⁃ thanks to Jxck, Ilya, Tatsuhiro for the feedbacks!  H2O cancels push indications sent from backend, if client is likely to already have the data in cache  hybrid impl. in the works 6Cache-aware Server Push in H2O version 1.5
  • 7. Copyright (C) 2015 DeNA Co.,Ltd. All Rights Reserved. Configuration (H2O 1.5) mruby.handler: | lambda do |env| push_paths = [] if /(/|.html)$/.match(env["PATH_INFO"]) push_paths << "/search/jquery-1.9.1.min.js" push_paths << "/search/oktavia-jquery-ui.js" ... end return [ 399, # delegate the request to next handler push_paths.empty? ? {} : {"link" => push_paths.map{|p| "<#{p}>; rel=preload"}.join("n")}, [] ] end file.dir: /path/to/doc-root 7Cache-aware Server Push in H2O version 1.5
  • 8. Copyright (C) 2015 DeNA Co.,Ltd. All Rights Reserved. Demo  Web server (H2O) tracks the cache fingerprint ⁃ and cancels the push if the client has the asset • or, we might push 304 ⁃ or actually does the push if otherwise 8Cache-aware Server Push in H2O version 1.5
  • 9. Copyright (C) 2015 DeNA Co.,Ltd. All Rights Reserved. Benchmark scores  first-paint does not change ⁃ reason: no dependency chain bet. assets, packets arriving in batch for every RTT  unload is delayed (since assets arrive before HTML) 9Cache-aware Server Push in H2O version 1.5

Hinweis der Redaktion

  1. we only track the blocking asset files to keep the fingerprint small
  2. the rows marked "reprio:on" are the responses that sent blocking asset files prior to images, regardless of whether push or pull