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
470
PHPを少しでも早く_条件はあるよ_.pdf
tsuyoshi
0
73
スタートアップ6年目のレビュー文化.pdf
tsuyoshi
1
1.9k
PHPを少し深堀るよ.pdf
tsuyoshi
0
360
Reactive_Manifesto.pdf
tsuyoshi
0
63
About_Resilience.pdf
tsuyoshi
1
75
エンジニアの循環ってgood_or_bad_.pdf
tsuyoshi
0
1.2k
スタートアップしてからの失敗の数々
tsuyoshi
0
2.4k
スタートアップエンジニアの役割
tsuyoshi
0
510
Other Decks in Business
See All in Business
20251012_社内でのMCT活動
ponponmikankan
1
490
あつまれ_POの森_プロダクトオーナー初心者のためのやさしいQ_Aセッション.pdf
nolick1219
3
1.2k
株式会社J Institute 採用説明資料
jsaiyou123
0
140
AIプロダクト時代のPdMに必要なコンテキストエンジニアリング
kayato
0
110
アッテル会社紹介資料/culture deck
attelu
10
15k
株式会社LANY / Company Deck
lany
2
83k
No.1ビジネスを創り出す カテゴリー戦略の実践ガイド
shunsukemori
0
170
一番農業株式会社_会社説明資料
1stagri
0
230
straya/company deck
takuyaaaaa325
0
140
SASアピールブック(Web公開版)
sas_si
0
1.2k
Scrum Inc. Japan Company Introduction
scrumincjp
0
7k
プラスディーアンドシー合同会社 FACTBOOK _ver1.51_20250801
plusdc
PRO
1
230
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Typedesign – Prime Four
hannesfritz
42
2.8k
GraphQLとの向き合い方2022年版
quramy
49
14k
Into the Great Unknown - MozCon
thekraken
40
2.1k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
Gamification - CAS2011
davidbonilla
81
5.5k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.2k
Six Lessons from altMBA
skipperchong
28
4k
The World Runs on Bad Software
bkeepers
PRO
72
11k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.1k
Bash Introduction
62gerente
615
210k
Testing 201, or: Great Expectations
jmmastey
45
7.7k
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開発はセット