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
240
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Varnish: How We Do It
SF Varnish Meetup
June 1st, 2015
Matt Robenolt
June 01, 2015
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
240
Everything is broken, and I don't know why. Python edition.
mattrobenolt
1
240
Everything is broken, and I don't know why. Python edition.
mattrobenolt
2
640
Everything is broken, and I don't know why.
mattrobenolt
7
1.6k
Cheating Your Way to Webscale
mattrobenolt
13
1.4k
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.3k
Other Decks in Technology
See All in Technology
副作用のある Lambda でも Lambda Power Tuning は使えるのか / lambda-power-tuning-side-effects
koukihosaka
1
120
しくみを学んで使いこなそう GitHub Copilot app
torumakabe
2
290
マルチアカウント環境でSecurity Hubの運用、その後どうなった? / SRE NEXT 2026 miniLT会
genda
0
110
CDKで書くECSのベストプラクティス、 改めて考え直す2026 #cdkconf2026
makies
3
850
変更し続けられるシステムをどう保つか — AI時代のSSoTという設計原則
kawauso
0
220
Control Planeで育てるBtoB SaaSの認証基盤 - SRE NEXT 2026
pokohide
1
2.7k
SRE本の知られざる名シーン / The Hidden Gems of Google SRE Book
nari_ex
1
430
AI時代のPlaywright活用(システムテストを自動化する ー 実行エンジンにPla ywrightを選んだ理由)
ynisqa1988
1
630
Gen3R: 3D Scene Generation Meets Feed-Forward Reconstruction
spatial_ai_network
0
140
OpenTelemetryにおけるGoのゼロコード・コンパイル時計装について #fukuokago
quiver
0
120
AI時代の開発生産性は、個人技からチーム設計へ
moongift
PRO
4
2.4k
ソニー銀行におけるビジネスアジリティ向上のためのクラウドシフト戦略
srenext
0
860
Featured
See All Featured
Building the Perfect Custom Keyboard
takai
2
810
The agentic SEO stack - context over prompts
schlessera
0
850
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
370
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.4k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.4k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.9k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.6k
The browser strikes back
jonoalderson
0
1.4k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
120k
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