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
180
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.5k
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
Cloud Spanner 導入で実現した快適な開発と運用について
colopl
1
600
インフラをつくるとはどういうことなのか、 あるいはPlatform Engineeringについて
nwiizo
5
2.6k
クラウドサービス事業者におけるOSS
tagomoris
1
690
エンジニアが加速させるプロダクトディスカバリー 〜最速で価値ある機能を見つける方法〜 / product discovery accelerated by engineers
rince
4
320
リアルタイム分析データベースで実現する SQLベースのオブザーバビリティ
mikimatsumoto
0
1.3k
ハッキングの世界に迫る~攻撃者の思考で考えるセキュリティ~
nomizone
13
5.2k
技術負債の「予兆検知」と「状況異変」のススメ / Technology Dept
i35_267
1
1.1k
Moved to https://speakerdeck.com/toshihue/presales-engineer-career-bridging-tech-biz-ja
toshihue
2
740
トラシューアニマルになろう ~開発者だからこそできる、安定したサービス作りの秘訣~
jacopen
2
2k
2025-02-21 ゆるSRE勉強会 Enhancing SRE Using AI
yoshiiryo1
1
320
OpenID Connect for Identity Assurance の概要と翻訳版のご紹介 / 20250219-BizDay17-OIDC4IDA-Intro
oidfj
0
270
バックエンドエンジニアのためのフロントエンド入門 #devsumiC
panda_program
18
7.5k
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.7k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Site-Speed That Sticks
csswizardry
4
380
Music & Morning Musume
bryan
46
6.3k
We Have a Design System, Now What?
morganepeng
51
7.4k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.2k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.5k
Measuring & Analyzing Core Web Vitals
bluesmoon
6
240
Facilitating Awesome Meetings
lara
52
6.2k
Code Reviewing Like a Champion
maltzj
521
39k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
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