SlideShare a Scribd company logo
Northeast PHP August 12, 2012


Varnish, The Good, The
  Awesome, and the
   Downright Crazy
        By Mike Willbanks
    Sr. Web Architect Manager
        NOOK Developer
Housekeeping…


    • Talk
       Slides will be online later!

    • Me
       Sr. Web Architect Manager at NOOK Developer

       Prior MNPHP Organizer

       Open Source Contributor (Zend Framework and various others)

       Where you can find me:
        • Twitter: mwillbanks          G+: Mike Willbanks
        • IRC (freenode): mwillbanks   Blog: http://blog.digitalstruct.com
        • GitHub: https://github.com/mwillbanks


2
Agenda


    • What is Varnish
    • The Good : Why…
       The quick, easy and hardly informed way…

    • The Awesome : How…
       VCL’s, Directors and more…

    • The Crazy : Go…
       ESI, Purging, VCL C, and VMOD…

    • Varnish Command Line Apps
       varnishtop, varnishstat, etc.




3
What is Varnish?
Official Statement
What the hell it means
Graphs, oh my!
Official Statement




     “Varnish is a web application accelerator. You install it in
        front of your web application and it will speed it up
                           significantly.”




5
What The Hell? Tell me!


    • Varnish allow you to accelerate your website
       By using memory and keeping in mind cookies, request headers
       and more…
    • It caches pages so that your web server can RELAX!
       What about my apache, tomcat, nginx and (mongrel|thin|
       goliath….)
       Generally caching by TTL + HTTP Headers (cookies too!)

    • A load banancer, proxy and more…
       What? …. Yes, it can do that!




6
A General Use Case


    • CaringBridge Status Server
       Getting a message to mobile users.

       The system is down, or we want to be able to communicate a
       message to them about some subject… maybe a campaign.
       The apps and mobile site rely on an API
        • Trouble in paradise? Few and far in between.
       Let an API talk to a server…

       A story on crashing and burning before varnish.




7
The Graph - AWS

                  Req/s                                              Peak Load
700                                                14
600                                                12
500                                                10
400                                                 8
300                                       Req/s                                                  Peak Load
                                                    6
200                                                 4
100
                                                    2
  0
                                                    0
        Small   X-Large   Small Varnish
                                                            Small    X-Large    Small Varnish



                  Time                                                Requests
500                                               80000
450                                               70000
400
                                                  60000
350
300                                               50000
250                                               40000
                                          Time                                                    Requests
200                                               30000
150
                                                  20000
100
 50                                               10000
  0                                                     0
 8      Small   X-Large   Small Varnish                      Small    X-Large    Small Varnish
The Raw Data


                     Small	
     X-­‐Large	
   Small	
  Varnish	
  
    Concurrency	
   10	
         150	
              150	
  
    Requests	
       5000	
      55558	
            75000	
  
    Time	
           438	
       347	
              36	
  
    Req/s	
          11.42	
     58	
               585	
  
    Peak	
  Load	
   11.91	
     8.44	
             0.35	
  
                                 19,442	
  
    Comments	
                   failed	
  reqs	
  




9
The Good – Listen Up!
Installment
Documentation
Finding Existing VCL’s
Installment


     • RTM : http://goo.gl/hl4Tt
        Debian: sudo apt-get install varnish

        EPEL: yum install varnish
         • only 6.x otherwise you’ll be out of date!
        WOOT Compiling #git
         • git clone git://git.varnish-cache.org/varnish-cache
         • cd varnish-cache
         • sh autogen.sh
         • ./configure
         • make && make install



11
Varnish Daemon


     • varnishd
        -a address[:port]   listen for client
        -b address[:port]   backend requests
        -T address[:port]   administration http
        -s type[,options]   storage type (malloc, file, persistence)
        -P /path/to/file    PID file
        Many others; these are generally the most important. Generally
        the defaults will do with just modification of the default VCL
        (more on it later).




12
Documentation


     • Reference Manual
        https://www.varnish-cache.org/docs/3.0/reference/index.html

     • Tutorial – more like a book version of the reference manual
        https://www.varnish-cache.org/docs/3.0/tutorial/index.html

     • Knock yourselves out! There is a ton of documentation
         • Yes, this makes happy developers.
        Documentation is very accurate, read carefully.

        Focus heavily on VCL’s, that is generally what you need.

        I’m attempting to show you some of how this works but you will
        require the documentation to assist you.


13
Existing VCL’s – The truly lazy…


     • VCL’s are available for common open source projects
        Hi wordpress and drupal!
         • https://www.varnish-cache.org/trac/wiki/VarnishAndWordpress
         • https://www.varnish-cache.org/trac/wiki/VarnishAndDrupal
        Examples of all sorts of crazy
         • https://www.varnish-cache.org/trac/wiki/VCLExamples




14
Wordpress = Bad Slashdot Bad!!!

      backend default {
        .host = "127.0.0.1“;
        .port = "8080";
      }
      sub vcl_recv {
          if (!(req.url ~ "wp-(login|admin)")) {
              unset req.http.cookie;
          }
      }
      sub vcl_fetch {
          if (!(req.url ~ "wp-(login|admin)")) {
              unset beresp.http.set-cookie;
          }
      }




15
The Awesome – Going Places
VCL
Directors
A Few Examples
VCL’s by Diagram…




17
VCL – Varnish Configuration Language


     • VCL State Engine
        Each Request is Processed Separately & Independently

        States are Isolated but are Related

        Return statements exit one state and start another

        VCL defaults are ALWAYS appended below your own VCL

     • VCL can be complex, but…
        Two main subroutines; vcl_recv and vcl_fetch

        Common actions: pass, hit_for_pass, lookup, pipe, deliver

        Common variables: req, beresp and obj

        More subroutines, functions and complexity can arise dependent
        on condition.
18
VCL – Subroutines – breaking it down.


     • vcl_init – VCL is loaded, no request yet; VMOD initialization
     • vcl_recv – Beginning of request, req is in scope
     • vcl_pipe – Client & backend data passed unaltered
     • vcl_pass – Request goes to backend and not cached
     • vcl_hash – call hash_data to add to the hash
     • vcl_hit – called on request found in the cache
     • vcl_miss – called on request not found in the cache
     • vcl_fetch – called on document retrieved from backend
     • vcl_deliver – called prior to delivery of cached object
     • vcl_error – called on errors

19
     • vcl_fini – all requests have exited VCL, cleanup of VMOD’s
VCL - Variables


     • Always Available              • Backend Req Prepartion
        now – epoch time               bereq – backend request

     • Backend Declarations          • Retrieved Backend Request
        .host – hostname / IP          beresp – backend response
        .port – port number         • Cached Object
     • Request Processing               obj – Cached object, can only
        client – ip & identity         change .ttl

        server – ip & port          • Response Preparation
        req – request information      resp – http stuff




20
VCL - Functions


     • hash_data(string) – adds a string to the hash input.
        Request host and URL is default from the default vcl.

     • regsub(string, regex, sub) – substitution on first occurance
        sub can contain numbers 0-n to inject matches from the regex.

     • regsuball(string, regex, sub) – substitution on all occurances
     • ban(expression) – Ban all objects in cache that match
     • ban(regex) – Ban all objects in cache that have a URL match




21
Directors


     • Directors allow you to talk to the backend servers
     • Directors are a glorified reverse proxy
        Allows for certain types of load balancing

        Allows for talking to a cluster



            “A director is a logical group of backend servers
          clustered together for redundancy. The basic role of
          the director is to let Varnish choose a backend server
            amongst several so if one is down another can be
                                   used.”


22
Directors – The Types


     • Random Director – picks a backend by random number
     • Client Director – picks a backend by client identity
     • Hash Director – picks a backend by URL hash value
     • Round-Robin Director – picks a backend in order
     • DNS Director – picks a backend by means of DNS
        Random OR Round-Robin

     • Fallback – picks the first “healthy” backend




23
Director - Probing


     • To ensure healthy backends, you need to use probing.
        It really sounds like a colonoscopy for servers; which it is.

     • Variables
        .url

        .request

        .window

        .threshold

        .intial

        .expected_response

        .interval

        .timeout
24
Example VCL Configuration




25
The Crazy
ESI – Edge-Side Includes
Purging
VMOD
ESI – Edge Side Includes


     • ESI is a small markup language much like SSI (server side
       includes) to include fragments (or dynamic content for that
       matter).
     • Think of it as replacing regions inside of a page as if you
       were using XHR (AJAX) but single threaded.
     • Three Statements can be utilized.
        esi:include – Include a page

        esi:remove – Remove content

        <!-- esi --> - ESI disabled, execute normally




27
ESI – By Diagram




28
Using ESI


     • In vcl_fetch, you must set ESI to be on
        set beresp.do_esi = true;

        By default, ESI will still cache, so add an exclusion if you need it
         • if (req.url == “/show_username.php”) {
               return (pass);
           }
         • This is a good thing, you may want to cache user information to the
           right people (aka by cookie value) so that you don’t reload it on every
           request.
        Varnish refuses to parse content for ESI if it does not look like XML
         • This is by default; so check varnishstat and varnishlog to ensure that it
           is functioning like normal.


29
ESI – By Example

     <html>
         <head><title>Rock it with ESI</title></head>
         <body>
               <header>
                   <esi:include src="/user_header.php" />
                   <!-- Don't do this as you'd lose the advantage of varnish -->
                   <!--esi
                   <?php include 'user_header.php'; ?>
                   -->
               </header>
               <section id="main"></section
               <footer></footer>
         </body>
     </html>



30
Purging


     • The various ways of purging
        varnishadm – command line utility
         • It’s the ole finger in the back of the throat
        Sockets (port 6082) – everyone likes a good socket wrench
         • Sure, Ipecac is likely overkill.
        HTTP – now that is the sexiness
         • A few headers, nothing forced.




31
Purging Examples

     varnishadm -T 127.0.0.1:6082 purge req.url == "/foo/bar“


     telnet localhost 6082
     purge req.url == "/foo/bar


     telnet localhost 80
     Response:
     Trying 127.0.0.1...
     Connected to localhost.
     Escape character is '^]'.


     PURGE /foo/bar HTTP/1.0
     Host: bacon.org

32
Distributed Purging


     • Distributed Purging… like a sorority party.
        Use a message queue (or gearman job server)

        Have a worker that knows about the varnish servers

        Submit the request to clear the cache in the asynchronously or
        synchronously depending on your use case.
         • Have enough workers to make this effective at purging the cache
           quickly.
        This will make it far easier to scale; you can either store the
        servers in a config file, database or anything else you think is
        relevant.




33
Embedding C in VCL – you must be crazy


     • Before getting into VMOD; did you know you can embed C
       into the VCL for varnish?
     • Want to do something crazy fast or leverage a C library for
       pre or post processing?
     • I know… you’re thinking that’s useless..
        On to the example; and a good one from the Varnish WIKI!




34
VCL - Embedded C for syslog – uber sexy

     C{
           #include <syslog.h>
     }C


     sub vcl_something {
           C{
                syslog(LOG_INFO, "Something happened at VCL line XX.");
           }C
     }
     # Example with using varnish variables
     C{
           syslog(LOG_ERR, "Spurious response from backend: xid %s request %s %s
         "%s" %d "%s" "%s"", VRT_r_req_xid(sp), VRT_r_req_request(sp),
         VRT_GetHdr(sp, HDR_REQ, "005host:"), VRT_r_req_url(sp),
         VRT_r_obj_status(sp), VRT_r_obj_response(sp), VRT_GetHdr(sp, HDR_OBJ,
         "011Location:"));
     }C
35
VMOD – Varnish Modules / Extensions


     • Taking VCL embedded C to the next level
     • Allows you to extend varnish and create new functions
     • Now, if you are writing modules for varnish you have a
       specialty use case!
        Go read up on it!

        https://www.varnish-cache.org/docs/trunk/reference/vmod.html




36
VMOD - std


     • The VMOD std is shipped with varnish; it provides some
       useful commands
        toupper           syslog

        tolower           fileread

        set_up_tos        duration

        random            integer

        log               collect




37
Varnish Command Line Apps
varnish        varnishadm    varnishhist
varnishlog     varnishncsa   varnishreplay
varnishsizes   varnishstat   varnishtest
               varnishtop
What is Varnish doing…


     • What is varnish doing right now?
     • How do I debug what is happening?
        varnishtop




39
What is Varnish doing…




40
Logging


     • Many times people want to log the requests to a file
        By default Varnish only stores these in shared memory.

        Apache Style Logs
         • varnishncsa –D –a –w log.txt
        This will run as a daemon to log all of your requests on a separate
        thread.




41
Logging




42
Cache Warmup


     • Need to warm up your cache before putting a sever in the
       queue or load test an environment?
        varnishreplay –r log.txt

     • Replaying logs can allow you to do this. This is great for
       when you are going to be deploying code to check for
       performance issues.
        Although… be careful so that you don’t POST data or create data
        on peoples accounts. Maybe cat the file and remove anything that
        executes on data.




43
Cache Hit Ratios? No Problem


     • How to see your cache hit ratios…
        varnishstat

     • Want to parse them from XML so you can create a sexy
       administration panel?
        varnishstat –x




44
Cache Hit Ratios? No Problem




45
Questions?
These slides will be posted to SlideShare & SpeakerDeck.
  SpeakerDeck: http://speakerdeck.com/u/mwillbanks

  Slideshare: http://www.slideshare.net/mwillbanks

  Twitter: mwillbanks

  G+: Mike Willbanks

  IRC (freenode): mwillbanks

  Blog: http://blog.digitalstruct.com

  GitHub: https://github.com/mwillbanks

More Related Content

What's hot

Accelerating Rails with edge caching
Accelerating Rails with edge cachingAccelerating Rails with edge caching
Accelerating Rails with edge caching
Michael May
 
Varnish Cache Plus. Random notes for wise web developers
Varnish Cache Plus. Random notes for wise web developersVarnish Cache Plus. Random notes for wise web developers
Varnish Cache Plus. Random notes for wise web developers
Carlos Abalde
 
Memcached Study
Memcached StudyMemcached Study
Memcached Study
nam kwangjin
 
Rails Caching: Secrets From the Edge
Rails Caching: Secrets From the EdgeRails Caching: Secrets From the Edge
Rails Caching: Secrets From the Edge
Fastly
 
Memcached: What is it and what does it do?
Memcached: What is it and what does it do?Memcached: What is it and what does it do?
Memcached: What is it and what does it do?
Brian Moon
 
Memcached: What is it and what does it do? (PHP Version)
Memcached: What is it and what does it do? (PHP Version)Memcached: What is it and what does it do? (PHP Version)
Memcached: What is it and what does it do? (PHP Version)
Brian Moon
 
Varnish Cache
Varnish CacheVarnish Cache
Varnish Cache
Mahbub E Elahi (Ron)
 
Scaling Your Cache
Scaling Your CacheScaling Your Cache
Scaling Your Cache
Alex Miller
 
CouchDB for Web Applications - Erlang Factory London 2009
CouchDB for Web Applications - Erlang Factory London 2009CouchDB for Web Applications - Erlang Factory London 2009
CouchDB for Web Applications - Erlang Factory London 2009
Jason Davies
 
EWD 3 Training Course Part 34: QEWD Resilient Mode
EWD 3 Training Course Part 34: QEWD Resilient ModeEWD 3 Training Course Part 34: QEWD Resilient Mode
EWD 3 Training Course Part 34: QEWD Resilient Mode
Rob Tweed
 
Service-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixService-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixBruce Snyder
 
Integrating multiple CDN providers at Etsy - Velocity Europe (London) 2013
Integrating multiple CDN providers at Etsy - Velocity Europe (London) 2013Integrating multiple CDN providers at Etsy - Velocity Europe (London) 2013
Integrating multiple CDN providers at Etsy - Velocity Europe (London) 2013
Marcus Barczak
 
Improving Website Performance and Scalability with Memcached
Improving Website Performance and Scalability with MemcachedImproving Website Performance and Scalability with Memcached
Improving Website Performance and Scalability with MemcachedAcquia
 
Varnish http accelerator
Varnish http acceleratorVarnish http accelerator
Varnish http acceleratorno no
 
Build your own CDN with Varnish - Confoo 2022
Build your own CDN with Varnish - Confoo 2022Build your own CDN with Varnish - Confoo 2022
Build your own CDN with Varnish - Confoo 2022
Thijs Feryn
 
Varnish Configuration Step by Step
Varnish Configuration Step by StepVarnish Configuration Step by Step
Varnish Configuration Step by Step
Kim Stefan Lindholm
 
Resin Outperforms NginX
Resin Outperforms NginXResin Outperforms NginX
Resin Outperforms NginX
billdigman
 
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
Rob Tweed
 

What's hot (19)

Accelerating Rails with edge caching
Accelerating Rails with edge cachingAccelerating Rails with edge caching
Accelerating Rails with edge caching
 
Varnish Cache Plus. Random notes for wise web developers
Varnish Cache Plus. Random notes for wise web developersVarnish Cache Plus. Random notes for wise web developers
Varnish Cache Plus. Random notes for wise web developers
 
Memcached Study
Memcached StudyMemcached Study
Memcached Study
 
Rails Caching: Secrets From the Edge
Rails Caching: Secrets From the EdgeRails Caching: Secrets From the Edge
Rails Caching: Secrets From the Edge
 
Memcached: What is it and what does it do?
Memcached: What is it and what does it do?Memcached: What is it and what does it do?
Memcached: What is it and what does it do?
 
Memcached: What is it and what does it do? (PHP Version)
Memcached: What is it and what does it do? (PHP Version)Memcached: What is it and what does it do? (PHP Version)
Memcached: What is it and what does it do? (PHP Version)
 
Varnish Cache
Varnish CacheVarnish Cache
Varnish Cache
 
Scaling Your Cache
Scaling Your CacheScaling Your Cache
Scaling Your Cache
 
CouchDB for Web Applications - Erlang Factory London 2009
CouchDB for Web Applications - Erlang Factory London 2009CouchDB for Web Applications - Erlang Factory London 2009
CouchDB for Web Applications - Erlang Factory London 2009
 
Memcached
MemcachedMemcached
Memcached
 
EWD 3 Training Course Part 34: QEWD Resilient Mode
EWD 3 Training Course Part 34: QEWD Resilient ModeEWD 3 Training Course Part 34: QEWD Resilient Mode
EWD 3 Training Course Part 34: QEWD Resilient Mode
 
Service-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixService-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMix
 
Integrating multiple CDN providers at Etsy - Velocity Europe (London) 2013
Integrating multiple CDN providers at Etsy - Velocity Europe (London) 2013Integrating multiple CDN providers at Etsy - Velocity Europe (London) 2013
Integrating multiple CDN providers at Etsy - Velocity Europe (London) 2013
 
Improving Website Performance and Scalability with Memcached
Improving Website Performance and Scalability with MemcachedImproving Website Performance and Scalability with Memcached
Improving Website Performance and Scalability with Memcached
 
Varnish http accelerator
Varnish http acceleratorVarnish http accelerator
Varnish http accelerator
 
Build your own CDN with Varnish - Confoo 2022
Build your own CDN with Varnish - Confoo 2022Build your own CDN with Varnish - Confoo 2022
Build your own CDN with Varnish - Confoo 2022
 
Varnish Configuration Step by Step
Varnish Configuration Step by StepVarnish Configuration Step by Step
Varnish Configuration Step by Step
 
Resin Outperforms NginX
Resin Outperforms NginXResin Outperforms NginX
Resin Outperforms NginX
 
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
 

Viewers also liked

Come presentarsi efficacemente a un investitore
Come presentarsi efficacemente a un investitoreCome presentarsi efficacemente a un investitore
Come presentarsi efficacemente a un investitore
Francesco Baruffi
 
Message Queues : A Primer - International PHP Conference Fall 2012
Message Queues : A Primer - International PHP Conference Fall 2012Message Queues : A Primer - International PHP Conference Fall 2012
Message Queues : A Primer - International PHP Conference Fall 2012
Mike Willbanks
 
Web并发模型粗浅探讨
Web并发模型粗浅探讨Web并发模型粗浅探讨
Web并发模型粗浅探讨
Robbin Fan
 
Millennial media smart-august-2010
Millennial media smart-august-2010Millennial media smart-august-2010
Millennial media smart-august-2010François Avril
 
Axiologix Company Presentation Jan 2011
Axiologix Company Presentation Jan 2011Axiologix Company Presentation Jan 2011
Axiologix Company Presentation Jan 2011
InboundMarketingPR.com
 
Estndares
EstndaresEstndares
Estndares
Geovanny Armijos
 
Success Magazine
Success MagazineSuccess Magazine
Success Magazinepayitearly
 
Book V Getting The Internship You Want: How to write APPIC essays that get ...
Book V  Getting The Internship You Want:  How to write APPIC essays that get ...Book V  Getting The Internship You Want:  How to write APPIC essays that get ...
Book V Getting The Internship You Want: How to write APPIC essays that get ...
The Internship Resource Center of The Professional Development Institute
 
Marriott Miami Airport Campus Updated
Marriott Miami Airport Campus UpdatedMarriott Miami Airport Campus Updated
Marriott Miami Airport Campus Updateddlopez9
 
Presentazione del Tecnopolo di Modena presso Unione Terre di Castelli
Presentazione del Tecnopolo di Modena presso Unione Terre di CastelliPresentazione del Tecnopolo di Modena presso Unione Terre di Castelli
Presentazione del Tecnopolo di Modena presso Unione Terre di Castelli
Francesco Baruffi
 
Welcome to msp information night 2013
Welcome to msp information night 2013Welcome to msp information night 2013
Welcome to msp information night 2013Bret Biornstad
 
Jan 4 Sermon
Jan 4 SermonJan 4 Sermon
Jan 4 Sermon
Geo Acts
 
Mortel Scooter Campaign
Mortel Scooter CampaignMortel Scooter Campaign
Mortel Scooter Campaignsdelastic
 
Dec 06, Sermon Am
Dec 06, Sermon AmDec 06, Sermon Am
Dec 06, Sermon AmGeo Acts
 
Book IV Getting The Internship You Want: How to write APPIC essays that get ...
Book IV Getting The Internship You Want:  How to write APPIC essays that get ...Book IV Getting The Internship You Want:  How to write APPIC essays that get ...
Book IV Getting The Internship You Want: How to write APPIC essays that get ...
The Internship Resource Center of The Professional Development Institute
 
Brand Strategy Overview For Nbbn
Brand Strategy Overview For NbbnBrand Strategy Overview For Nbbn
Brand Strategy Overview For Nbbn
Jeffrey Drake
 
How Flipping your Classroom Can Improve Instruction
How Flipping your Classroom Can Improve InstructionHow Flipping your Classroom Can Improve Instruction
How Flipping your Classroom Can Improve Instruction
Elizabeth Nesius
 
Ruby In Enterprise Development
Ruby In Enterprise DevelopmentRuby In Enterprise Development
Ruby In Enterprise Development
Robbin Fan
 

Viewers also liked (20)

Come presentarsi efficacemente a un investitore
Come presentarsi efficacemente a un investitoreCome presentarsi efficacemente a un investitore
Come presentarsi efficacemente a un investitore
 
Message Queues : A Primer - International PHP Conference Fall 2012
Message Queues : A Primer - International PHP Conference Fall 2012Message Queues : A Primer - International PHP Conference Fall 2012
Message Queues : A Primer - International PHP Conference Fall 2012
 
Web并发模型粗浅探讨
Web并发模型粗浅探讨Web并发模型粗浅探讨
Web并发模型粗浅探讨
 
Millennial media smart-august-2010
Millennial media smart-august-2010Millennial media smart-august-2010
Millennial media smart-august-2010
 
Axiologix Company Presentation Jan 2011
Axiologix Company Presentation Jan 2011Axiologix Company Presentation Jan 2011
Axiologix Company Presentation Jan 2011
 
Estndares
EstndaresEstndares
Estndares
 
Success Magazine
Success MagazineSuccess Magazine
Success Magazine
 
Book V Getting The Internship You Want: How to write APPIC essays that get ...
Book V  Getting The Internship You Want:  How to write APPIC essays that get ...Book V  Getting The Internship You Want:  How to write APPIC essays that get ...
Book V Getting The Internship You Want: How to write APPIC essays that get ...
 
Marriott Miami Airport Campus Updated
Marriott Miami Airport Campus UpdatedMarriott Miami Airport Campus Updated
Marriott Miami Airport Campus Updated
 
Presentazione del Tecnopolo di Modena presso Unione Terre di Castelli
Presentazione del Tecnopolo di Modena presso Unione Terre di CastelliPresentazione del Tecnopolo di Modena presso Unione Terre di Castelli
Presentazione del Tecnopolo di Modena presso Unione Terre di Castelli
 
Welcome to msp information night 2013
Welcome to msp information night 2013Welcome to msp information night 2013
Welcome to msp information night 2013
 
Schoolobjects
SchoolobjectsSchoolobjects
Schoolobjects
 
Jan 4 Sermon
Jan 4 SermonJan 4 Sermon
Jan 4 Sermon
 
Mortel Scooter Campaign
Mortel Scooter CampaignMortel Scooter Campaign
Mortel Scooter Campaign
 
Dec 06, Sermon Am
Dec 06, Sermon AmDec 06, Sermon Am
Dec 06, Sermon Am
 
Book IV Getting The Internship You Want: How to write APPIC essays that get ...
Book IV Getting The Internship You Want:  How to write APPIC essays that get ...Book IV Getting The Internship You Want:  How to write APPIC essays that get ...
Book IV Getting The Internship You Want: How to write APPIC essays that get ...
 
Brand Strategy Overview For Nbbn
Brand Strategy Overview For NbbnBrand Strategy Overview For Nbbn
Brand Strategy Overview For Nbbn
 
How Flipping your Classroom Can Improve Instruction
How Flipping your Classroom Can Improve InstructionHow Flipping your Classroom Can Improve Instruction
How Flipping your Classroom Can Improve Instruction
 
Ruby In Enterprise Development
Ruby In Enterprise DevelopmentRuby In Enterprise Development
Ruby In Enterprise Development
 
Temple romà
Temple romàTemple romà
Temple romà
 

Similar to Varnish Cache

Varnish, The Good, The Awesome, and the Downright Crazy
Varnish, The Good, The Awesome, and the Downright CrazyVarnish, The Good, The Awesome, and the Downright Crazy
Varnish, The Good, The Awesome, and the Downright CrazyMike Willbanks
 
Varnish, The Good, The Awesome, and the Downright Crazy.
Varnish, The Good, The Awesome, and the Downright Crazy.Varnish, The Good, The Awesome, and the Downright Crazy.
Varnish, The Good, The Awesome, and the Downright Crazy.Mike Willbanks
 
Varnish Cache - International PHP Conference Fall 2012
Varnish Cache - International PHP Conference Fall 2012Varnish Cache - International PHP Conference Fall 2012
Varnish Cache - International PHP Conference Fall 2012
Mike Willbanks
 
FreeSWITCH as a Microservice
FreeSWITCH as a MicroserviceFreeSWITCH as a Microservice
FreeSWITCH as a Microservice
Evan McGee
 
Usenix lisa 2011
Usenix lisa 2011Usenix lisa 2011
Usenix lisa 2011
Leif Hedstrom
 
Apache con 2011 gd
Apache con 2011 gdApache con 2011 gd
Apache con 2011 gd
Leif Hedstrom
 
Usenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a ProxyUsenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a Proxy
Leif Hedstrom
 
Ruby Conf Preso
Ruby Conf PresoRuby Conf Preso
Ruby Conf Preso
Dan Yoder
 
BDTC2015 hulu-梁宇明-voidbox - docker on yarn
BDTC2015 hulu-梁宇明-voidbox - docker on yarnBDTC2015 hulu-梁宇明-voidbox - docker on yarn
BDTC2015 hulu-梁宇明-voidbox - docker on yarn
Jerry Wen
 
A Tale of 2 Systems
A Tale of 2 SystemsA Tale of 2 Systems
A Tale of 2 Systems
David Newman
 
Server-Side JavaScript Developement - Node.JS Quick Tour
Server-Side JavaScript Developement - Node.JS Quick TourServer-Side JavaScript Developement - Node.JS Quick Tour
Server-Side JavaScript Developement - Node.JS Quick Tour
q3boy
 
Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - Deployment
Fabio Akita
 
Node.js Performance Case Study
Node.js Performance Case StudyNode.js Performance Case Study
Node.js Performance Case Study
Fabian Frank
 
The Good, the Bad and the Ugly of Networking for Microservices by Mathew Lodg...
The Good, the Bad and the Ugly of Networking for Microservices by Mathew Lodg...The Good, the Bad and the Ugly of Networking for Microservices by Mathew Lodg...
The Good, the Bad and the Ugly of Networking for Microservices by Mathew Lodg...
Docker, Inc.
 
Loom promises: be there!
Loom promises: be there!Loom promises: be there!
Loom promises: be there!
Jean-Francois James
 
Meetup open stack_grizzly
Meetup open stack_grizzlyMeetup open stack_grizzly
Meetup open stack_grizzly
eNovance
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
Jeffrey Ellin
 
Lattice yapc-slideshare
Lattice yapc-slideshareLattice yapc-slideshare
Lattice yapc-slideshare
Gwenn Etourneau
 
Docker presentasjon java bin
Docker presentasjon java binDocker presentasjon java bin
Docker presentasjon java bin
Olve Hansen
 

Similar to Varnish Cache (20)

Varnish, The Good, The Awesome, and the Downright Crazy
Varnish, The Good, The Awesome, and the Downright CrazyVarnish, The Good, The Awesome, and the Downright Crazy
Varnish, The Good, The Awesome, and the Downright Crazy
 
Varnish, The Good, The Awesome, and the Downright Crazy.
Varnish, The Good, The Awesome, and the Downright Crazy.Varnish, The Good, The Awesome, and the Downright Crazy.
Varnish, The Good, The Awesome, and the Downright Crazy.
 
Varnish Cache - International PHP Conference Fall 2012
Varnish Cache - International PHP Conference Fall 2012Varnish Cache - International PHP Conference Fall 2012
Varnish Cache - International PHP Conference Fall 2012
 
FreeSWITCH as a Microservice
FreeSWITCH as a MicroserviceFreeSWITCH as a Microservice
FreeSWITCH as a Microservice
 
Usenix lisa 2011
Usenix lisa 2011Usenix lisa 2011
Usenix lisa 2011
 
Apache con 2011 gd
Apache con 2011 gdApache con 2011 gd
Apache con 2011 gd
 
Usenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a ProxyUsenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a Proxy
 
Ruby Conf Preso
Ruby Conf PresoRuby Conf Preso
Ruby Conf Preso
 
BDTC2015 hulu-梁宇明-voidbox - docker on yarn
BDTC2015 hulu-梁宇明-voidbox - docker on yarnBDTC2015 hulu-梁宇明-voidbox - docker on yarn
BDTC2015 hulu-梁宇明-voidbox - docker on yarn
 
A Tale of 2 Systems
A Tale of 2 SystemsA Tale of 2 Systems
A Tale of 2 Systems
 
Server-Side JavaScript Developement - Node.JS Quick Tour
Server-Side JavaScript Developement - Node.JS Quick TourServer-Side JavaScript Developement - Node.JS Quick Tour
Server-Side JavaScript Developement - Node.JS Quick Tour
 
Deployment de Rails
Deployment de RailsDeployment de Rails
Deployment de Rails
 
Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - Deployment
 
Node.js Performance Case Study
Node.js Performance Case StudyNode.js Performance Case Study
Node.js Performance Case Study
 
The Good, the Bad and the Ugly of Networking for Microservices by Mathew Lodg...
The Good, the Bad and the Ugly of Networking for Microservices by Mathew Lodg...The Good, the Bad and the Ugly of Networking for Microservices by Mathew Lodg...
The Good, the Bad and the Ugly of Networking for Microservices by Mathew Lodg...
 
Loom promises: be there!
Loom promises: be there!Loom promises: be there!
Loom promises: be there!
 
Meetup open stack_grizzly
Meetup open stack_grizzlyMeetup open stack_grizzly
Meetup open stack_grizzly
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Lattice yapc-slideshare
Lattice yapc-slideshareLattice yapc-slideshare
Lattice yapc-slideshare
 
Docker presentasjon java bin
Docker presentasjon java binDocker presentasjon java bin
Docker presentasjon java bin
 

More from Mike Willbanks

2015 ZendCon - Do you queue
2015 ZendCon - Do you queue2015 ZendCon - Do you queue
2015 ZendCon - Do you queue
Mike Willbanks
 
ZF2: Writing Service Components
ZF2: Writing Service ComponentsZF2: Writing Service Components
ZF2: Writing Service Components
Mike Willbanks
 
Writing Services with ZF2
Writing Services with ZF2Writing Services with ZF2
Writing Services with ZF2
Mike Willbanks
 
Push to Me: Mobile Push Notifications (Zend Framework)
Push to Me: Mobile Push Notifications (Zend Framework)Push to Me: Mobile Push Notifications (Zend Framework)
Push to Me: Mobile Push Notifications (Zend Framework)
Mike Willbanks
 
Gearman - Northeast PHP 2012
Gearman - Northeast PHP 2012Gearman - Northeast PHP 2012
Gearman - Northeast PHP 2012Mike Willbanks
 
Leveraging Zend Framework for Sending Push Notifications
Leveraging Zend Framework for Sending Push NotificationsLeveraging Zend Framework for Sending Push Notifications
Leveraging Zend Framework for Sending Push NotificationsMike Willbanks
 
Gearman: A Job Server made for Scale
Gearman: A Job Server made for ScaleGearman: A Job Server made for Scale
Gearman: A Job Server made for ScaleMike Willbanks
 
Zend Framework Push Notifications
Zend Framework Push NotificationsZend Framework Push Notifications
Zend Framework Push Notifications
Mike Willbanks
 
Mobile Push Notifications
Mobile Push NotificationsMobile Push Notifications
Mobile Push Notifications
Mike Willbanks
 
SOA with Zend Framework
SOA with Zend FrameworkSOA with Zend Framework
SOA with Zend Framework
Mike Willbanks
 
MNPHP Scalable Architecture 101 - Feb 3 2011
MNPHP Scalable Architecture 101 - Feb 3 2011MNPHP Scalable Architecture 101 - Feb 3 2011
MNPHP Scalable Architecture 101 - Feb 3 2011
Mike Willbanks
 
The Art of Message Queues - TEKX
The Art of Message Queues - TEKXThe Art of Message Queues - TEKX
The Art of Message Queues - TEKXMike Willbanks
 
Scalable Architecture 101
Scalable Architecture 101Scalable Architecture 101
Scalable Architecture 101Mike Willbanks
 
The Art of Message Queues
The Art of Message QueuesThe Art of Message Queues
The Art of Message Queues
Mike Willbanks
 
Handling Database Deployments
Handling Database DeploymentsHandling Database Deployments
Handling Database Deployments
Mike Willbanks
 
LiquiBase
LiquiBaseLiquiBase
LiquiBase
Mike Willbanks
 

More from Mike Willbanks (17)

2015 ZendCon - Do you queue
2015 ZendCon - Do you queue2015 ZendCon - Do you queue
2015 ZendCon - Do you queue
 
ZF2: Writing Service Components
ZF2: Writing Service ComponentsZF2: Writing Service Components
ZF2: Writing Service Components
 
Writing Services with ZF2
Writing Services with ZF2Writing Services with ZF2
Writing Services with ZF2
 
Push to Me: Mobile Push Notifications (Zend Framework)
Push to Me: Mobile Push Notifications (Zend Framework)Push to Me: Mobile Push Notifications (Zend Framework)
Push to Me: Mobile Push Notifications (Zend Framework)
 
Gearman - Northeast PHP 2012
Gearman - Northeast PHP 2012Gearman - Northeast PHP 2012
Gearman - Northeast PHP 2012
 
Leveraging Zend Framework for Sending Push Notifications
Leveraging Zend Framework for Sending Push NotificationsLeveraging Zend Framework for Sending Push Notifications
Leveraging Zend Framework for Sending Push Notifications
 
Gearman: A Job Server made for Scale
Gearman: A Job Server made for ScaleGearman: A Job Server made for Scale
Gearman: A Job Server made for Scale
 
Zend Framework Push Notifications
Zend Framework Push NotificationsZend Framework Push Notifications
Zend Framework Push Notifications
 
Mobile Push Notifications
Mobile Push NotificationsMobile Push Notifications
Mobile Push Notifications
 
SOA with Zend Framework
SOA with Zend FrameworkSOA with Zend Framework
SOA with Zend Framework
 
MNPHP Scalable Architecture 101 - Feb 3 2011
MNPHP Scalable Architecture 101 - Feb 3 2011MNPHP Scalable Architecture 101 - Feb 3 2011
MNPHP Scalable Architecture 101 - Feb 3 2011
 
The Art of Message Queues - TEKX
The Art of Message Queues - TEKXThe Art of Message Queues - TEKX
The Art of Message Queues - TEKX
 
Art Of Message Queues
Art Of Message QueuesArt Of Message Queues
Art Of Message Queues
 
Scalable Architecture 101
Scalable Architecture 101Scalable Architecture 101
Scalable Architecture 101
 
The Art of Message Queues
The Art of Message QueuesThe Art of Message Queues
The Art of Message Queues
 
Handling Database Deployments
Handling Database DeploymentsHandling Database Deployments
Handling Database Deployments
 
LiquiBase
LiquiBaseLiquiBase
LiquiBase
 

Recently uploaded

The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
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
 
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
 
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
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
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
 
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
 
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
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
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
 
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
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
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
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 

Recently uploaded (20)

The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
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...
 
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 !
 
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
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
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...
 
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
 
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...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
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
 
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
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
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...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 

Varnish Cache

  • 1. Northeast PHP August 12, 2012 Varnish, The Good, The Awesome, and the Downright Crazy By Mike Willbanks Sr. Web Architect Manager NOOK Developer
  • 2. Housekeeping… • Talk   Slides will be online later! • Me   Sr. Web Architect Manager at NOOK Developer   Prior MNPHP Organizer   Open Source Contributor (Zend Framework and various others)   Where you can find me: • Twitter: mwillbanks G+: Mike Willbanks • IRC (freenode): mwillbanks Blog: http://blog.digitalstruct.com • GitHub: https://github.com/mwillbanks 2
  • 3. Agenda • What is Varnish • The Good : Why…   The quick, easy and hardly informed way… • The Awesome : How…   VCL’s, Directors and more… • The Crazy : Go…   ESI, Purging, VCL C, and VMOD… • Varnish Command Line Apps   varnishtop, varnishstat, etc. 3
  • 4. What is Varnish? Official Statement What the hell it means Graphs, oh my!
  • 5. Official Statement “Varnish is a web application accelerator. You install it in front of your web application and it will speed it up significantly.” 5
  • 6. What The Hell? Tell me! • Varnish allow you to accelerate your website   By using memory and keeping in mind cookies, request headers and more… • It caches pages so that your web server can RELAX!   What about my apache, tomcat, nginx and (mongrel|thin| goliath….)   Generally caching by TTL + HTTP Headers (cookies too!) • A load banancer, proxy and more…   What? …. Yes, it can do that! 6
  • 7. A General Use Case • CaringBridge Status Server   Getting a message to mobile users.   The system is down, or we want to be able to communicate a message to them about some subject… maybe a campaign.   The apps and mobile site rely on an API • Trouble in paradise? Few and far in between.   Let an API talk to a server…   A story on crashing and burning before varnish. 7
  • 8. The Graph - AWS Req/s Peak Load 700 14 600 12 500 10 400 8 300 Req/s Peak Load 6 200 4 100 2 0 0 Small X-Large Small Varnish Small X-Large Small Varnish Time Requests 500 80000 450 70000 400 60000 350 300 50000 250 40000 Time Requests 200 30000 150 20000 100 50 10000 0 0 8 Small X-Large Small Varnish Small X-Large Small Varnish
  • 9. The Raw Data Small   X-­‐Large   Small  Varnish   Concurrency   10   150   150   Requests   5000   55558   75000   Time   438   347   36   Req/s   11.42   58   585   Peak  Load   11.91   8.44   0.35   19,442   Comments   failed  reqs   9
  • 10. The Good – Listen Up! Installment Documentation Finding Existing VCL’s
  • 11. Installment • RTM : http://goo.gl/hl4Tt   Debian: sudo apt-get install varnish   EPEL: yum install varnish • only 6.x otherwise you’ll be out of date!   WOOT Compiling #git • git clone git://git.varnish-cache.org/varnish-cache • cd varnish-cache • sh autogen.sh • ./configure • make && make install 11
  • 12. Varnish Daemon • varnishd   -a address[:port] listen for client   -b address[:port] backend requests   -T address[:port] administration http   -s type[,options] storage type (malloc, file, persistence)   -P /path/to/file PID file   Many others; these are generally the most important. Generally the defaults will do with just modification of the default VCL (more on it later). 12
  • 13. Documentation • Reference Manual   https://www.varnish-cache.org/docs/3.0/reference/index.html • Tutorial – more like a book version of the reference manual   https://www.varnish-cache.org/docs/3.0/tutorial/index.html • Knock yourselves out! There is a ton of documentation • Yes, this makes happy developers.   Documentation is very accurate, read carefully.   Focus heavily on VCL’s, that is generally what you need.   I’m attempting to show you some of how this works but you will require the documentation to assist you. 13
  • 14. Existing VCL’s – The truly lazy… • VCL’s are available for common open source projects   Hi wordpress and drupal! • https://www.varnish-cache.org/trac/wiki/VarnishAndWordpress • https://www.varnish-cache.org/trac/wiki/VarnishAndDrupal   Examples of all sorts of crazy • https://www.varnish-cache.org/trac/wiki/VCLExamples 14
  • 15. Wordpress = Bad Slashdot Bad!!! backend default { .host = "127.0.0.1“; .port = "8080"; } sub vcl_recv { if (!(req.url ~ "wp-(login|admin)")) { unset req.http.cookie; } } sub vcl_fetch { if (!(req.url ~ "wp-(login|admin)")) { unset beresp.http.set-cookie; } } 15
  • 16. The Awesome – Going Places VCL Directors A Few Examples
  • 18. VCL – Varnish Configuration Language • VCL State Engine   Each Request is Processed Separately & Independently   States are Isolated but are Related   Return statements exit one state and start another   VCL defaults are ALWAYS appended below your own VCL • VCL can be complex, but…   Two main subroutines; vcl_recv and vcl_fetch   Common actions: pass, hit_for_pass, lookup, pipe, deliver   Common variables: req, beresp and obj   More subroutines, functions and complexity can arise dependent on condition. 18
  • 19. VCL – Subroutines – breaking it down. • vcl_init – VCL is loaded, no request yet; VMOD initialization • vcl_recv – Beginning of request, req is in scope • vcl_pipe – Client & backend data passed unaltered • vcl_pass – Request goes to backend and not cached • vcl_hash – call hash_data to add to the hash • vcl_hit – called on request found in the cache • vcl_miss – called on request not found in the cache • vcl_fetch – called on document retrieved from backend • vcl_deliver – called prior to delivery of cached object • vcl_error – called on errors 19 • vcl_fini – all requests have exited VCL, cleanup of VMOD’s
  • 20. VCL - Variables • Always Available • Backend Req Prepartion   now – epoch time   bereq – backend request • Backend Declarations • Retrieved Backend Request   .host – hostname / IP   beresp – backend response   .port – port number • Cached Object • Request Processing   obj – Cached object, can only   client – ip & identity change .ttl   server – ip & port • Response Preparation   req – request information   resp – http stuff 20
  • 21. VCL - Functions • hash_data(string) – adds a string to the hash input.   Request host and URL is default from the default vcl. • regsub(string, regex, sub) – substitution on first occurance   sub can contain numbers 0-n to inject matches from the regex. • regsuball(string, regex, sub) – substitution on all occurances • ban(expression) – Ban all objects in cache that match • ban(regex) – Ban all objects in cache that have a URL match 21
  • 22. Directors • Directors allow you to talk to the backend servers • Directors are a glorified reverse proxy   Allows for certain types of load balancing   Allows for talking to a cluster “A director is a logical group of backend servers clustered together for redundancy. The basic role of the director is to let Varnish choose a backend server amongst several so if one is down another can be used.” 22
  • 23. Directors – The Types • Random Director – picks a backend by random number • Client Director – picks a backend by client identity • Hash Director – picks a backend by URL hash value • Round-Robin Director – picks a backend in order • DNS Director – picks a backend by means of DNS   Random OR Round-Robin • Fallback – picks the first “healthy” backend 23
  • 24. Director - Probing • To ensure healthy backends, you need to use probing.   It really sounds like a colonoscopy for servers; which it is. • Variables   .url   .request   .window   .threshold   .intial   .expected_response   .interval   .timeout 24
  • 26. The Crazy ESI – Edge-Side Includes Purging VMOD
  • 27. ESI – Edge Side Includes • ESI is a small markup language much like SSI (server side includes) to include fragments (or dynamic content for that matter). • Think of it as replacing regions inside of a page as if you were using XHR (AJAX) but single threaded. • Three Statements can be utilized.   esi:include – Include a page   esi:remove – Remove content   <!-- esi --> - ESI disabled, execute normally 27
  • 28. ESI – By Diagram 28
  • 29. Using ESI • In vcl_fetch, you must set ESI to be on   set beresp.do_esi = true;   By default, ESI will still cache, so add an exclusion if you need it • if (req.url == “/show_username.php”) { return (pass); } • This is a good thing, you may want to cache user information to the right people (aka by cookie value) so that you don’t reload it on every request.   Varnish refuses to parse content for ESI if it does not look like XML • This is by default; so check varnishstat and varnishlog to ensure that it is functioning like normal. 29
  • 30. ESI – By Example <html> <head><title>Rock it with ESI</title></head> <body> <header> <esi:include src="/user_header.php" /> <!-- Don't do this as you'd lose the advantage of varnish --> <!--esi <?php include 'user_header.php'; ?> --> </header> <section id="main"></section <footer></footer> </body> </html> 30
  • 31. Purging • The various ways of purging   varnishadm – command line utility • It’s the ole finger in the back of the throat   Sockets (port 6082) – everyone likes a good socket wrench • Sure, Ipecac is likely overkill.   HTTP – now that is the sexiness • A few headers, nothing forced. 31
  • 32. Purging Examples varnishadm -T 127.0.0.1:6082 purge req.url == "/foo/bar“ telnet localhost 6082 purge req.url == "/foo/bar telnet localhost 80 Response: Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. PURGE /foo/bar HTTP/1.0 Host: bacon.org 32
  • 33. Distributed Purging • Distributed Purging… like a sorority party.   Use a message queue (or gearman job server)   Have a worker that knows about the varnish servers   Submit the request to clear the cache in the asynchronously or synchronously depending on your use case. • Have enough workers to make this effective at purging the cache quickly.   This will make it far easier to scale; you can either store the servers in a config file, database or anything else you think is relevant. 33
  • 34. Embedding C in VCL – you must be crazy • Before getting into VMOD; did you know you can embed C into the VCL for varnish? • Want to do something crazy fast or leverage a C library for pre or post processing? • I know… you’re thinking that’s useless..   On to the example; and a good one from the Varnish WIKI! 34
  • 35. VCL - Embedded C for syslog – uber sexy C{ #include <syslog.h> }C sub vcl_something { C{ syslog(LOG_INFO, "Something happened at VCL line XX."); }C } # Example with using varnish variables C{ syslog(LOG_ERR, "Spurious response from backend: xid %s request %s %s "%s" %d "%s" "%s"", VRT_r_req_xid(sp), VRT_r_req_request(sp), VRT_GetHdr(sp, HDR_REQ, "005host:"), VRT_r_req_url(sp), VRT_r_obj_status(sp), VRT_r_obj_response(sp), VRT_GetHdr(sp, HDR_OBJ, "011Location:")); }C 35
  • 36. VMOD – Varnish Modules / Extensions • Taking VCL embedded C to the next level • Allows you to extend varnish and create new functions • Now, if you are writing modules for varnish you have a specialty use case!   Go read up on it!   https://www.varnish-cache.org/docs/trunk/reference/vmod.html 36
  • 37. VMOD - std • The VMOD std is shipped with varnish; it provides some useful commands   toupper   syslog   tolower   fileread   set_up_tos   duration   random   integer   log   collect 37
  • 38. Varnish Command Line Apps varnish varnishadm varnishhist varnishlog varnishncsa varnishreplay varnishsizes varnishstat varnishtest varnishtop
  • 39. What is Varnish doing… • What is varnish doing right now? • How do I debug what is happening?   varnishtop 39
  • 40. What is Varnish doing… 40
  • 41. Logging • Many times people want to log the requests to a file   By default Varnish only stores these in shared memory.   Apache Style Logs • varnishncsa –D –a –w log.txt   This will run as a daemon to log all of your requests on a separate thread. 41
  • 43. Cache Warmup • Need to warm up your cache before putting a sever in the queue or load test an environment?   varnishreplay –r log.txt • Replaying logs can allow you to do this. This is great for when you are going to be deploying code to check for performance issues.   Although… be careful so that you don’t POST data or create data on peoples accounts. Maybe cat the file and remove anything that executes on data. 43
  • 44. Cache Hit Ratios? No Problem • How to see your cache hit ratios…   varnishstat • Want to parse them from XML so you can create a sexy administration panel?   varnishstat –x 44
  • 45. Cache Hit Ratios? No Problem 45
  • 46. Questions? These slides will be posted to SlideShare & SpeakerDeck.  SpeakerDeck: http://speakerdeck.com/u/mwillbanks  Slideshare: http://www.slideshare.net/mwillbanks  Twitter: mwillbanks  G+: Mike Willbanks  IRC (freenode): mwillbanks  Blog: http://blog.digitalstruct.com  GitHub: https://github.com/mwillbanks