Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Varnish: How We Do It
Matt Robenolt
June 01, 2015
Technology
1
170
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
150
Everything is broken, and I don't know why. Python edition.
mattrobenolt
1
140
Everything is broken, and I don't know why. Python edition.
mattrobenolt
2
480
Everything is broken, and I don't know why.
mattrobenolt
7
1.2k
Cheating Your Way to Webscale
mattrobenolt
13
1.1k
HTTP for Great Good
mattrobenolt
86
200k
Caching is Hard: Varnish @ Disqus
mattrobenolt
52
2.1M
Developing & Deploying "Large" Scale Web Applications
mattrobenolt
26
1.1k
Other Decks in Technology
See All in Technology
キャッチアップ Android 13 / Catch up Android 13
yanzm
2
1k
20220510_簡単にできるコスト異常検出(Cost Anomaly Detection) /jaws-ug-asa-cost-anomaly-detection-20220510
emiki
2
310
インフラエンジニアBooks 30分でわかる「Dockerコンテナ開発・環境構築の基本」
cyberblack28
11
6.8k
Unity Package Managerで自作パッケージを配布する方法
yunoda
0
120
THETA Xの登場はジオ業界を変えるか?
furuhashilab
0
160
プロダクトグロースと技術のベースアップを両立させるRettyのアプリ開発スタイル / Achieve Product Growth and Tech Update
imaizume
1
280
エンタープライズにおけるSRE立ち上げとNew Relic選定に至った背景とは / SRE Startup and New Relic in the Enterprise
tomoyakitaura
2
140
エンジニアと気軽に繋がれるプラットフォーム「ハッカー飯」で行った セキュリティ・モニタリングに関する取り組みについて
nobuakikikuchi
0
350
HTTP Session Architecture Pattern
chiroito
1
390
Adopting Kafka for the #1 job site in the world
ymyzk
1
280
様々な現場のPower Platform ~小さなエンジニアの奮闘記~
hyodol2513
0
1.9k
Babylon.js v5 新機能の紹介
limes2018
1
1.1k
Featured
See All Featured
Faster Mobile Websites
deanohume
294
28k
The Illustrated Children's Guide to Kubernetes
chrisshort
14
34k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
236
1M
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
7
1k
How to name files
jennybc
39
58k
The Most Common Mistakes in Cover Letters
jrick
PRO
4
24k
Code Review Best Practice
trishagee
41
6.7k
Designing with Data
zakiwarfel
91
3.9k
Clear Off the Table
cherdarchuk
79
280k
Stop Working from a Prison Cell
hatefulcrawdad
261
17k
Visualization
eitanlees
124
11k
Automating Front-end Workflow
addyosmani
1351
200k
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