SlideShare a Scribd company logo
Caching
HTTP’s Best Kept Secret
Ryan Tomayko
  http://tomayko.com/
Sinatra
http://www.sinatrarb.com
Rack
http://rack.rubyforge.org
Rack::Cache
http://tomayko.com/src/rack-cache
Heroku
http://heroku.com
HTTP Caching?
NOT Rails Caching
GET /foo HTTP/1.1
Host: www.foo.com
User-Agent: FooBrowser/1.0
Cache-Control: max-age=0
If-Modified-Since: Mon, 01 Jan 1979 ...
If-None-Match: abcdef0123456789
Accept: *



                   HTTP/1.1 200 OK
                   Content-Type: text/html
                   Content-Length: 24
                   Cache-Control: max-age=300
                   Last-Modified: Mon, 02 Jan 1979 ...
                   ETag: abcdef0123456789
                   Vary: Accept
GET /foo HTTP/1.1
Host: www.foo.com
User-Agent: FooBrowser/1.0
Cache-Control: max-age=0
If-Modified-Since: Mon, 01 Jan 1979 ...
If-None-Match: abcdef0123456789
Accept: *



                   HTTP/1.1 200 OK
                   Content-Type: text/html
                   Content-Length: 24
                   Cache-Control: public, max-age=300
                   Last-Modified: Mon, 02 Jan 1979 ...
                   ETag: abcdef0123456789
                   Vary: Accept
Types of Caches
Client Cache

Client    Client   Client
Cache     Cache    Cache




         foo.com
Shared Proxy Cache



      Shared Proxy
         Cache



       foo.com
Shared Proxy Cache

  Cache             Cache




          foo.com
Shared Proxy Cache
Gateway Cache



    foo.com
     Gateway
      Cache

     Backend
Caches Everywhere

 Client             Client
 Cache              Cache
           Shared
           Cache




          foo.com
          Gateway
           Cache

          Backend
Why Cache?
November 1990
November 1990


Web Population: 1
February 1996


Web Population: 20M
February 1996


Modem Speed: 28.8kbps
February 1996
February 1996
Bandwidth.
February 1996


RFC 1945 - HTTP/1.0
March 1999


RFC 2616 - HTTP/1.1
Today
Expiration
Gateway Cache
Alice                   Backend
Gateway Cache
Alice                                   Backend




        GET /foo
        Host: foo.com
Gateway Cache
Alice                                             Backend




        GET /foo                  GET /foo
        Host: foo.com             Host: foo.com
Gateway Cache
Alice                                                                     Backend




        GET /foo                  GET /foo
        Host: foo.com             Host: foo.com




                                        200OK
                                        Cache-Control:public,max-age=60
Gateway Cache
Alice                                                                                      Backend




        GET /foo                                   GET /foo
        Host: foo.com                              Host: foo.com




                                                         200OK
            200OK
                                                         Cache-Control:public,max-age=60
            Cache-Control:public,max-age=60
Gateway Cache
Bob   (30 seconds later)                   Backend
Gateway Cache
Bob   (30 seconds later)                   Backend




      GET /foo
      Host: foo.com
Gateway Cache
Bob   (30 seconds later)                                Backend




      GET /foo
      Host: foo.com




           200OK
           Cache-Control:public,max-age=60
           Age:30
Gateway Cache
Carol   (60 seconds later)                   Backend
Gateway Cache
Carol   (60 seconds later)                   Backend




        GET /foo
        Host: foo.com
Gateway Cache
Carol   (60 seconds later)                             Backend




        GET /foo                       GET /foo
        Host: foo.com                  Host: foo.com
Gateway Cache
Carol   (60 seconds later)                                                     Backend




        GET /foo                       GET /foo
        Host: foo.com                  Host: foo.com




                                             200OK
                                             Cache-Control:public,max-age=60
Gateway Cache
Carol   (60 seconds later)                                                                  Backend




        GET /foo                                    GET /foo
        Host: foo.com                               Host: foo.com




                                                          200OK
             200OK
                                                          Cache-Control:public,max-age=60
             Cache-Control:public,max-age=60
expires_in
class FooController < Application

 def show
  expires_in 60.seconds, :public => true
  @foo = Foo.find(params[:id])
  render :action => 'show'
 end

end
Sinatra
get '/foo' do
 headers['Cache-Control'] =
              'public, max-age=60'
 @foo = Foo.find_and_stu
 erb :foo
end
Validation
 (Conditional GET)
Gateway Cache
Alice                   Backend
Gateway Cache
Alice                                   Backend




        GET /foo
        Host: foo.com
Gateway Cache
Alice                                             Backend




        GET /foo                  GET /foo
        Host: foo.com             Host: foo.com
Gateway Cache
Alice                                                         Backend




        GET /foo                  GET /foo
        Host: foo.com             Host: foo.com




                                        200OK
                                        ETag:quot;abcdef012345quot;
Gateway Cache
Alice                                                                   Backend




        GET /foo                            GET /foo
        Host: foo.com                       Host: foo.com




                                                  200OK
            200OK
                                                  ETag:quot;abcdef012345quot;
            ETag:quot;abcdef012345quot;
Gateway Cache
Bob                   Backend
Gateway Cache
Bob                                   Backend




      GET /foo
      Host: foo.com
Gateway Cache
Bob                                                           Backend




                                GET /foo
      GET /foo                  Host: foo.com
      Host: foo.com             If-None-Match: abcdef012345
Gateway Cache
Bob                                                           Backend




                                GET /foo
      GET /foo                  Host: foo.com
      Host: foo.com             If-None-Match: abcdef012345




                                      304NotModified
Gateway Cache
Bob                                                                   Backend




                                        GET /foo
      GET /foo                          Host: foo.com
      Host: foo.com                     If-None-Match: abcdef012345




                                              304NotModified
          200OK
          ETag:abcdef012345
Rails: fresh_when
class FooController  Application

 def show
  @foo = Foo.find(params[:id])
  fresh_when :etag = @foo,
    :last_modified = @foo.updated_at.utc
 end

end
Rails: stale?
class FooController  Application

 def show
  @foo = Foo.find(params[:id])
  modified = @foo.updated_at.utc
  if stale?(:etag = @foo, :last_modified = modified)
    respond_to do |wants|
     # ... normal response processing
    end
  end
 end

end
Sinatra: etag
get '/foo' do
 @foo = Foo.find(params[:id])
 etag @foo.etag

 erb :foo
end
Expiration
    +
Validation
Gateway Cache
Alice                   Backend
Gateway Cache
Alice                                   Backend




        GET /foo
        Host: foo.com
Gateway Cache
Alice                                             Backend




        GET /foo                  GET /foo
        Host: foo.com             Host: foo.com
Gateway Cache
Alice                                                                     Backend




        GET /foo                  GET /foo
        Host: foo.com             Host: foo.com




                                        200OK
                                        Cache-Control:public,max-age=60
                                        ETag:abcdef012345
Gateway Cache
Alice                                                                                      Backend




        GET /foo                                   GET /foo
        Host: foo.com                              Host: foo.com




             200OK                                       200OK
             Cache-Control:public,max-age=60             Cache-Control:public,max-age=60
             ETag:abcdef012345                           ETag:abcdef012345
Gateway Cache
Bob   (30 seconds later)                   Backend
Gateway Cache
Bob   (30 seconds later)                   Backend




      GET /foo
      Host: foo.com
Gateway Cache
Bob   (30 seconds later)                                Backend




      GET /foo
      Host: foo.com




            200OK
            Cache-Control:public,max-age=60
            ETag:abcdef012345
            Age:30
Gateway Cache
Carol   (60 seconds later)                   Backend
Gateway Cache
Carol   (60 seconds later)                   Backend




        GET /foo
        Host: foo.com
Gateway Cache
Carol   (60 seconds later)                                           Backend




                                       GET /foo
        GET /foo                       Host: foo.com
        Host: foo.com                  If-None-Match: abcdef012345
Gateway Cache
Carol   (60 seconds later)                                                      Backend




                                       GET /foo
        GET /foo                       Host: foo.com
        Host: foo.com                  If-None-Match: abcdef012345




                                              304NotModified
                                              Cache-Control:public,max-age=60
Gateway Cache
Carol   (60 seconds later)                                                                   Backend




                                                    GET /foo
        GET /foo                                    Host: foo.com
        Host: foo.com                               If-None-Match: abcdef012345




              200OK                                        304NotModified
              Cache-Control:public,max-age=60              Cache-Control:public,max-age=60
              ETag:abcdef012345
Never Generate The
Same Response Twice
use Rack::Cache
$ gem install rack-cache



config.middleware.use Rack::Cache,
 :verbose       = true,
 :metastore      = quot;file:/var/cache/rack/metaquot;,
 :entitystore = quot;file:/var/cache/rack/bodyquot;,
 :allow_reload = false,
 :allow_revalidate = false
High Performance
 Caches/Accelerators

•Squid
 http://www.squid-cache.org/

• Varnish
 http://varnish.projects.linpro.no/
Heroku
Thanks!

More Related Content

Viewers also liked

Caching the Uncacheable [Long Version]
Caching the Uncacheable [Long Version]Caching the Uncacheable [Long Version]
Caching the Uncacheable [Long Version]
Fastly
 
IOT, Streaming Analytics and Machine Learning
IOT, Streaming Analytics and Machine Learning IOT, Streaming Analytics and Machine Learning
IOT, Streaming Analytics and Machine Learning
DataWorks Summit/Hadoop Summit
 
Building a Smarter Home with Apache NiFi and Spark
Building a Smarter Home with Apache NiFi and SparkBuilding a Smarter Home with Apache NiFi and Spark
Building a Smarter Home with Apache NiFi and Spark
DataWorks Summit/Hadoop Summit
 
Advanced Caching Concepts @ Velocity NY 2015
Advanced Caching Concepts @ Velocity NY 2015Advanced Caching Concepts @ Velocity NY 2015
Advanced Caching Concepts @ Velocity NY 2015
Rakesh Chaudhary
 
Network Security 1st Lecture
Network Security 1st LectureNetwork Security 1st Lecture
Network Security 1st Lecture
babak danyal
 
Digital Must Dos For 2010
Digital Must Dos For 2010Digital Must Dos For 2010
Digital Must Dos For 2010
Media Matters
 
Matt Davies Recruiter New 1
Matt Davies Recruiter New 1Matt Davies Recruiter New 1
Matt Davies Recruiter New 1
mattmatters
 
Garden Spot Village Tour
Garden Spot Village TourGarden Spot Village Tour
Garden Spot Village Tour
Garden Spot Village
 
Управление реальными инвестициями компании
Управление реальными инвестициями компанииУправление реальными инвестициями компании
Управление реальными инвестициями компании
FormulaS
 
Chapter6
Chapter6Chapter6
Chapter6
Denis Nsiimenta
 
Presentatie huisstijl en website
Presentatie huisstijl en websitePresentatie huisstijl en website
Presentatie huisstijl en websiteMuziekgebouw
 
דברים שכדי לעולם העסקי ללמוד הטור דה פראנס ודבר אחד שלא חומר לאתר
דברים שכדי לעולם העסקי ללמוד הטור דה פראנס ודבר אחד שלא   חומר לאתרדברים שכדי לעולם העסקי ללמוד הטור דה פראנס ודבר אחד שלא   חומר לאתר
דברים שכדי לעולם העסקי ללמוד הטור דה פראנס ודבר אחד שלא חומר לאתרyossi koren
 

Viewers also liked (20)

Caching the Uncacheable [Long Version]
Caching the Uncacheable [Long Version]Caching the Uncacheable [Long Version]
Caching the Uncacheable [Long Version]
 
IOT, Streaming Analytics and Machine Learning
IOT, Streaming Analytics and Machine Learning IOT, Streaming Analytics and Machine Learning
IOT, Streaming Analytics and Machine Learning
 
Building a Smarter Home with Apache NiFi and Spark
Building a Smarter Home with Apache NiFi and SparkBuilding a Smarter Home with Apache NiFi and Spark
Building a Smarter Home with Apache NiFi and Spark
 
Caching on the Edge
Caching on the EdgeCaching on the Edge
Caching on the Edge
 
Advanced Caching Concepts @ Velocity NY 2015
Advanced Caching Concepts @ Velocity NY 2015Advanced Caching Concepts @ Velocity NY 2015
Advanced Caching Concepts @ Velocity NY 2015
 
Network Security 1st Lecture
Network Security 1st LectureNetwork Security 1st Lecture
Network Security 1st Lecture
 
22apr s51-a-sergeev-110426092204-phpapp01
22apr s51-a-sergeev-110426092204-phpapp0122apr s51-a-sergeev-110426092204-phpapp01
22apr s51-a-sergeev-110426092204-phpapp01
 
Комплексный интернет маркетинг
Комплексный интернет маркетингКомплексный интернет маркетинг
Комплексный интернет маркетинг
 
23
2323
23
 
Digital Must Dos For 2010
Digital Must Dos For 2010Digital Must Dos For 2010
Digital Must Dos For 2010
 
в вики Netpromoter2010 ludkevich
в вики Netpromoter2010 ludkevichв вики Netpromoter2010 ludkevich
в вики Netpromoter2010 ludkevich
 
Matt Davies Recruiter New 1
Matt Davies Recruiter New 1Matt Davies Recruiter New 1
Matt Davies Recruiter New 1
 
Garden Spot Village Tour
Garden Spot Village TourGarden Spot Village Tour
Garden Spot Village Tour
 
Управление реальными инвестициями компании
Управление реальными инвестициями компанииУправление реальными инвестициями компании
Управление реальными инвестициями компании
 
Chapter6
Chapter6Chapter6
Chapter6
 
Presentatie huisstijl en website
Presentatie huisstijl en websitePresentatie huisstijl en website
Presentatie huisstijl en website
 
דברים שכדי לעולם העסקי ללמוד הטור דה פראנס ודבר אחד שלא חומר לאתר
דברים שכדי לעולם העסקי ללמוד הטור דה פראנס ודבר אחד שלא   חומר לאתרדברים שכדי לעולם העסקי ללמוד הטור דה פראנס ודבר אחד שלא   חומר לאתר
דברים שכדי לעולם העסקי ללמוד הטור דה פראנס ודבר אחד שלא חומר לאתר
 
货币战争
货币战争货币战争
货币战争
 
Linear equations 2-3
Linear equations   2-3Linear equations   2-3
Linear equations 2-3
 
WE-55-13-1 Space Derby 90-Day
WE-55-13-1 Space Derby 90-DayWE-55-13-1 Space Derby 90-Day
WE-55-13-1 Space Derby 90-Day
 

Recently uploaded

From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 

Recently uploaded (20)

From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 

HTTP's Best-Kept Secret: Caching

Editor's Notes

  1. Pure ruby HTTP cache implementation. This talk is not really about Rack::Cache.
  2. Heroku understands HTTP caching.
  3. What we're talking about when we say HTTP caching. There's so many different caching systems.
  4. Page caching, action caching, fragment caching, SQL caching, memcached.
  5. *This* is what we're talking about Wire level Declarative. Don't worry if this doesn't look familiar.
  6. All caches adhere to the same basic rules for the most part.
  7. Or browser cache. People are most familiar with. When we think about HTTP caching, this is what comes to mind. Bandwidth/Traffic Reduction. Number of Clients served by the Cache. I don&#x2019;t want to talk about Client caches.
  8. Many users behind a single cache
  9. Also Known As &#x201C;Reverse Proxy Cache&#x201D;
  10. The reasons have changed over time.
  11. First server, client/browser, and web page Things are good for, like, a year. Ramble about research guys trading papers and linking to each other.
  12. Explosive Netscape goes public in 1995
  13. State of the art Roughly 2.3KB/s Today, yahoo.com homepage is 388K - 2m48s
  14. Other things: CGI just starting out. (Guestbooks, hit counters, search) JavaScript - didn&#x2019;t exist. So what was the most important issue to solve?
  15. Expires Last-Modified
  16. Cache-Control ETag
  17. Much more worried about load on backends. Do less work.
  18. I use ETag and If-None-Match. Last-Modified and If-Modified-Since.
  19. I use ETag and If-None-Match. Last-Modified and If-Modified-Since.
  20. I use ETag and If-None-Match. Last-Modified and If-Modified-Since.
  21. I use ETag and If-None-Match. Last-Modified and If-Modified-Since.
  22. Halts
  23. Requires Rails 2.3+ for Rack/middleware support.