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
HTML cache
Search
tsuyoshi nakamura
March 17, 2017
Business
0
640
HTML cache
HTML cache
tsuyoshi nakamura
March 17, 2017
Tweet
Share
More Decks by tsuyoshi nakamura
See All by tsuyoshi nakamura
社内の勉強会で発表した_output_一部抜粋版_.pdf
tsuyoshi
0
460
PHPを少しでも早く_条件はあるよ_.pdf
tsuyoshi
0
70
スタートアップ6年目のレビュー文化.pdf
tsuyoshi
1
1.9k
PHPを少し深堀るよ.pdf
tsuyoshi
0
350
Reactive_Manifesto.pdf
tsuyoshi
0
60
About_Resilience.pdf
tsuyoshi
1
72
エンジニアの循環ってgood_or_bad_.pdf
tsuyoshi
0
1.2k
スタートアップしてからの失敗の数々
tsuyoshi
0
2.4k
スタートアップエンジニアの役割
tsuyoshi
0
510
Other Decks in Business
See All in Business
Data Cloudで実現する、 Agentforce が飛び交う Next Generation Platform
marreta27
0
130
ヘルスベイシス_会社説明資料_v3.4
yasudashoyo
1
63k
Sales Marker Culture book
salesmarker
PRO
42
68k
株式会社TableCheck - 会社紹介 Company Profile
tablecheckac
0
2k
Cloudbase Recruiting Deck / 採用資料
cloudbaseinc
0
180
ブランド・プランナー協会講座概要
brandingtechnology
0
1k
新規投資家向け資料20250815
junkiogawa
0
2.9k
なぜ人はすれ違うのか_製造業で当たり前に行っていた根回しから考える、事前の配慮で顧客やチームとの対話を促進する方法
katsuakihoribe8
0
2.9k
コミューン株式会社_採用候補者様向け資料
commune
PRO
1
3.7k
物流の専門家がお客様に伴走するサブスク型コンサルティング
mclogi
0
400
エンジニア職/新卒向け会社紹介資料(テックファーム株式会社)
techfirm
1
4.7k
月曜日のトラにおけるデータ分析 × AI の取り組み
nishicat
0
500
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
53
7.8k
Become a Pro
speakerdeck
PRO
29
5.5k
Rails Girls Zürich Keynote
gr2m
95
14k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Facilitating Awesome Meetings
lara
55
6.5k
Unsuck your backbone
ammeep
671
58k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.9k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Building Applications with DynamoDB
mza
96
6.6k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.7k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
The Cost Of JavaScript in 2023
addyosmani
53
8.9k
Transcript
HTML Cache Constitution 2017.03.17 社内勉強会 @nakamura_tsuyo4
Agenda ➔ Nginx proxy cache ➔ Varnish ➔ Fastcgi cache
➔ memo
Agenda ➔ Nginx proxy cache ➔ Varnish ➔ Fastcgi cache
➔ memo
Nginx proxy cache LB Nginx (proxy cache) Nginx (proxy cache)
Nginx+fastcgi Nginx+fastcgi
Nginx proxy cache LB Nginx (proxy cache) Nginx (proxy cache)
Nginx+fastcgi Nginx+fastcgi んーん
Nginx proxy cache LB Nginx (proxy cache) Nginx (proxy cache)
LB Nginx+fastcgi Nginx+fastcgi
Nginx proxy cache LB Nginx (proxy cache) Nginx (proxy cache)
LB Nginx+fastcgi Nginx+fastcgi 構成変更ありきだなぁー
Agenda ➔ Nginx proxy cache ➔ Varnish ➔ Fastcgi cache
➔ memo
Varnish LB Nginx+fastcgi Varnish LB Varnish plus? Varnish plus? Nginx+fastcgi
Varnish LB Nginx+fastcgi Varnish LB Varnish plus? Varnish plus? Nginx+fastcgi
VHA (VARNISH HIGH AVAILABILITY)
Varnish LB varnish varnish Nginx+fastcgi Nginx+fastcgi varnish LB
Varnish LB varnish varnish Nginx+fastcgi Nginx+fastcgi varnish LB Self-routing varnish
cluster
Varnish self-routing varnish cluster https://info.varnish-software.com/blog/creating-self-routing-varnish-cluster
Varnish self-routing varnish cluster config https://gist.github.com/rezan/1eadaef1745286a4e7262d83e1eff19c
Varnish self-routing varnish cluster config “ We leverage this director
to do our content “ sharding by hashing on the URL and route “ the request to its destination:
Agenda ➔ Nginx proxy cache ➔ Varnish ➔ Fastcgi cache
➔ memo
FastCGI cache LB Nginx+fastcgi fastcgi_cache Nginx+fastcgi fastcgi_cache
FastCGI cache LB Nginx+fastcgi fastcgi_cache Nginx+fastcgi fastcgi_cache 構成変更なく手軽かも
Agenda ➔ Nginx proxy cache ➔ Varnish ➔ Fastcgi cache
➔ memo
memo • Cache自体はそれぞれのサーバに保存されるので deleteしたい時の考慮は必要 ◦ Or 即時反映されなくても良い業務設計が必要 • cacheすべきurlはcache serverのconfigでの管理になる
• Proxy_cache_lock , fastcgi_cache_lockは使った方がよさげ ◦ 同時アクセス負荷がかかった時に結局死ぬと思ってる • パフォーマンスのBenchmarkは未検証 • First stepとしてfastcgi_cacheは良さげ • リアルタイム性が必要なデータは当然あるので API開発はセット