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
69
スタートアップ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
株式会社10X - Company Deck
10xinc
89
1.5M
COMPANY INTRODUCTION
lenz_co
0
250
行動指針
fint_recruit
0
730
2011年 「ぼっちが懇親会でするべき97のこと」 #97bocchi から積み重ねた【令和7年最新】技術コミュニティ交流戦略2025
bash0c7
0
390
「使いこなせないかも…」を超えて、BackLogを日常にするまでの話(JBUG Live版)
sho_okawara
0
140
20250901_UPDATER_companysummary
updater_pr
0
89k
フルカイテン株式会社 採用資料
fullkaiten
0
73k
【会社紹介資料】株式会社エーピーコミュニケーションズ
apcom
0
5.7k
20250816 「アジャイル」って?~"Do Agile"から"Be Agile"へ~
east_takumi
0
3k
Cierpa&Co._Culture Deck_202509
cierpa0905
PRO
0
1k
Strh株式会社 採用資料
strh
0
190
VISASQ: ABOUT US
eikohashiba
15
520k
Featured
See All Featured
Building an army of robots
kneath
306
46k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.8k
Raft: Consensus for Rubyists
vanstee
140
7.1k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.5k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
Java REST API Framework Comparison - PWX 2021
mraible
33
8.8k
The Language of Interfaces
destraynor
161
25k
A designer walks into a library…
pauljervisheath
207
24k
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開発はセット