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
620
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
450
PHPを少しでも早く_条件はあるよ_.pdf
tsuyoshi
0
61
スタートアップ6年目のレビュー文化.pdf
tsuyoshi
1
1.8k
PHPを少し深堀るよ.pdf
tsuyoshi
0
340
Reactive_Manifesto.pdf
tsuyoshi
0
54
About_Resilience.pdf
tsuyoshi
1
66
エンジニアの循環ってgood_or_bad_.pdf
tsuyoshi
0
1.2k
スタートアップしてからの失敗の数々
tsuyoshi
0
2.3k
スタートアップエンジニアの役割
tsuyoshi
0
500
Other Decks in Business
See All in Business
ChillStack会社紹介資料
chillstack
0
330
tokyo_dbt_meetup_#14_意志ある羅針盤たれ<データサイド>
t_yamaguchi
3
500
OpenBridge株式会社 会社紹介資料 / We are hiring
openbridge
0
140
航空機設計者がResearcherを社内に広めてみた
aonomasahiro
1
430
BoostDraft 会社紹介資料
boostdraft
0
340
日本ロボット工業会:講演「中国のヒューマノイド・ロボットの開発と利用の最新動向」 20250625
takasumasakazu
1
120
三菱商事ロジスティクス_コンサルティング事業紹介
mclogi
0
170
Introduction of Elastic Infra Inc.
elasticinfra
0
620
Taiwan Product Conference 2025: Interoperate Integrate Iterate a 10 Year Pm Survival Kit for Traditional Sectors
dwchiang
0
150
c-slide_サービス紹介資料テンプレート
coneinc
0
330
ソリューションデザイナの紹介
laboroai2016
0
240
株式会社リブセンス 会社説明資料(報道関係者様向け)
livesense
PRO
0
1.4k
Featured
See All Featured
The Language of Interfaces
destraynor
158
25k
A Tale of Four Properties
chriscoyier
160
23k
Docker and Python
trallard
44
3.4k
How STYLIGHT went responsive
nonsquared
100
5.6k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Being A Developer After 40
akosma
90
590k
The Cost Of JavaScript in 2023
addyosmani
51
8.4k
Embracing the Ebb and Flow
colly
86
4.7k
Testing 201, or: Great Expectations
jmmastey
42
7.5k
How to train your dragon (web standard)
notwaldorf
92
6.1k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
Documentation Writing (for coders)
carmenintech
71
4.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開発はセット