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
560
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
380
PHPを少しでも早く_条件はあるよ_.pdf
tsuyoshi
0
38
スタートアップ6年目のレビュー文化.pdf
tsuyoshi
1
1.6k
PHPを少し深堀るよ.pdf
tsuyoshi
0
270
Reactive_Manifesto.pdf
tsuyoshi
0
33
About_Resilience.pdf
tsuyoshi
1
51
エンジニアの循環ってgood_or_bad_.pdf
tsuyoshi
0
1.1k
スタートアップしてからの失敗の数々
tsuyoshi
0
2.2k
スタートアップエンジニアの役割
tsuyoshi
0
430
Other Decks in Business
See All in Business
慶應修士卒が語るキャリアパス:メーカー・コンサル・エンジニアからの知見
hamawwo
0
330
Webinar ACENEL 23.04.2024 - Certificados Energéticos (CAE´s)
acenel
PRO
0
130
社会変化兆候調査 vol.17 / 132 global changes in lifestyle 2024 vol.17
nozomi
0
180
akippa株式会社 - 会社紹介資料
akippa
2
45k
ラクスル株式会社 会社概要(IR)
raksulrecruiting
5
5.2k
カジュアル面談って、もっとカジュアルに していいの / informal session #jasstnano
pineapplecandy
0
130
多職種で実施したふりかえりで基本的なことに気付かされた/Basic key learnings from the pretests conducted in multiple professions
k_takashiro
2
260
Polaris.AI Company Deck / We are hiring
poralisai
0
520
grabss会社案内 / grabss careerdeck
grabss
0
550
Smartwill Company Profile
1129panda
0
590
【DearOne】Dear Newest Member
hrm
1
2.3k
KADOKAWA Connected|会社紹介資料/Corporate Introduction
kadokawaconnected
4
50k
Featured
See All Featured
A Tale of Four Properties
chriscoyier
152
22k
Docker and Python
trallard
35
2.7k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
22
1.6k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
21
1.4k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
352
28k
Agile that works and the tools we love
rasmusluckow
325
20k
Documentation Writing (for coders)
carmenintech
60
4k
How to Ace a Technical Interview
jacobian
273
22k
Thoughts on Productivity
jonyablonski
60
3.9k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
226
51k
Fireside Chat
paigeccino
22
2.6k
Imperfection Machines: The Place of Print at Facebook
scottboms
261
12k
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開発はセット