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
570
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
400
PHPを少しでも早く_条件はあるよ_.pdf
tsuyoshi
0
39
スタートアップ6年目のレビュー文化.pdf
tsuyoshi
1
1.7k
PHPを少し深堀るよ.pdf
tsuyoshi
0
280
Reactive_Manifesto.pdf
tsuyoshi
0
36
About_Resilience.pdf
tsuyoshi
1
55
エンジニアの循環ってgood_or_bad_.pdf
tsuyoshi
0
1.1k
スタートアップしてからの失敗の数々
tsuyoshi
0
2.2k
スタートアップエンジニアの役割
tsuyoshi
0
440
Other Decks in Business
See All in Business
(1枚)KPIマネジメントとPDCAサイクルの全体像
nyattx
PRO
1
150
(3枚)営業のためのマーケティングマネジメントの全体像(コスト検証)
nyattx
PRO
2
1.2k
20240629_CMCCentral_CMBasics
hideki_ojima
2
420
株式会社Penetrator - Culture Deck202407
fumiyafujii0123
0
120
オレンジスピリッツ 会社説明資料/Introduction
orangespirits
0
13k
(14枚)仮説思考に必要な5つの能力
nyattx
PRO
1
330
FAST COMPANY DECK
fastinc
0
340
PMにとってスキルより大事なもの
pakugoku
0
200
ties|クラウド顧客・案件管理システム - サービスのご紹介
so_kotani
1
240
CC採用候補者向けピッチ資料
crosscommunication
2
38k
クラスメソッド_会社紹介資料_202407 / introduction to classmethod for engineers
classmethod_jinji
1
1.3k
相続チェックリスト
wf714201
0
270
Featured
See All Featured
The Brand Is Dead. Long Live the Brand.
mthomps
52
36k
GitHub's CSS Performance
jonrohan
1026
450k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.4k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
245
1.2M
BBQ
matthewcrist
82
9k
Building a Modern Day E-commerce SEO Strategy
aleyda
25
6.7k
A better future with KSS
kneath
231
17k
Rebuilding a faster, lazier Slack
samanthasiow
78
8.5k
10 Git Anti Patterns You Should be Aware of
lemiorhan
652
58k
How STYLIGHT went responsive
nonsquared
93
5k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
78
15k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
12
3.8k
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開発はセット