SlideShare uma empresa Scribd logo
1 de 21
Baixar para ler offline
Varnish Cache
Clever Software for Making HTTP Applications Faster

Refresh Cambridge 6th July 2011


gareth rushgrove | morethanseven.net   http://www.flickr.com/photos/jkannenberg/541059011
Gareth Rushgrove


gareth rushgrove | morethanseven.net
Work at freeagentcentral.com


gareth rushgrove | morethanseven.net
Blog at morethanseven.net


gareth rushgrove | morethanseven.net
Currate devopsweekly.com


gareth rushgrove | morethanseven.net
www.varnish-cache.org


gareth rushgrove | morethanseven.net
“Varnish Cache is an open source, state of
         the art web application accelerator. You
         install it on your web server and it makes
         your website fly.
         Official blurb



What is Varnish?


gareth rushgrove | morethanseven.net   http://www.flickr.com/photos/exalthim/3597210568
- Cache
- Reverse Proxy
- HTTP Accelerator




Seriously, what is Varnish?


gareth rushgrove | morethanseven.net
A Story of HTTP Caching


gareth rushgrove | morethanseven.net   http://www.flickr.com/photos/solsken/62924477
Database                     Web Server   Web Traffic




A Typical App


gareth rushgrove | morethanseven.net
Database                    Web Server




More Traffic == Slower responses


gareth rushgrove | morethanseven.net
Database                   Web Server




Eventually...


gareth rushgrove | morethanseven.net
Database                     Web Server   Varnish




Add Varnish


gareth rushgrove | morethanseven.net
Database        Web Server   Varnish




Deal with more traffic


gareth rushgrove | morethanseven.net
An Example


gareth rushgrove | morethanseven.net   http://www.flickr.com/photos/jonrb/3735816042
www.vagrantbox.es


gareth rushgrove | morethanseven.net
memcached   Gunicorn   Varnish   Nginx


 Database


            memcached   Gunicorn   Varnish   Nginx




Overengineering for Fun
backend default {
              .host = "127.0.0.1";
              .port = "8000";
            }
            sub vcl_recv {
              if (req.request == "GET" && req.http.cookie) {
                return(lookup);
              }
            }
            sub vcl_fetch {
              if (beresp.ttl < 180s) {
                set beresp.ttl = 180s;
              }
              esi;
              if (beresp.http.Set-Cookie) {
                return(deliver);
              }
            }




Varnish Configuration


gareth rushgrove | morethanseven.net
⚡ ab -c 10 -n 400 http://www.vagrantbox.es/

          Requests per second: 59.63 [#/sec] (mean)

          Percentage of the requests served within a certain time (ms)
            50%    164
            66%    174
            75%    183
            80%    188
            90%    207
            95%    231
            98%    246
            99%    279
           100%    408 (longest request)



Without Varnish


gareth rushgrove | morethanseven.net
⚡ ab -c 10 -n 400 http://www.vagrantbox.es/

          Requests per second: 103.61 [#/sec] (mean)

          Percentage of the requests served within a certain time (ms)
            50%     92
            66%    101
            75%    107
            80%    111
            90%    120
            95%    129
            98%    141
            99%    149
           100%    157 (longest request)



With Varnish


gareth rushgrove | morethanseven.net
Questions?


gareth rushgrove | morethanseven.net   http://flickr.com/photos/psd/102332391/

Mais conteúdo relacionado

Mais procurados

Mage Titans USA 2016 - Miguel Balparda - Magento 2: Premium Performance with ...
Mage Titans USA 2016 - Miguel Balparda - Magento 2: Premium Performance with ...Mage Titans USA 2016 - Miguel Balparda - Magento 2: Premium Performance with ...
Mage Titans USA 2016 - Miguel Balparda - Magento 2: Premium Performance with ...Stacey Whitney
 
Vagrant. Halturin Artem
Vagrant. Halturin ArtemVagrant. Halturin Artem
Vagrant. Halturin ArtemADCI Solutions
 
NLIT 2011: Chef & Capistrano
NLIT 2011: Chef & CapistranoNLIT 2011: Chef & Capistrano
NLIT 2011: Chef & Capistranonickblah
 
Deploying Drupal using Capistrano
Deploying Drupal using CapistranoDeploying Drupal using Capistrano
Deploying Drupal using CapistranoJochen Verdeyen
 
Automate All the Things with Grunt
Automate All the Things with GruntAutomate All the Things with Grunt
Automate All the Things with GruntSheelah Brennan
 
Virtual Infrastructure
Virtual InfrastructureVirtual Infrastructure
Virtual InfrastructureBryan McLellan
 
Rails Plugins 2 Hoe
Rails Plugins 2 HoeRails Plugins 2 Hoe
Rails Plugins 2 Hoeoscon2007
 
Helpful pre commit hooks for Python and Django
Helpful pre commit hooks for Python and DjangoHelpful pre commit hooks for Python and Django
Helpful pre commit hooks for Python and Djangoroskakori
 
DevOps tools for everyone - Vagrant, Puppet and Webmin
DevOps tools for everyone - Vagrant, Puppet and WebminDevOps tools for everyone - Vagrant, Puppet and Webmin
DevOps tools for everyone - Vagrant, Puppet and Webminpostrational
 
#vBrownBag OpenStack - Review & Kickoff for Phase 2
#vBrownBag OpenStack - Review & Kickoff for Phase 2#vBrownBag OpenStack - Review & Kickoff for Phase 2
#vBrownBag OpenStack - Review & Kickoff for Phase 2ProfessionalVMware
 
Intelligent infrastructure with SaltStack
Intelligent infrastructure with SaltStackIntelligent infrastructure with SaltStack
Intelligent infrastructure with SaltStackLove Nyberg
 
Puppet Camp London Fall 2015 - Service Discovery and Puppet
Puppet Camp London Fall 2015 - Service Discovery and PuppetPuppet Camp London Fall 2015 - Service Discovery and Puppet
Puppet Camp London Fall 2015 - Service Discovery and PuppetMarc Cluet
 
Multiple django applications on a single server with nginx
Multiple django applications on a single server with nginxMultiple django applications on a single server with nginx
Multiple django applications on a single server with nginxroskakori
 
Puppet camp Portland 2015: -windows (1)
Puppet camp Portland 2015: -windows (1)Puppet camp Portland 2015: -windows (1)
Puppet camp Portland 2015: -windows (1)Puppet
 
Nginx维护手册
Nginx维护手册Nginx维护手册
Nginx维护手册Lei Yang
 
Deployment with capistrano
Deployment with capistranoDeployment with capistrano
Deployment with capistranosagar junnarkar
 

Mais procurados (20)

Puppet and Openshift
Puppet and OpenshiftPuppet and Openshift
Puppet and Openshift
 
Mage Titans USA 2016 - Miguel Balparda - Magento 2: Premium Performance with ...
Mage Titans USA 2016 - Miguel Balparda - Magento 2: Premium Performance with ...Mage Titans USA 2016 - Miguel Balparda - Magento 2: Premium Performance with ...
Mage Titans USA 2016 - Miguel Balparda - Magento 2: Premium Performance with ...
 
Vagrant. Halturin Artem
Vagrant. Halturin ArtemVagrant. Halturin Artem
Vagrant. Halturin Artem
 
NLIT 2011: Chef & Capistrano
NLIT 2011: Chef & CapistranoNLIT 2011: Chef & Capistrano
NLIT 2011: Chef & Capistrano
 
Deploying Drupal using Capistrano
Deploying Drupal using CapistranoDeploying Drupal using Capistrano
Deploying Drupal using Capistrano
 
Automate All the Things with Grunt
Automate All the Things with GruntAutomate All the Things with Grunt
Automate All the Things with Grunt
 
Vagrant
VagrantVagrant
Vagrant
 
Virtual Infrastructure
Virtual InfrastructureVirtual Infrastructure
Virtual Infrastructure
 
Rails Plugins 2 Hoe
Rails Plugins 2 HoeRails Plugins 2 Hoe
Rails Plugins 2 Hoe
 
vBACD - Introduction to Opscode Chef - 2/29
vBACD - Introduction to Opscode Chef - 2/29vBACD - Introduction to Opscode Chef - 2/29
vBACD - Introduction to Opscode Chef - 2/29
 
Helpful pre commit hooks for Python and Django
Helpful pre commit hooks for Python and DjangoHelpful pre commit hooks for Python and Django
Helpful pre commit hooks for Python and Django
 
DevOps tools for everyone - Vagrant, Puppet and Webmin
DevOps tools for everyone - Vagrant, Puppet and WebminDevOps tools for everyone - Vagrant, Puppet and Webmin
DevOps tools for everyone - Vagrant, Puppet and Webmin
 
#vBrownBag OpenStack - Review & Kickoff for Phase 2
#vBrownBag OpenStack - Review & Kickoff for Phase 2#vBrownBag OpenStack - Review & Kickoff for Phase 2
#vBrownBag OpenStack - Review & Kickoff for Phase 2
 
Front-end tools
Front-end toolsFront-end tools
Front-end tools
 
Intelligent infrastructure with SaltStack
Intelligent infrastructure with SaltStackIntelligent infrastructure with SaltStack
Intelligent infrastructure with SaltStack
 
Puppet Camp London Fall 2015 - Service Discovery and Puppet
Puppet Camp London Fall 2015 - Service Discovery and PuppetPuppet Camp London Fall 2015 - Service Discovery and Puppet
Puppet Camp London Fall 2015 - Service Discovery and Puppet
 
Multiple django applications on a single server with nginx
Multiple django applications on a single server with nginxMultiple django applications on a single server with nginx
Multiple django applications on a single server with nginx
 
Puppet camp Portland 2015: -windows (1)
Puppet camp Portland 2015: -windows (1)Puppet camp Portland 2015: -windows (1)
Puppet camp Portland 2015: -windows (1)
 
Nginx维护手册
Nginx维护手册Nginx维护手册
Nginx维护手册
 
Deployment with capistrano
Deployment with capistranoDeployment with capistrano
Deployment with capistrano
 

Semelhante a Varnish Caching

Varnish: Making eZ Publish sites fly
Varnish: Making eZ Publish sites flyVarnish: Making eZ Publish sites fly
Varnish: Making eZ Publish sites flyPeter Keung
 
Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - DeploymentFabio Akita
 
Non-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.jsNon-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.jsMarcus Frödin
 
You're Going To Need A Bigger Toolbox
You're Going To Need A Bigger ToolboxYou're Going To Need A Bigger Toolbox
You're Going To Need A Bigger ToolboxGareth Rushgrove
 
Varnish
VarnishVarnish
VarnishAdyax
 
VUG5: Varnish at Opera Software
VUG5: Varnish at Opera SoftwareVUG5: Varnish at Opera Software
VUG5: Varnish at Opera SoftwareCosimo Streppone
 
Message Queues for Web Applications
Message Queues for Web ApplicationsMessage Queues for Web Applications
Message Queues for Web ApplicationsGareth Rushgrove
 
Resin Outperforms NginX
Resin Outperforms NginXResin Outperforms NginX
Resin Outperforms NginXbilldigman
 
Building WebSocket and Server Side Events Applications using Atmosphere
Building WebSocket and Server Side Events Applications using AtmosphereBuilding WebSocket and Server Side Events Applications using Atmosphere
Building WebSocket and Server Side Events Applications using Atmospherejfarcand
 
Usenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a ProxyUsenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a ProxyLeif Hedstrom
 
Load Balancing and Scaling with NGINX
Load Balancing and Scaling with NGINXLoad Balancing and Scaling with NGINX
Load Balancing and Scaling with NGINXNGINX, Inc.
 
June8 presentation
June8 presentationJune8 presentation
June8 presentationnicobn
 
DVWA BruCON Workshop
DVWA BruCON WorkshopDVWA BruCON Workshop
DVWA BruCON Workshoptestuser1223
 

Semelhante a Varnish Caching (20)

Varnish: Making eZ Publish sites fly
Varnish: Making eZ Publish sites flyVarnish: Making eZ Publish sites fly
Varnish: Making eZ Publish sites fly
 
Scaling WordPress
Scaling WordPressScaling WordPress
Scaling WordPress
 
Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - Deployment
 
Non-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.jsNon-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.js
 
You're Going To Need A Bigger Toolbox
You're Going To Need A Bigger ToolboxYou're Going To Need A Bigger Toolbox
You're Going To Need A Bigger Toolbox
 
Varnish
VarnishVarnish
Varnish
 
VUG5: Varnish at Opera Software
VUG5: Varnish at Opera SoftwareVUG5: Varnish at Opera Software
VUG5: Varnish at Opera Software
 
Message Queues for Web Applications
Message Queues for Web ApplicationsMessage Queues for Web Applications
Message Queues for Web Applications
 
Resin Outperforms NginX
Resin Outperforms NginXResin Outperforms NginX
Resin Outperforms NginX
 
Building WebSocket and Server Side Events Applications using Atmosphere
Building WebSocket and Server Side Events Applications using AtmosphereBuilding WebSocket and Server Side Events Applications using Atmosphere
Building WebSocket and Server Side Events Applications using Atmosphere
 
Usenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a ProxyUsenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a Proxy
 
Deployment de Rails
Deployment de RailsDeployment de Rails
Deployment de Rails
 
Load Balancing and Scaling with NGINX
Load Balancing and Scaling with NGINXLoad Balancing and Scaling with NGINX
Load Balancing and Scaling with NGINX
 
The HTML5 WebSocket API
The HTML5 WebSocket APIThe HTML5 WebSocket API
The HTML5 WebSocket API
 
Varnish qconsp 2011
Varnish qconsp 2011Varnish qconsp 2011
Varnish qconsp 2011
 
Nginx + PHP
Nginx + PHPNginx + PHP
Nginx + PHP
 
June8 presentation
June8 presentationJune8 presentation
June8 presentation
 
Otimizando seu projeto Rails
Otimizando seu projeto RailsOtimizando seu projeto Rails
Otimizando seu projeto Rails
 
DVWA BruCON Workshop
DVWA BruCON WorkshopDVWA BruCON Workshop
DVWA BruCON Workshop
 
Load testing with Blitz
Load testing with BlitzLoad testing with Blitz
Load testing with Blitz
 

Mais de Gareth Rushgrove

Communications Between Tribes
Communications Between TribesCommunications Between Tribes
Communications Between TribesGareth Rushgrove
 
The Challenges of Container Configuration
The Challenges of Container ConfigurationThe Challenges of Container Configuration
The Challenges of Container ConfigurationGareth Rushgrove
 
Two Sides of Google Infrastructure for Everyone Else
Two Sides of Google Infrastructure for Everyone ElseTwo Sides of Google Infrastructure for Everyone Else
Two Sides of Google Infrastructure for Everyone ElseGareth Rushgrove
 
Beyond basic web development
Beyond basic web developmentBeyond basic web development
Beyond basic web developmentGareth Rushgrove
 
Self Education for Web Professionals
Self Education for Web ProfessionalsSelf Education for Web Professionals
Self Education for Web ProfessionalsGareth Rushgrove
 
What to Build with Google App Engine
What to Build with Google App EngineWhat to Build with Google App Engine
What to Build with Google App EngineGareth Rushgrove
 
App Engine for Python Developers
App Engine for Python DevelopersApp Engine for Python Developers
App Engine for Python DevelopersGareth Rushgrove
 
Testing Django Applications
Testing Django ApplicationsTesting Django Applications
Testing Django ApplicationsGareth Rushgrove
 
Design Strategies for a Distributed Web
Design Strategies for a Distributed WebDesign Strategies for a Distributed Web
Design Strategies for a Distributed WebGareth Rushgrove
 
Things you probably don't do (or tying to make project automation sexy)
Things you probably don't do (or tying to make project automation sexy)Things you probably don't do (or tying to make project automation sexy)
Things you probably don't do (or tying to make project automation sexy)Gareth Rushgrove
 
Notes from (Web 2.0) Revolution
Notes from (Web 2.0) RevolutionNotes from (Web 2.0) Revolution
Notes from (Web 2.0) RevolutionGareth Rushgrove
 
Shiny Content Management with Radiant
Shiny Content Management with RadiantShiny Content Management with Radiant
Shiny Content Management with RadiantGareth Rushgrove
 

Mais de Gareth Rushgrove (20)

Communications Between Tribes
Communications Between TribesCommunications Between Tribes
Communications Between Tribes
 
The Challenges of Container Configuration
The Challenges of Container ConfigurationThe Challenges of Container Configuration
The Challenges of Container Configuration
 
Two Sides of Google Infrastructure for Everyone Else
Two Sides of Google Infrastructure for Everyone ElseTwo Sides of Google Infrastructure for Everyone Else
Two Sides of Google Infrastructure for Everyone Else
 
Thinking Evil Thoughts
Thinking Evil ThoughtsThinking Evil Thoughts
Thinking Evil Thoughts
 
Web operations
Web operationsWeb operations
Web operations
 
Metrics with Ganglia
Metrics with GangliaMetrics with Ganglia
Metrics with Ganglia
 
Devops
DevopsDevops
Devops
 
Beyond basic web development
Beyond basic web developmentBeyond basic web development
Beyond basic web development
 
Self Education for Web Professionals
Self Education for Web ProfessionalsSelf Education for Web Professionals
Self Education for Web Professionals
 
What to Build with Google App Engine
What to Build with Google App EngineWhat to Build with Google App Engine
What to Build with Google App Engine
 
App Engine for Python Developers
App Engine for Python DevelopersApp Engine for Python Developers
App Engine for Python Developers
 
Testing Django Applications
Testing Django ApplicationsTesting Django Applications
Testing Django Applications
 
Design Strategies for a Distributed Web
Design Strategies for a Distributed WebDesign Strategies for a Distributed Web
Design Strategies for a Distributed Web
 
A First Class Web Citizen
A First Class Web CitizenA First Class Web Citizen
A First Class Web Citizen
 
Parsing Microformats
Parsing MicroformatsParsing Microformats
Parsing Microformats
 
Things you probably don't do (or tying to make project automation sexy)
Things you probably don't do (or tying to make project automation sexy)Things you probably don't do (or tying to make project automation sexy)
Things you probably don't do (or tying to make project automation sexy)
 
Notes from (Web 2.0) Revolution
Notes from (Web 2.0) RevolutionNotes from (Web 2.0) Revolution
Notes from (Web 2.0) Revolution
 
Rails flavoured OpenId
Rails flavoured OpenIdRails flavoured OpenId
Rails flavoured OpenId
 
Shiny Content Management with Radiant
Shiny Content Management with RadiantShiny Content Management with Radiant
Shiny Content Management with Radiant
 
RESTful Rabbits
RESTful RabbitsRESTful Rabbits
RESTful Rabbits
 

Último

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 

Último (20)

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

Varnish Caching

  • 1. Varnish Cache Clever Software for Making HTTP Applications Faster Refresh Cambridge 6th July 2011 gareth rushgrove | morethanseven.net http://www.flickr.com/photos/jkannenberg/541059011
  • 2. Gareth Rushgrove gareth rushgrove | morethanseven.net
  • 3. Work at freeagentcentral.com gareth rushgrove | morethanseven.net
  • 4. Blog at morethanseven.net gareth rushgrove | morethanseven.net
  • 7. “Varnish Cache is an open source, state of the art web application accelerator. You install it on your web server and it makes your website fly. Official blurb What is Varnish? gareth rushgrove | morethanseven.net http://www.flickr.com/photos/exalthim/3597210568
  • 8. - Cache - Reverse Proxy - HTTP Accelerator Seriously, what is Varnish? gareth rushgrove | morethanseven.net
  • 9. A Story of HTTP Caching gareth rushgrove | morethanseven.net http://www.flickr.com/photos/solsken/62924477
  • 10. Database Web Server Web Traffic A Typical App gareth rushgrove | morethanseven.net
  • 11. Database Web Server More Traffic == Slower responses gareth rushgrove | morethanseven.net
  • 12. Database Web Server Eventually... gareth rushgrove | morethanseven.net
  • 13. Database Web Server Varnish Add Varnish gareth rushgrove | morethanseven.net
  • 14. Database Web Server Varnish Deal with more traffic gareth rushgrove | morethanseven.net
  • 15. An Example gareth rushgrove | morethanseven.net http://www.flickr.com/photos/jonrb/3735816042
  • 17. memcached Gunicorn Varnish Nginx Database memcached Gunicorn Varnish Nginx Overengineering for Fun
  • 18. backend default { .host = "127.0.0.1"; .port = "8000"; } sub vcl_recv { if (req.request == "GET" && req.http.cookie) { return(lookup); } } sub vcl_fetch { if (beresp.ttl < 180s) { set beresp.ttl = 180s; } esi; if (beresp.http.Set-Cookie) { return(deliver); } } Varnish Configuration gareth rushgrove | morethanseven.net
  • 19. ⚡ ab -c 10 -n 400 http://www.vagrantbox.es/ Requests per second: 59.63 [#/sec] (mean) Percentage of the requests served within a certain time (ms) 50% 164 66% 174 75% 183 80% 188 90% 207 95% 231 98% 246 99% 279 100% 408 (longest request) Without Varnish gareth rushgrove | morethanseven.net
  • 20. ⚡ ab -c 10 -n 400 http://www.vagrantbox.es/ Requests per second: 103.61 [#/sec] (mean) Percentage of the requests served within a certain time (ms) 50% 92 66% 101 75% 107 80% 111 90% 120 95% 129 98% 141 99% 149 100% 157 (longest request) With Varnish gareth rushgrove | morethanseven.net
  • 21. Questions? gareth rushgrove | morethanseven.net http://flickr.com/photos/psd/102332391/