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
600
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
430
PHPを少しでも早く_条件はあるよ_.pdf
tsuyoshi
0
48
スタートアップ6年目のレビュー文化.pdf
tsuyoshi
1
1.8k
PHPを少し深堀るよ.pdf
tsuyoshi
0
310
Reactive_Manifesto.pdf
tsuyoshi
0
42
About_Resilience.pdf
tsuyoshi
1
60
エンジニアの循環ってgood_or_bad_.pdf
tsuyoshi
0
1.2k
スタートアップしてからの失敗の数々
tsuyoshi
0
2.3k
スタートアップエンジニアの役割
tsuyoshi
0
470
Other Decks in Business
See All in Business
【新卒採用】BuySell Technologies会社紹介資料
buyselltechnologies
0
200k
【株式会灯白社】会社紹介資料_カンパニーデック
tohakusha202006
0
550
社会変化兆候調査 vol.20 / 103 global changes in lifestyle 2025 vol.20
nozomi
0
130
セーフィー株式会社(Safie Inc.) 会社紹介資料
safie_recruit
6
310k
【Progmat】Monthly-ST-Market-Report-2025-Jan.
progmat
0
540
株式会社ユビレジ_採用ピッチ資料 / Ubiregi_CompanyProfile
ubiregi_saiyo
1
7.4k
会社紹介資料 / ProfileBook
gpol
4
28k
キャッチアップ会社紹介
catchup
2
52k
トレードオフの連続解決を通して対立を協力に変えるプロダクトマネジメントを実現するぞ/continuous management of Trade offs rsgt2025
moriyuya
11
6.4k
国立大学法人等職員仕事ガイド(北海道地区)
univstaffhokkaido
0
180
【エンジニア採用向け】ユーザーライク社の紹介_202501
userlike1
0
160
ABCash会社紹介資料「Culture Deck2025」
abcash_recruit
0
11k
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
94
13k
Why Our Code Smells
bkeepers
PRO
335
57k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
Raft: Consensus for Rubyists
vanstee
137
6.8k
Mobile First: as difficult as doing things right
swwweet
222
9.2k
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.2k
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.5k
Adopting Sorbet at Scale
ufuk
74
9.2k
What's in a price? How to price your products and services
michaelherold
244
12k
Producing Creativity
orderedlist
PRO
343
39k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.4k
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開発はセット