SlideShare a Scribd company logo
1 of 50
Download to read offline
Stupid
       Web	
  Caching
                Tricks

Mark	
  Nottingham	
  	
  /	
  	
  mnot@yahoo-­‐inc.com	
  	
  /	
  	
  mnot@mnot.net	
  	
  /	
  	
  @mnot
foo.yahoo.com
the internets
             the internets




front-end
the internets
             the internets




front-end




services
the internets
             the internets




front-end




 caching




services
Simple,	
  right?

Well,	
  let’s	
  bring	
  it	
  into	
  rotation...
1           2           3              4       5               6
1276007531.061     205   192.168.1.16   TCP_MISS/200 9286 GET /details?ticker=ABC
1276007531.062     205   192.168.1.17   TCP_MISS/200 9287 GET /details?ticker=ABC
1276007531.064     218   192.168.1.16   TCP_MISS/200 9285 GET /details?ticker=ABC
1276007531.065     198   192.168.1.17   TCP_MISS/200 9286 GET /details?ticker=ABC
1276007531.065     215   192.168.1.15   TCP_MISS/200 9286 GET /details?ticker=ABC
1276007531.068     205   192.168.1.15   TCP_MISS/200 9288 GET /details?ticker=ABC
1276007531.072       1   192.168.1.17   TCP_HIT/200 9286 GET /details?ticker=ABC
1276007531.254     398   192.168.1.15   TCP_MISS/200 9288 GET /details?ticker=ABC
1276007531.261     408   192.168.1.15   TCP_MISS/200 9287 GET /details?ticker=ABC
1276007531.289     429   192.168.1.17   TCP_MISS/200 9286 GET /details?ticker=ABC
1276007531.922     852   192.168.1.15   TCP_MISS/504 282 GET /details?ticker=ABC
1276007532.005       0   192.168.1.15   TCP_HIT/200 9286 GET /details?ticker=ABC
1276007532.044     987   192.168.1.16   TCP_MISS/504 283 GET /details?ticker=ABC
1276007532.045       2   192.168.1.16   TCP_HIT/200 9286 GET /details?ticker=ABC
1276007532.068    1001   192.168.1.17   TCP_MISS/000 0 GET /details?ticker=ABC
1276007532.072     998   192.168.1.16   TCP_MISS/504 278 GET /details?ticker=ABC
1276007591.062   60001   192.168.1.16   TCP_MISS/000 0 GET /details?ticker=ABC




                                  Oops.
1          2          3              4       5               6
1276007531.068   205   192.168.1.16   TCP_MISS/200 9286 GET /details?ticker=ABC
1276007531.068   205   192.168.1.17   TCP_MISS/200 9286 GET /details?ticker=ABC
1276007531.068   205   192.168.1.17   TCP_MISS/200 9286 GET /details?ticker=ABC
1276007531.068   205   192.168.1.15   TCP_MISS/200 9286 GET /details?ticker=ABC
1276007531.068   205   192.168.1.16   TCP_MISS/200 9286 GET /details?ticker=ABC
1276007531.068   205   192.168.1.15   TCP_MISS/200 9286 GET /details?ticker=ABC
1276007531.072     1   192.168.1.17   TCP_HIT/200 9287 GET /details?ticker=ABC
1276007531.072     0   192.168.1.15   TCP_HIT/200 9286 GET /details?ticker=ABC
1276007531.073     1   192.168.1.16   TCP_HIT/200 9285 GET /details?ticker=ABC
1276007531.073     0   192.168.1.15   TCP_HIT/200 9285 GET /details?ticker=ABC
1276007531.074     0   192.168.1.17   TCP_HIT/200 9286 GET /details?ticker=ABC
1276007531.076     1   192.168.1.16   TCP_HIT/200 9285 GET /details?ticker=ABC
1276007531.076     0   192.168.1.17   TCP_HIT/200 9287 GET /details?ticker=ABC
1276007531.077     0   192.168.1.15   TCP_HIT/200 9286 GET /details?ticker=ABC
1276007531.078     1   192.168.1.15   TCP_HIT/200 9286 GET /details?ticker=ABC
1276007531.079     1   192.168.1.16   TCP_HIT/200 9285 GET /details?ticker=ABC




       Collapsed	
  Forwarding
in	
  squid2:
collapsed_forwarding on

      in	
  squid2.HEAD:
collapsed_forwarding_timeout
the internets
             the internets




front-end




 caching
                             SPOF!


services
the internets
             the internets




front-end




 caching




services
+ good	
  business	
  continuity
          more	
  Qlexible


      -­‐ worse	
  hit	
  rate
          high	
  load	
  when	
  new	
  caches	
  come	
  online
          caches	
  can	
  come	
  out	
  of	
  sync




answer:   Cache	
  Peering
the internets
             the internets




front-end




 caching




services
RFC	
  2186	
  -­‐	
  Internet	
  Cache	
  Protocol
                      UDP-­‐based	
  
                      Just	
  the	
  URI
                      Query	
  only
                      in	
  Squid	
  /	
  TrafQic	
  Server



RFC	
  2756	
  -­‐	
  Hyper	
  Text	
  Caching	
  Protocol
                      UDP-­‐based	
  (option	
  for	
  TCP	
  in	
  spec)
                      Includes	
  URI	
  +	
  Headers
                      Query,	
  CLR	
  operations
                      in	
  Squid
the internets
             the internets




front-end




 caching                     ?!



services
24 front-end servers   x
       24 Apache children   x
         5 pages / second   x
8 service requests / page   x
   10k / service response   /
          2 cache servers   =
                                11,520 req/sec
                                900 Mbits/sec
                                /cache server
the internets
                    the internets




    front-end
local caching




proxy caching




     services


                Hierarchy
1          2          3              4       5                 6
1276007530.037     0   192.168.1.17   TCP_HIT/200 9286 GET   /details?ticker=ABC
1276007530.057     1   192.168.1.16   TCP_HIT/200 9285 GET   /details?ticker=ABC
1276007530.083     0   192.168.1.17   TCP_HIT/200 9287 GET   /details?ticker=ABC
1276007530.119     0   192.168.1.15   TCP_HIT/200 9286 GET   /details?ticker=ABC
1276007530.141     1   192.168.1.15   TCP_HIT/200 9286 GET   /details?ticker=ABC
1276007530.179     0   192.168.1.16   TCP_HIT/200 9285 GET   /details?ticker=ABC
1276007530.397   205   192.168.1.15   TCP_REFRESH_MISS/200   9285 GET /details?...
1276007530.401     1   192.168.1.17   TCP_HIT/200 9286 GET   /details?ticker=ABC
1276007530.414   201   192.168.1.17   TCP_REFRESH_MISS/200   9285 GET /details?...
1276007530.418     1   192.168.1.15   TCP_HIT/200 9285 GET   /details?ticker=ABC
1276007530.434     0   192.168.1.16   TCP_HIT/200 9287 GET   /details?ticker=ABC
1276007530.442   198   192.168.1.17   TCP_REFRESH_MISS/200   9285 GET /details?...
1276007530.372     0   192.168.1.15   TCP_HIT/200 9285 GET   /details?ticker=ABC
1276007530.494   201   192.168.1.16   TCP_REFRESH_MISS/200   9285 GET /details?...
1276007530.525     1   192.168.1.17   TCP_HIT/200 9284 GET   /details?ticker=ABC
1276007530.548   201   192.168.1.17   TCP_REFRESH_MISS/200   9285 GET /details?...
1276007530.563     1   192.168.1.15   TCP_HIT/200 9286 GET   /details?ticker=ABC
1276007530.594     0   192.168.1.16   TCP_HIT/200 9285 GET   /details?ticker=ABC




      Content	
  Becomes	
  Stale
Cache-Control: stale-while-revalidate=30



                  implemented       Squid	
  2.7
RFC	
  5861        coming	
  soon   Squid	
  3.2
                                    Apache	
  TrafQic	
  Server
1          2          3            4       5               6
1276007530.037     0   192.168.1.17 TCP_HIT/200 9286 GET /details?ticker=ABC
1276007530.057     1   192.168.1.16 TCP_HIT/200 9285 GET /details?ticker=ABC
1276007530.083     0   192.168.1.17 TCP_HIT/200 9287 GET /details?ticker=ABC
1276007530.119     0   192.168.1.15 TCP_HIT/200 9286 GET /details?ticker=ABC
1276007530.141     1   192.168.1.15 TCP_HIT/200 9286 GET /details?ticker=ABC
1276007530.179     0   192.168.1.16 TCP_HIT/200 9285 GET /details?ticker=ABC
1276007530.192     0   192.168.1.15 TCP_STALE_HIT/200 9285 GET /details?...
1276007530.213     1   192.168.1.17 TCP_STALE_HIT/200 9286 GET /details?...
1276007530.243     0   192.168.1.17 TCP_STALE_HIT/200 9285 GET /details?...
1276007530.294     0   192.168.1.16 TCP_STALE_HIT/200 9287 GET /details?...
1276007530.347     0   192.168.1.17 TCP_STALE_HIT/200 9285 GET /details?...
1276007530.384   219   0.0.0.0 TCP_ASYNC_MISS/200 9285 GET /details?...
1276007530.401     1   192.168.1.17 TCP_HIT/200 9284 GET /details?ticker=ABC
1276007530.418     1   192.168.1.15 TCP_HIT/200 9286 GET /details?ticker=ABC
1276007530.434     0   192.168.1.16 TCP_HIT/200 9285 GET /details?ticker=ABC




       stale-­‐while-­‐revalidate
the internets
                 the internets




    front-end
local caching




proxy caching




     services
Cache-Control: stale-if-error=3600



                 implemented       Squid	
  2.7
RFC	
  5861       coming	
  soon   Squid	
  3.2
                                   Apache	
  TrafQic	
  Server
Dealing	
  with
            Aborted	
  Requests
                 front-­‐end	
  timeout:	
  500ms
front-end

                 dropped	
  client	
  connection


                 slow	
  service	
  =	
  no	
  cached	
  response
 caching

                 not	
  cached	
  =	
  always	
  slow



                                   Squid quick_abort
services
            Apache	
  TrafQic	
  Server background_fill
Getting	
  an
    Immediate	
  Answer
                                       front-end

       Cache-Control: only-if-cached


       504 Gateway Error

                                        caching

       Cache-Control: max-age=3600,
                      max-stale



 Squid fetch_only_if_cached_access
(soon)                                 services
the internets
                 the internets




    front-end
local caching                    cache_peer...round-robin




proxy caching



                the internets
                 the internets
     services
the internets
                 the internets




    front-end
local caching                    cache_peer...carp




proxy caching



                the internets
                 the internets
     services
Why	
  
                ?
   won’t	
  
    Squid
     cache	
  that
   response
Easy	
  Answers
request	
  Cache-­Control
	
  
response	
  Cache-­Control
	
  
authentication
	
  
unfriendly	
  freshness	
  information
	
  
lack	
  of	
  LM/ETag
	
  
...in	
  Squid
request	
  Cache-­Control
ignore-­‐reload
response	
  Cache-­Control
ignore-­‐[no-­‐cache,	
  no-­‐store,	
  must-­‐revalidate,	
  private]
authentication
ignore-­‐auth
unfriendly	
  freshness	
  information
override-­‐[expire,	
  lastmod]
lack	
  of	
  LM/ETag
store-­‐stale



refresh_pattern . 10 100% 10 [options]
...in	
  Traf@ic	
  Server
request	
  Cache-­Control
proxy.conQig.http.cache.ignore_client_no_cache
response	
  Cache-­Control
proxy.conQig.http.cache.ignore_server_no_cache
authentication
proxy.conQig.http.cache.ignore_authentication	
  
unfriendly	
  freshness	
  information
proxy.conQig.http.cache.when_to_revalidate
lack	
  of	
  LM/ETag
proxy.conQig.http.cache.required_headers



dest_domain=example.com method=GET pin-in-cache=2d
Not	
  So	
  Easy:	
  
Wandering	
  URLs
http://srv254.dctr.example.com/foo/image.gif

http://example.com/thing.xml?uselessToken=abc123

http://example.com/endPointforEverything
                                                      http://a




storeurl_rewrite
                                           http://b


                                                      http://a
No	
  Answers*

        non-­‐GET	
  methods

        Protocol	
  Errors

        Vary:	
  *




               *without	
  hacking
Your
API
will
  be
cached.
Accelerator	
  Caching
                   the internets
                    the internets




proxy caching




     services
/people?name=Britney_Spears&page=2

 /people?name=Britney_Spears&page=2&

                     /people?NAME=Britney_Spears&page=02

     /people?page=2&name=Britney_Spears

              /people?name=Britney_Spears&page=02

         /people?name=britney_spears&page=2

         /people?name=Britney_Spears&page=2&token=abc

/people?name=Britney_Spears&page=2&user=jane



   non-­‐canonical	
  URLs	
  =	
  low	
  cache	
  hit	
  rate
<map base="http://example.com/">
   <path seg="images">
     <rewrite path=”pix”/>
   </path>
   <path seg="people">
     <query lower_keys="true" sort="true" delete="true">
         <page type="bool"/>
         <name type="lower"/>
     </query>
   </path>
</map>
                    XML format
       local in-cache / fetched from site




                 Director
cache&
There	
  are	
  only   two	
  hard	
  things	
  in	
  CS:




	
  invalidation
                       Phil	
  Karlton   naming	
  
                                         things.
reliability,	
  
                   scalability,	
  
                  immediacy.


	
  Choose	
  two.	
  Or	
  maybe	
  one.
the internets
                                 the internets




                                                 POST/PUT/DELETE/etc.


                                                           Request-URI
                                                           Content-Location
            http acceleration                              Location




                origin server




         RFC	
  2616:
Invalidations	
  after	
  Updates	
  or	
  Deletions
the internets
                       the internets




                                       POST/PUT/DELETE/etc.




  http acceleration




      origin server




Problem	
  1:	
  Peered	
  Caches
the internets
                              the internets




                                              POST/PUT/DELETE/etc.




         http acceleration


             origin server




Sharing	
  Invalidations	
  with	
  HTCP	
  CLR
POST /articles/123/new_comment

                            /newest_comments




   /articles/123/comments

                            /comment_feed


  Problem	
  2:	
  Related	
  Responses
POST /articles/123/new_comment

                                                        /newest_comments
                                                        Link: </articles/123/new_comment>; rel=”invalidate




   /articles/123/comments
   Link: </articles/123/new_comment>; rel=”invalidated-by”




                                                   /comment_feed
                                                   Link: </articles/123/new_comment>; rel=”invalidated-by




Link:	
  rel=invalidated-­‐by
POST /articles/123/new_comment

/cat/vuvuzela                                             /newest_comments
                                                          Link: </articles/123/new_comment>; rel=”invalidate




                                                               /bob/comments

     /articles/123/comments
     Link: </articles/123/new_comment>; rel=”invalidated-by”




                                                     /comment_feed
                                                     Link: </articles/123/new_comment>; rel=”invalidated-by




   Problem	
  3:	
  Dynamic	
  Relations
POST /articles/123/new_comment
Link: </cat/vuvuzela>; rel=”invalidates”
Link: </bob/comments>; rel=”invalidates”




/cat/vuvuzela                                                /newest_comments
                                                             Link: </articles/123/new_comment>; rel=”invalidate




                                                                  /bob/comments

        /articles/123/comments
        Link: </articles/123/new_comment>; rel=”invalidated-by”




                                                        /comment_feed
                                                        Link: </articles/123/new_comment>; rel=”invalidated-by




      Link:	
  rel=invalidates
“side effect” invalidation + link relations =

Linked
Cache
Invalidation
the internets
                     the internets




                                     “What’s
                                     become
                                     stale?”
http acceleration




    origin server




Cache	
  Channels
Cache	
  Channels
                Good	
  for: occasional	
  tight	
  control
                   Caveat: ~10-­‐30s	
  lag;	
  not	
  immediate
              Bottleneck: number	
  of	
  events	
  in	
  channel



Linked	
  Cache	
  Invalidation
                Good	
  for: user-­‐generated	
  content
                   Caveat: not	
  100%	
  reliable
              Bottleneck: complexity	
  of	
  relationships
The	
  whole	
  point	
  of	
  using	
  
a	
  Web	
  cache	
  is	
  that	
  you’re

       not
     writing
      code.
http://www.squid-­‐cache.org/
http://trafQicserver.apache.org/
http://www.mnot.net/cache_docs/
http://redbot.org/
http://github.com/mnot/

More Related Content

What's hot

Realizzare applicazioni Web con WebSocket, by Simone Bordet
Realizzare applicazioni Web con WebSocket, by Simone BordetRealizzare applicazioni Web con WebSocket, by Simone Bordet
Realizzare applicazioni Web con WebSocket, by Simone BordetCodemotion
 
System Engineer: OpenLDAP and Samba Server
System Engineer: OpenLDAP and Samba ServerSystem Engineer: OpenLDAP and Samba Server
System Engineer: OpenLDAP and Samba ServerTola LENG
 
Using packet-tracer, capture and other Cisco ASA tools for network troublesho...
Using packet-tracer, capture and other Cisco ASA tools for network troublesho...Using packet-tracer, capture and other Cisco ASA tools for network troublesho...
Using packet-tracer, capture and other Cisco ASA tools for network troublesho...Cisco Russia
 
Zenith Networks: Jump Start JUNOS
Zenith Networks: Jump Start JUNOSZenith Networks: Jump Start JUNOS
Zenith Networks: Jump Start JUNOSZenith Networks
 
Ccnp enterprise workbook v1.0 ospf-updated
Ccnp enterprise workbook v1.0 ospf-updatedCcnp enterprise workbook v1.0 ospf-updated
Ccnp enterprise workbook v1.0 ospf-updatedSagarR24
 
Manual linksys router_rv082
Manual linksys router_rv082Manual linksys router_rv082
Manual linksys router_rv082Edgar Cañizalez
 
How to recover the password for cisco 2900 integrated services router
How to recover the password for cisco 2900 integrated services routerHow to recover the password for cisco 2900 integrated services router
How to recover the password for cisco 2900 integrated services router3Anetwork com
 
Solaris 10 Advanced Features.
Solaris 10 Advanced Features.Solaris 10 Advanced Features.
Solaris 10 Advanced Features.Aram Avetisyan
 
Workbook added etherchannel ccnp enterprise workbook v1.0
Workbook added etherchannel ccnp enterprise workbook v1.0Workbook added etherchannel ccnp enterprise workbook v1.0
Workbook added etherchannel ccnp enterprise workbook v1.0SagarR24
 
Ccnp enterprise workbook v1.0 added hsrpv1
Ccnp enterprise workbook v1.0 added hsrpv1Ccnp enterprise workbook v1.0 added hsrpv1
Ccnp enterprise workbook v1.0 added hsrpv1SagarR24
 
Resolution for a Faster Site
Resolution for a Faster SiteResolution for a Faster Site
Resolution for a Faster SiteIdo Safruti
 
Rapport mymusicplease.fr
Rapport mymusicplease.frRapport mymusicplease.fr
Rapport mymusicplease.frGaetan Garnier
 
234821765 ccna-virtual-lab
234821765 ccna-virtual-lab234821765 ccna-virtual-lab
234821765 ccna-virtual-labITALTEL S.A.C
 
스트리밍과 디지털 권리 관리
스트리밍과 디지털 권리 관리스트리밍과 디지털 권리 관리
스트리밍과 디지털 권리 관리우영 주
 
SCADA Strangelove: взлом во имя
SCADA Strangelove: взлом во имяSCADA Strangelove: взлом во имя
SCADA Strangelove: взлом во имяEkaterina Melnik
 

What's hot (20)

Realizzare applicazioni Web con WebSocket, by Simone Bordet
Realizzare applicazioni Web con WebSocket, by Simone BordetRealizzare applicazioni Web con WebSocket, by Simone Bordet
Realizzare applicazioni Web con WebSocket, by Simone Bordet
 
System Engineer: OpenLDAP and Samba Server
System Engineer: OpenLDAP and Samba ServerSystem Engineer: OpenLDAP and Samba Server
System Engineer: OpenLDAP and Samba Server
 
Using packet-tracer, capture and other Cisco ASA tools for network troublesho...
Using packet-tracer, capture and other Cisco ASA tools for network troublesho...Using packet-tracer, capture and other Cisco ASA tools for network troublesho...
Using packet-tracer, capture and other Cisco ASA tools for network troublesho...
 
Zenith Networks: Jump Start JUNOS
Zenith Networks: Jump Start JUNOSZenith Networks: Jump Start JUNOS
Zenith Networks: Jump Start JUNOS
 
Ccnp enterprise workbook v1.0 ospf-updated
Ccnp enterprise workbook v1.0 ospf-updatedCcnp enterprise workbook v1.0 ospf-updated
Ccnp enterprise workbook v1.0 ospf-updated
 
Manual linksys router_rv082
Manual linksys router_rv082Manual linksys router_rv082
Manual linksys router_rv082
 
Status update-qemu-pcie
Status update-qemu-pcieStatus update-qemu-pcie
Status update-qemu-pcie
 
Vpn
VpnVpn
Vpn
 
How to recover the password for cisco 2900 integrated services router
How to recover the password for cisco 2900 integrated services routerHow to recover the password for cisco 2900 integrated services router
How to recover the password for cisco 2900 integrated services router
 
Solaris 10 Advanced Features.
Solaris 10 Advanced Features.Solaris 10 Advanced Features.
Solaris 10 Advanced Features.
 
Aironet
AironetAironet
Aironet
 
Workbook added etherchannel ccnp enterprise workbook v1.0
Workbook added etherchannel ccnp enterprise workbook v1.0Workbook added etherchannel ccnp enterprise workbook v1.0
Workbook added etherchannel ccnp enterprise workbook v1.0
 
Ccnp enterprise workbook v1.0 added hsrpv1
Ccnp enterprise workbook v1.0 added hsrpv1Ccnp enterprise workbook v1.0 added hsrpv1
Ccnp enterprise workbook v1.0 added hsrpv1
 
CME
CMECME
CME
 
Resolution for a Faster Site
Resolution for a Faster SiteResolution for a Faster Site
Resolution for a Faster Site
 
Rapport mymusicplease.fr
Rapport mymusicplease.frRapport mymusicplease.fr
Rapport mymusicplease.fr
 
234821765 ccna-virtual-lab
234821765 ccna-virtual-lab234821765 ccna-virtual-lab
234821765 ccna-virtual-lab
 
스트리밍과 디지털 권리 관리
스트리밍과 디지털 권리 관리스트리밍과 디지털 권리 관리
스트리밍과 디지털 권리 관리
 
SCADA Strangelove: взлом во имя
SCADA Strangelove: взлом во имяSCADA Strangelove: взлом во имя
SCADA Strangelove: взлом во имя
 
Mac authentication amigopod radius
Mac authentication amigopod radiusMac authentication amigopod radius
Mac authentication amigopod radius
 

Viewers also liked

Global Taxation Arbitrage
Global Taxation ArbitrageGlobal Taxation Arbitrage
Global Taxation ArbitrageMark Nottingham
 
Proxy解說
Proxy解說Proxy解說
Proxy解說Tony Yeh
 
Unidad 11 - Administración básica del sistema
Unidad 11 - Administración básica del sistemaUnidad 11 - Administración básica del sistema
Unidad 11 - Administración básica del sistemavverdu
 
Presentacion Squid
Presentacion SquidPresentacion Squid
Presentacion Squidalexmerono
 
Instalación de Servidores GNU/Linux - PROXY SQUID (parte 3)
Instalación de Servidores GNU/Linux - PROXY SQUID (parte 3)Instalación de Servidores GNU/Linux - PROXY SQUID (parte 3)
Instalación de Servidores GNU/Linux - PROXY SQUID (parte 3)Max Morales
 
IPTABLES y SQUID‏
IPTABLES y SQUID‏IPTABLES y SQUID‏
IPTABLES y SQUID‏ingpuma
 
Squid3 - Servidor Proxy
Squid3 - Servidor ProxySquid3 - Servidor Proxy
Squid3 - Servidor ProxyTotus Muertos
 
Presentación de Kerio
Presentación de KerioPresentación de Kerio
Presentación de Kerionovaltec
 
Instalación y Configuración de un Servidor Proxy en Linux Ubuntu
Instalación y Configuración de un Servidor Proxy en Linux UbuntuInstalación y Configuración de un Servidor Proxy en Linux Ubuntu
Instalación y Configuración de un Servidor Proxy en Linux UbuntuMarcelo Alcivar
 

Viewers also liked (18)

Squid
SquidSquid
Squid
 
Global Taxation Arbitrage
Global Taxation ArbitrageGlobal Taxation Arbitrage
Global Taxation Arbitrage
 
Ictic4
Ictic4Ictic4
Ictic4
 
Proxy解說
Proxy解說Proxy解說
Proxy解說
 
Introducción Administración TCP/IP
Introducción Administración TCP/IPIntroducción Administración TCP/IP
Introducción Administración TCP/IP
 
Squid
SquidSquid
Squid
 
Unidad 11 - Administración básica del sistema
Unidad 11 - Administración básica del sistemaUnidad 11 - Administración básica del sistema
Unidad 11 - Administración básica del sistema
 
Presentacion Squid
Presentacion SquidPresentacion Squid
Presentacion Squid
 
Instalación de Servidores GNU/Linux - PROXY SQUID (parte 3)
Instalación de Servidores GNU/Linux - PROXY SQUID (parte 3)Instalación de Servidores GNU/Linux - PROXY SQUID (parte 3)
Instalación de Servidores GNU/Linux - PROXY SQUID (parte 3)
 
Manual Servidor Proxy Squid3
Manual Servidor Proxy Squid3Manual Servidor Proxy Squid3
Manual Servidor Proxy Squid3
 
IPTABLES y SQUID‏
IPTABLES y SQUID‏IPTABLES y SQUID‏
IPTABLES y SQUID‏
 
Squid3 - Servidor Proxy
Squid3 - Servidor ProxySquid3 - Servidor Proxy
Squid3 - Servidor Proxy
 
Presentación de Kerio
Presentación de KerioPresentación de Kerio
Presentación de Kerio
 
Curso Squid avanzado
Curso Squid avanzadoCurso Squid avanzado
Curso Squid avanzado
 
Instalación y Configuración de un Servidor Proxy en Linux Ubuntu
Instalación y Configuración de un Servidor Proxy en Linux UbuntuInstalación y Configuración de un Servidor Proxy en Linux Ubuntu
Instalación y Configuración de un Servidor Proxy en Linux Ubuntu
 
Squid server
Squid serverSquid server
Squid server
 
Squid Server
Squid ServerSquid Server
Squid Server
 
Squid
SquidSquid
Squid
 

Similar to Stupid Web Caching Tricks

Replacing Squid with ATS
Replacing Squid with ATSReplacing Squid with ATS
Replacing Squid with ATSKit Chan
 
Handy Networking Tools and How to Use Them
Handy Networking Tools and How to Use ThemHandy Networking Tools and How to Use Them
Handy Networking Tools and How to Use ThemSneha Inguva
 
OSTU - Sake Blok on Packet Capturing with Tshark
OSTU - Sake Blok on Packet Capturing with TsharkOSTU - Sake Blok on Packet Capturing with Tshark
OSTU - Sake Blok on Packet Capturing with TsharkDenny K
 
(NET404) Making Every Packet Count
(NET404) Making Every Packet Count(NET404) Making Every Packet Count
(NET404) Making Every Packet CountAmazon Web Services
 
AWS re:Invent 2016: Making Every Packet Count (NET404)
AWS re:Invent 2016: Making Every Packet Count (NET404)AWS re:Invent 2016: Making Every Packet Count (NET404)
AWS re:Invent 2016: Making Every Packet Count (NET404)Amazon Web Services
 
Debugging linux issues with eBPF
Debugging linux issues with eBPFDebugging linux issues with eBPF
Debugging linux issues with eBPFIvan Babrou
 
Building scalable web socket backend
Building scalable web socket backendBuilding scalable web socket backend
Building scalable web socket backendConstantine Slisenka
 
Varnish @ Velocity Ignite
Varnish @ Velocity IgniteVarnish @ Velocity Ignite
Varnish @ Velocity IgniteArtur Bergman
 
Network Performance: Making Every Packet Count - NET401 - re:Invent 2017
Network Performance: Making Every Packet Count - NET401 - re:Invent 2017Network Performance: Making Every Packet Count - NET401 - re:Invent 2017
Network Performance: Making Every Packet Count - NET401 - re:Invent 2017Amazon Web Services
 
RGNet Ver.1.0.pptx
RGNet Ver.1.0.pptxRGNet Ver.1.0.pptx
RGNet Ver.1.0.pptxVeenitTomar2
 
BRKRST-3068 Troubleshooting Catalyst 2K and 3K.pdf
BRKRST-3068  Troubleshooting Catalyst 2K and 3K.pdfBRKRST-3068  Troubleshooting Catalyst 2K and 3K.pdf
BRKRST-3068 Troubleshooting Catalyst 2K and 3K.pdfssusercbaa33
 
5 issues
5 issues5 issues
5 issuesm0use
 
5 issues
5 issues5 issues
5 issuesm0use
 
Troubleshooting TCP/IP
Troubleshooting TCP/IPTroubleshooting TCP/IP
Troubleshooting TCP/IPvijai s
 
HTTP logging met Varnishlog - PHPWVL 2022
HTTP logging met Varnishlog - PHPWVL 2022HTTP logging met Varnishlog - PHPWVL 2022
HTTP logging met Varnishlog - PHPWVL 2022Thijs Feryn
 
Getting started with IPv6
Getting started with IPv6Getting started with IPv6
Getting started with IPv6Private
 
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!Daniel Stenberg
 

Similar to Stupid Web Caching Tricks (20)

ReplacingSquidWithATS
ReplacingSquidWithATSReplacingSquidWithATS
ReplacingSquidWithATS
 
Replacing Squid with ATS
Replacing Squid with ATSReplacing Squid with ATS
Replacing Squid with ATS
 
Handy Networking Tools and How to Use Them
Handy Networking Tools and How to Use ThemHandy Networking Tools and How to Use Them
Handy Networking Tools and How to Use Them
 
OSTU - Sake Blok on Packet Capturing with Tshark
OSTU - Sake Blok on Packet Capturing with TsharkOSTU - Sake Blok on Packet Capturing with Tshark
OSTU - Sake Blok on Packet Capturing with Tshark
 
(NET404) Making Every Packet Count
(NET404) Making Every Packet Count(NET404) Making Every Packet Count
(NET404) Making Every Packet Count
 
AWS re:Invent 2016: Making Every Packet Count (NET404)
AWS re:Invent 2016: Making Every Packet Count (NET404)AWS re:Invent 2016: Making Every Packet Count (NET404)
AWS re:Invent 2016: Making Every Packet Count (NET404)
 
Linux networking
Linux networkingLinux networking
Linux networking
 
Debugging linux issues with eBPF
Debugging linux issues with eBPFDebugging linux issues with eBPF
Debugging linux issues with eBPF
 
Building scalable web socket backend
Building scalable web socket backendBuilding scalable web socket backend
Building scalable web socket backend
 
BRKARC-3146_PoE_C3k.pdf
BRKARC-3146_PoE_C3k.pdfBRKARC-3146_PoE_C3k.pdf
BRKARC-3146_PoE_C3k.pdf
 
Varnish @ Velocity Ignite
Varnish @ Velocity IgniteVarnish @ Velocity Ignite
Varnish @ Velocity Ignite
 
Network Performance: Making Every Packet Count - NET401 - re:Invent 2017
Network Performance: Making Every Packet Count - NET401 - re:Invent 2017Network Performance: Making Every Packet Count - NET401 - re:Invent 2017
Network Performance: Making Every Packet Count - NET401 - re:Invent 2017
 
RGNet Ver.1.0.pptx
RGNet Ver.1.0.pptxRGNet Ver.1.0.pptx
RGNet Ver.1.0.pptx
 
BRKRST-3068 Troubleshooting Catalyst 2K and 3K.pdf
BRKRST-3068  Troubleshooting Catalyst 2K and 3K.pdfBRKRST-3068  Troubleshooting Catalyst 2K and 3K.pdf
BRKRST-3068 Troubleshooting Catalyst 2K and 3K.pdf
 
5 issues
5 issues5 issues
5 issues
 
5 issues
5 issues5 issues
5 issues
 
Troubleshooting TCP/IP
Troubleshooting TCP/IPTroubleshooting TCP/IP
Troubleshooting TCP/IP
 
HTTP logging met Varnishlog - PHPWVL 2022
HTTP logging met Varnishlog - PHPWVL 2022HTTP logging met Varnishlog - PHPWVL 2022
HTTP logging met Varnishlog - PHPWVL 2022
 
Getting started with IPv6
Getting started with IPv6Getting started with IPv6
Getting started with IPv6
 
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!
 

More from Mark Nottingham

What HTTP/2.0 Will Do For You
What HTTP/2.0 Will Do For YouWhat HTTP/2.0 Will Do For You
What HTTP/2.0 Will Do For YouMark Nottingham
 
Browser Caching and You: A Love Story
Browser Caching and You: A Love StoryBrowser Caching and You: A Love Story
Browser Caching and You: A Love StoryMark Nottingham
 
Leveraging the Web for Services at Yahoo!
Leveraging the Web for Services at Yahoo!Leveraging the Web for Services at Yahoo!
Leveraging the Web for Services at Yahoo!Mark Nottingham
 

More from Mark Nottingham (7)

What HTTP/2.0 Will Do For You
What HTTP/2.0 Will Do For YouWhat HTTP/2.0 Will Do For You
What HTTP/2.0 Will Do For You
 
Browser Caching and You: A Love Story
Browser Caching and You: A Love StoryBrowser Caching and You: A Love Story
Browser Caching and You: A Love Story
 
Shiny New HTTP Shit
Shiny New HTTP ShitShiny New HTTP Shit
Shiny New HTTP Shit
 
Introducing REDbot
Introducing REDbotIntroducing REDbot
Introducing REDbot
 
Leveraging the Web for Services at Yahoo!
Leveraging the Web for Services at Yahoo!Leveraging the Web for Services at Yahoo!
Leveraging the Web for Services at Yahoo!
 
Web 2.0 on Speed
Web 2.0 on SpeedWeb 2.0 on Speed
Web 2.0 on Speed
 
What's up with HTTP?
What's up with HTTP?What's up with HTTP?
What's up with HTTP?
 

Recently uploaded

Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 

Recently uploaded (20)

Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 

Stupid Web Caching Tricks

  • 1. Stupid Web  Caching Tricks Mark  Nottingham    /    mnot@yahoo-­‐inc.com    /    mnot@mnot.net    /    @mnot
  • 3. the internets the internets front-end
  • 4. the internets the internets front-end services
  • 5. the internets the internets front-end caching services
  • 6. Simple,  right? Well,  let’s  bring  it  into  rotation...
  • 7. 1 2 3 4 5 6 1276007531.061 205 192.168.1.16 TCP_MISS/200 9286 GET /details?ticker=ABC 1276007531.062 205 192.168.1.17 TCP_MISS/200 9287 GET /details?ticker=ABC 1276007531.064 218 192.168.1.16 TCP_MISS/200 9285 GET /details?ticker=ABC 1276007531.065 198 192.168.1.17 TCP_MISS/200 9286 GET /details?ticker=ABC 1276007531.065 215 192.168.1.15 TCP_MISS/200 9286 GET /details?ticker=ABC 1276007531.068 205 192.168.1.15 TCP_MISS/200 9288 GET /details?ticker=ABC 1276007531.072 1 192.168.1.17 TCP_HIT/200 9286 GET /details?ticker=ABC 1276007531.254 398 192.168.1.15 TCP_MISS/200 9288 GET /details?ticker=ABC 1276007531.261 408 192.168.1.15 TCP_MISS/200 9287 GET /details?ticker=ABC 1276007531.289 429 192.168.1.17 TCP_MISS/200 9286 GET /details?ticker=ABC 1276007531.922 852 192.168.1.15 TCP_MISS/504 282 GET /details?ticker=ABC 1276007532.005 0 192.168.1.15 TCP_HIT/200 9286 GET /details?ticker=ABC 1276007532.044 987 192.168.1.16 TCP_MISS/504 283 GET /details?ticker=ABC 1276007532.045 2 192.168.1.16 TCP_HIT/200 9286 GET /details?ticker=ABC 1276007532.068 1001 192.168.1.17 TCP_MISS/000 0 GET /details?ticker=ABC 1276007532.072 998 192.168.1.16 TCP_MISS/504 278 GET /details?ticker=ABC 1276007591.062 60001 192.168.1.16 TCP_MISS/000 0 GET /details?ticker=ABC Oops.
  • 8. 1 2 3 4 5 6 1276007531.068 205 192.168.1.16 TCP_MISS/200 9286 GET /details?ticker=ABC 1276007531.068 205 192.168.1.17 TCP_MISS/200 9286 GET /details?ticker=ABC 1276007531.068 205 192.168.1.17 TCP_MISS/200 9286 GET /details?ticker=ABC 1276007531.068 205 192.168.1.15 TCP_MISS/200 9286 GET /details?ticker=ABC 1276007531.068 205 192.168.1.16 TCP_MISS/200 9286 GET /details?ticker=ABC 1276007531.068 205 192.168.1.15 TCP_MISS/200 9286 GET /details?ticker=ABC 1276007531.072 1 192.168.1.17 TCP_HIT/200 9287 GET /details?ticker=ABC 1276007531.072 0 192.168.1.15 TCP_HIT/200 9286 GET /details?ticker=ABC 1276007531.073 1 192.168.1.16 TCP_HIT/200 9285 GET /details?ticker=ABC 1276007531.073 0 192.168.1.15 TCP_HIT/200 9285 GET /details?ticker=ABC 1276007531.074 0 192.168.1.17 TCP_HIT/200 9286 GET /details?ticker=ABC 1276007531.076 1 192.168.1.16 TCP_HIT/200 9285 GET /details?ticker=ABC 1276007531.076 0 192.168.1.17 TCP_HIT/200 9287 GET /details?ticker=ABC 1276007531.077 0 192.168.1.15 TCP_HIT/200 9286 GET /details?ticker=ABC 1276007531.078 1 192.168.1.15 TCP_HIT/200 9286 GET /details?ticker=ABC 1276007531.079 1 192.168.1.16 TCP_HIT/200 9285 GET /details?ticker=ABC Collapsed  Forwarding
  • 9. in  squid2: collapsed_forwarding on in  squid2.HEAD: collapsed_forwarding_timeout
  • 10. the internets the internets front-end caching SPOF! services
  • 11. the internets the internets front-end caching services
  • 12. + good  business  continuity more  Qlexible -­‐ worse  hit  rate high  load  when  new  caches  come  online caches  can  come  out  of  sync answer: Cache  Peering
  • 13. the internets the internets front-end caching services
  • 14. RFC  2186  -­‐  Internet  Cache  Protocol UDP-­‐based   Just  the  URI Query  only in  Squid  /  TrafQic  Server RFC  2756  -­‐  Hyper  Text  Caching  Protocol UDP-­‐based  (option  for  TCP  in  spec) Includes  URI  +  Headers Query,  CLR  operations in  Squid
  • 15. the internets the internets front-end caching ?! services
  • 16. 24 front-end servers x 24 Apache children x 5 pages / second x 8 service requests / page x 10k / service response / 2 cache servers = 11,520 req/sec 900 Mbits/sec /cache server
  • 17. the internets the internets front-end local caching proxy caching services Hierarchy
  • 18. 1 2 3 4 5 6 1276007530.037 0 192.168.1.17 TCP_HIT/200 9286 GET /details?ticker=ABC 1276007530.057 1 192.168.1.16 TCP_HIT/200 9285 GET /details?ticker=ABC 1276007530.083 0 192.168.1.17 TCP_HIT/200 9287 GET /details?ticker=ABC 1276007530.119 0 192.168.1.15 TCP_HIT/200 9286 GET /details?ticker=ABC 1276007530.141 1 192.168.1.15 TCP_HIT/200 9286 GET /details?ticker=ABC 1276007530.179 0 192.168.1.16 TCP_HIT/200 9285 GET /details?ticker=ABC 1276007530.397 205 192.168.1.15 TCP_REFRESH_MISS/200 9285 GET /details?... 1276007530.401 1 192.168.1.17 TCP_HIT/200 9286 GET /details?ticker=ABC 1276007530.414 201 192.168.1.17 TCP_REFRESH_MISS/200 9285 GET /details?... 1276007530.418 1 192.168.1.15 TCP_HIT/200 9285 GET /details?ticker=ABC 1276007530.434 0 192.168.1.16 TCP_HIT/200 9287 GET /details?ticker=ABC 1276007530.442 198 192.168.1.17 TCP_REFRESH_MISS/200 9285 GET /details?... 1276007530.372 0 192.168.1.15 TCP_HIT/200 9285 GET /details?ticker=ABC 1276007530.494 201 192.168.1.16 TCP_REFRESH_MISS/200 9285 GET /details?... 1276007530.525 1 192.168.1.17 TCP_HIT/200 9284 GET /details?ticker=ABC 1276007530.548 201 192.168.1.17 TCP_REFRESH_MISS/200 9285 GET /details?... 1276007530.563 1 192.168.1.15 TCP_HIT/200 9286 GET /details?ticker=ABC 1276007530.594 0 192.168.1.16 TCP_HIT/200 9285 GET /details?ticker=ABC Content  Becomes  Stale
  • 19. Cache-Control: stale-while-revalidate=30 implemented Squid  2.7 RFC  5861 coming  soon Squid  3.2 Apache  TrafQic  Server
  • 20. 1 2 3 4 5 6 1276007530.037 0 192.168.1.17 TCP_HIT/200 9286 GET /details?ticker=ABC 1276007530.057 1 192.168.1.16 TCP_HIT/200 9285 GET /details?ticker=ABC 1276007530.083 0 192.168.1.17 TCP_HIT/200 9287 GET /details?ticker=ABC 1276007530.119 0 192.168.1.15 TCP_HIT/200 9286 GET /details?ticker=ABC 1276007530.141 1 192.168.1.15 TCP_HIT/200 9286 GET /details?ticker=ABC 1276007530.179 0 192.168.1.16 TCP_HIT/200 9285 GET /details?ticker=ABC 1276007530.192 0 192.168.1.15 TCP_STALE_HIT/200 9285 GET /details?... 1276007530.213 1 192.168.1.17 TCP_STALE_HIT/200 9286 GET /details?... 1276007530.243 0 192.168.1.17 TCP_STALE_HIT/200 9285 GET /details?... 1276007530.294 0 192.168.1.16 TCP_STALE_HIT/200 9287 GET /details?... 1276007530.347 0 192.168.1.17 TCP_STALE_HIT/200 9285 GET /details?... 1276007530.384 219 0.0.0.0 TCP_ASYNC_MISS/200 9285 GET /details?... 1276007530.401 1 192.168.1.17 TCP_HIT/200 9284 GET /details?ticker=ABC 1276007530.418 1 192.168.1.15 TCP_HIT/200 9286 GET /details?ticker=ABC 1276007530.434 0 192.168.1.16 TCP_HIT/200 9285 GET /details?ticker=ABC stale-­‐while-­‐revalidate
  • 21. the internets the internets front-end local caching proxy caching services
  • 22. Cache-Control: stale-if-error=3600 implemented Squid  2.7 RFC  5861 coming  soon Squid  3.2 Apache  TrafQic  Server
  • 23. Dealing  with Aborted  Requests front-­‐end  timeout:  500ms front-end dropped  client  connection slow  service  =  no  cached  response caching not  cached  =  always  slow Squid quick_abort services Apache  TrafQic  Server background_fill
  • 24. Getting  an Immediate  Answer front-end Cache-Control: only-if-cached 504 Gateway Error caching Cache-Control: max-age=3600, max-stale Squid fetch_only_if_cached_access (soon) services
  • 25. the internets the internets front-end local caching cache_peer...round-robin proxy caching the internets the internets services
  • 26. the internets the internets front-end local caching cache_peer...carp proxy caching the internets the internets services
  • 27. Why   ? won’t   Squid cache  that response
  • 28. Easy  Answers request  Cache-­Control   response  Cache-­Control   authentication   unfriendly  freshness  information   lack  of  LM/ETag  
  • 29. ...in  Squid request  Cache-­Control ignore-­‐reload response  Cache-­Control ignore-­‐[no-­‐cache,  no-­‐store,  must-­‐revalidate,  private] authentication ignore-­‐auth unfriendly  freshness  information override-­‐[expire,  lastmod] lack  of  LM/ETag store-­‐stale refresh_pattern . 10 100% 10 [options]
  • 30. ...in  Traf@ic  Server request  Cache-­Control proxy.conQig.http.cache.ignore_client_no_cache response  Cache-­Control proxy.conQig.http.cache.ignore_server_no_cache authentication proxy.conQig.http.cache.ignore_authentication   unfriendly  freshness  information proxy.conQig.http.cache.when_to_revalidate lack  of  LM/ETag proxy.conQig.http.cache.required_headers dest_domain=example.com method=GET pin-in-cache=2d
  • 31. Not  So  Easy:   Wandering  URLs http://srv254.dctr.example.com/foo/image.gif http://example.com/thing.xml?uselessToken=abc123 http://example.com/endPointforEverything http://a storeurl_rewrite http://b http://a
  • 32. No  Answers* non-­‐GET  methods Protocol  Errors Vary:  * *without  hacking
  • 34. Accelerator  Caching the internets the internets proxy caching services
  • 35. /people?name=Britney_Spears&page=2 /people?name=Britney_Spears&page=2& /people?NAME=Britney_Spears&page=02 /people?page=2&name=Britney_Spears /people?name=Britney_Spears&page=02 /people?name=britney_spears&page=2 /people?name=Britney_Spears&page=2&token=abc /people?name=Britney_Spears&page=2&user=jane non-­‐canonical  URLs  =  low  cache  hit  rate
  • 36. <map base="http://example.com/"> <path seg="images"> <rewrite path=”pix”/> </path> <path seg="people"> <query lower_keys="true" sort="true" delete="true"> <page type="bool"/> <name type="lower"/> </query> </path> </map> XML format local in-cache / fetched from site Director
  • 37. cache& There  are  only two  hard  things  in  CS:  invalidation Phil  Karlton naming   things.
  • 38. reliability,   scalability,   immediacy.  Choose  two.  Or  maybe  one.
  • 39. the internets the internets POST/PUT/DELETE/etc. Request-URI Content-Location http acceleration Location origin server RFC  2616: Invalidations  after  Updates  or  Deletions
  • 40. the internets the internets POST/PUT/DELETE/etc. http acceleration origin server Problem  1:  Peered  Caches
  • 41. the internets the internets POST/PUT/DELETE/etc. http acceleration origin server Sharing  Invalidations  with  HTCP  CLR
  • 42. POST /articles/123/new_comment /newest_comments /articles/123/comments /comment_feed Problem  2:  Related  Responses
  • 43. POST /articles/123/new_comment /newest_comments Link: </articles/123/new_comment>; rel=”invalidate /articles/123/comments Link: </articles/123/new_comment>; rel=”invalidated-by” /comment_feed Link: </articles/123/new_comment>; rel=”invalidated-by Link:  rel=invalidated-­‐by
  • 44. POST /articles/123/new_comment /cat/vuvuzela /newest_comments Link: </articles/123/new_comment>; rel=”invalidate /bob/comments /articles/123/comments Link: </articles/123/new_comment>; rel=”invalidated-by” /comment_feed Link: </articles/123/new_comment>; rel=”invalidated-by Problem  3:  Dynamic  Relations
  • 45. POST /articles/123/new_comment Link: </cat/vuvuzela>; rel=”invalidates” Link: </bob/comments>; rel=”invalidates” /cat/vuvuzela /newest_comments Link: </articles/123/new_comment>; rel=”invalidate /bob/comments /articles/123/comments Link: </articles/123/new_comment>; rel=”invalidated-by” /comment_feed Link: </articles/123/new_comment>; rel=”invalidated-by Link:  rel=invalidates
  • 46. “side effect” invalidation + link relations = Linked Cache Invalidation
  • 47. the internets the internets “What’s become stale?” http acceleration origin server Cache  Channels
  • 48. Cache  Channels Good  for: occasional  tight  control Caveat: ~10-­‐30s  lag;  not  immediate Bottleneck: number  of  events  in  channel Linked  Cache  Invalidation Good  for: user-­‐generated  content Caveat: not  100%  reliable Bottleneck: complexity  of  relationships
  • 49. The  whole  point  of  using   a  Web  cache  is  that  you’re not writing code.

Editor's Notes