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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Matt Robenolt
June 01, 2015
Technology
1
230
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
220
Everything is broken, and I don't know why. Python edition.
mattrobenolt
1
210
Everything is broken, and I don't know why. Python edition.
mattrobenolt
2
610
Everything is broken, and I don't know why.
mattrobenolt
7
1.5k
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
外部キー制約の知っておいて欲しいこと - RDBMSを正しく使うために必要なこと / FOREIGN KEY Night
soudai
PRO
11
4.5k
制約が導く迷わない設計 〜 信頼性と運用性を両立するマイナンバー管理システムの実践 〜
bwkw
2
830
入社1ヶ月でデータパイプライン講座を作った話
waiwai2111
1
220
GCASアップデート(202510-202601)
techniczna
0
250
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
13k
小さく始めるBCP ― 多プロダクト環境で始める最初の一歩
kekke_n
1
320
モダンUIでフルサーバーレスなAIエージェントをAmplifyとCDKでサクッとデプロイしよう
minorun365
2
120
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
3.8k
あたらしい上流工程の形。 0日導入からはじめるAI駆動PM
kumaiu
5
750
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3k
オープンウェイトのLLMリランカーを契約書で評価する / searchtechjp
sansan_randd
3
640
レガシー共有バッチ基盤への挑戦 - SREドリブンなリアーキテクチャリングの取り組み
tatsukoni
0
190
Featured
See All Featured
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
300
So, you think you're a good person
axbom
PRO
2
1.9k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.3k
Building Applications with DynamoDB
mza
96
6.9k
Why Our Code Smells
bkeepers
PRO
340
58k
Six Lessons from altMBA
skipperchong
29
4.1k
The Curse of the Amulet
leimatthew05
1
8.2k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Darren the Foodie - Storyboard
khoart
PRO
2
2.3k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
62
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
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