Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Varnish: How We Do It
Search
Matt Robenolt
June 01, 2015
Technology
1
210
Varnish: How We Do It
SF Varnish Meetup
June 1st, 2015
Matt Robenolt
June 01, 2015
Tweet
Share
More Decks by Matt Robenolt
See All by Matt Robenolt
Everything is broken and I don't know why.
mattrobenolt
0
44
I am bad at my job.
mattrobenolt
0
180
Everything is broken, and I don't know why. Python edition.
mattrobenolt
1
170
Everything is broken, and I don't know why. Python edition.
mattrobenolt
2
550
Everything is broken, and I don't know why.
mattrobenolt
7
1.4k
Cheating Your Way to Webscale
mattrobenolt
13
1.3k
HTTP for Great Good
mattrobenolt
85
200k
Caching is Hard: Varnish @ Disqus
mattrobenolt
52
2.1M
Developing & Deploying "Large" Scale Web Applications
mattrobenolt
25
1.2k
Other Decks in Technology
See All in Technology
OPENLOGI Company Profile
hr01
0
58k
20250116_JAWS_Osaka
takuyay0ne
2
200
いま現場PMのあなたが、 経営と向き合うPMになるために 必要なこと、腹をくくること
hiro93n
9
7.4k
完全自律型AIエージェントとAgentic Workflow〜ワークフロー構築という現実解
pharma_x_tech
0
330
Visual StudioとかIDE関連小ネタ話
kosmosebi
1
370
comilioとCloudflare、そして未来へと向けて
oliver_diary
6
440
RubyでKubernetesプログラミング
sat
PRO
4
160
「隙間家具OSS」に至る道/Fujiwara Tech Conference 2025
fujiwara3
7
6.4k
0→1事業こそPMは営業すべし / pmconf #落選お披露目 / PM should do sales in zero to one
roki_n_
PRO
1
1.2k
EMConf JP の楽しみ方 / How to enjoy EMConf JP
pauli
2
150
技術に触れたり、顔を出そう
maruto
1
150
カップ麺の待ち時間(3分)でわかるPartyRockアップデート
ryutakondo
0
130
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
68
10k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Done Done
chrislema
182
16k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
3
180
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
500
Code Reviewing Like a Champion
maltzj
521
39k
Bash Introduction
62gerente
610
210k
4 Signs Your Business is Dying
shpigford
182
22k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Mobile First: as difficult as doing things right
swwweet
222
9k
Transcript
Varnish: How we do it SF Varnish Meetup June 1st
2015 Matt Robenolt
Hello < me irl
Lead Operations Engineer
First Generation edge (haproxy) shield app (python) Failover
Why this sucked
Duplicate routing logic Complex Caching logic WasteD RAM for failover
Why this sucked
Failover == lose all cache Varnish held cache rules Hard
to add/remove backends Why this sucked
Current Generation edge shield app (python)
Why this is rad
App owns all caching logic Unified request routing Utilize RAM
from all nodes Why this is rad
If-Modified-Since Vary on cookie values Less deploys to Varnish Why
this is rad
60,000 15,000 13,000 Caching funnel edge shield app
edge shield app Onion skin view
edge shield app recv pass fetch hit miss hash synth
fetch deliver error Onion skin view
edge 60,000 req/s
edge Closest to users (geographically) Absorbs most traffic Blocks abuse
60,000 req/s
edge Makes decisions for shield Sort querystrings (boltsort/std) Promote cookies
to headers 60,000 req/s
Cookies. as headers? Why?
Vary: Cookie-sessionid
shield 15,000 req/s
shield Routing to app backends Serve stale content (grace) Do
If-modified-Since 15,000 req/s
shield Parse response cache rules Backend healthchecks Store lots of
content 15,000 req/s
application 13,000 req/s
application Declare response cache rules Respond to If-modified-Since 13,000 req/s
WaiT. 13,000 req/s still?
46% 53% 1% App Response Codes
46% 53% 1% App Response Codes 304 200
miss Hit Hit/update If-Modified-Since Hit/IMS 200 OK 200 OK 304
Not Modified v1 v2
tl;dr 60k req -> 7k at app Every request thru
Varinsh Complex logic written once
tl;dr App has complete control We still <3 haproxy Each
layer worth deep dive
We’re hiring people who hate comptuers. disqus.com/jobs
Check it. HTTP for Great Good speakerdeck.com/mattrobenolt/http-for-great-good Cheating Your Way
to #webscale speakerdeck.com/mattrobenolt/cheating-your-way-to-webscale
Questions? I have answers. ^ github.com/mattrobenolt @mattrobenolt some