Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Cache aware-server-push in H2O version 1.5

3,438 views

Published on

Cache aware-server-push in H2O version 1.5

Published in: Technology
  • DOWNLOAD FULL. BOOKS INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Cache aware-server-push in H2O version 1.5

  1. 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. 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. 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. 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. 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. 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. 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. 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. 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

×