Varnish Caching
Upcoming SlideShare
Loading in...5
×
 

Varnish Caching

on

  • 3,224 views

Lightning talk given at Refresh Cambridge event on 6th July 2011. Very quick introduction to where an HTTP Caching solution fits in, and an example of the kind of effect it could have on performance.

Lightning talk given at Refresh Cambridge event on 6th July 2011. Very quick introduction to where an HTTP Caching solution fits in, and an example of the kind of effect it could have on performance.

Statistics

Views

Total Views
3,224
Views on SlideShare
2,515
Embed Views
709

Actions

Likes
5
Downloads
41
Comments
0

10 Embeds 709

http://www.morethanseven.net 362
http://morethanseven.net 206
http://lanyrd.com 79
http://londondevops.org 40
url_unknown 8
http://www.slideshare.net 6
http://www.newsblur.com 4
http://localhost 2
http://www.hanrss.com 1
http://feeds.feedburner.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Varnish Caching Varnish Caching Presentation Transcript

  • Varnish CacheClever Software for Making HTTP Applications FasterRefresh Cambridge 6th July 2011gareth rushgrove | morethanseven.net http://www.flickr.com/photos/jkannenberg/541059011
  • Gareth Rushgrovegareth rushgrove | morethanseven.net
  • Work at freeagentcentral.comgareth rushgrove | morethanseven.net
  • Blog at morethanseven.netgareth rushgrove | morethanseven.net
  • Currate devopsweekly.comgareth rushgrove | morethanseven.net
  • www.varnish-cache.orggareth 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 blurbWhat is Varnish?gareth rushgrove | morethanseven.net http://www.flickr.com/photos/exalthim/3597210568
  • - Cache- Reverse Proxy- HTTP AcceleratorSeriously, what is Varnish?gareth rushgrove | morethanseven.net
  • A Story of HTTP Cachinggareth rushgrove | morethanseven.net http://www.flickr.com/photos/solsken/62924477
  • Database Web Server Web TrafficA Typical Appgareth rushgrove | morethanseven.net
  • Database Web ServerMore Traffic == Slower responsesgareth rushgrove | morethanseven.net
  • Database Web ServerEventually...gareth rushgrove | morethanseven.net
  • Database Web Server VarnishAdd Varnishgareth rushgrove | morethanseven.net
  • Database Web Server VarnishDeal with more trafficgareth rushgrove | morethanseven.net
  • An Examplegareth rushgrove | morethanseven.net http://www.flickr.com/photos/jonrb/3735816042
  • www.vagrantbox.esgareth rushgrove | morethanseven.net
  • memcached Gunicorn Varnish Nginx Database memcached Gunicorn Varnish NginxOverengineering 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 Configurationgareth 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 Varnishgareth 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 Varnishgareth rushgrove | morethanseven.net
  • Questions?gareth rushgrove | morethanseven.net http://flickr.com/photos/psd/102332391/