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
Varnish vs Memcached
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
tsuyoshi nakamura
December 02, 2016
Programming
0
1.3k
Varnish vs Memcached
Benchmark Varnish vs Memcached
tsuyoshi nakamura
December 02, 2016
Tweet
Share
More Decks by tsuyoshi nakamura
See All by tsuyoshi nakamura
社内の勉強会で発表した_output_一部抜粋版_.pdf
tsuyoshi
0
480
PHPを少しでも早く_条件はあるよ_.pdf
tsuyoshi
0
82
スタートアップ6年目のレビュー文化.pdf
tsuyoshi
1
1.9k
PHPを少し深堀るよ.pdf
tsuyoshi
0
380
Reactive_Manifesto.pdf
tsuyoshi
0
75
About_Resilience.pdf
tsuyoshi
1
85
エンジニアの循環ってgood_or_bad_.pdf
tsuyoshi
0
1.3k
スタートアップしてからの失敗の数々
tsuyoshi
0
2.4k
スタートアップエンジニアの役割
tsuyoshi
0
530
Other Decks in Programming
See All in Programming
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.4k
CSC307 Lecture 01
javiergs
PRO
0
690
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
230
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
230
AI時代の認知負荷との向き合い方
optfit
0
160
高速開発のためのコード整理術
sutetotanuki
1
400
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
250
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
960
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
210
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
7.4k
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.3k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
300
Into the Great Unknown - MozCon
thekraken
40
2.3k
Believing is Seeing
oripsolob
1
54
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
320
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
430
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
250
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
280
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
96
Build your cross-platform service in a week with App Engine
jlugia
234
18k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
Transcript
Varnish vs Memcached 2016.12.02 社内勉強会 @nakamura_tsuyo4
agenda 2 ▹ What is Varnish? ▹ Benchmark Memcached and
Varnish ▸ System Configuration ▸ Benchmark Results ▹ Summary
Varnish Varnish HTTP Cache … https://varnish-cache.org/ 3 Poul-Henning Kamp
Varnish ▹ History ▸ 2006 … Version1.0 ▸ 2008 …
Version2.0 ▸ 2011 … Version3.0 ▸ 2014 … Version4.0 ▸ 2016 … Version5.0 4 ▹ HTTPアクセラレーター ▸ 同類のプロダクトで Squid cacheとかある ▸ Squidより10~20倍高速 by wiki
memcached ▹ Version 1.4.4 ▹ CentOS 6.3でdefault入る ▹ Nginx 1.10.1
Benchmark memcached and Varnish (configration) varnish ▹ Version 2.1.5 ▹ CentOS 6.3でdefaultで入る ▹ Nginx 1.10.1 5
Benchmark memcached and Varnish (configration) 6 ngx_http_memcached_moduleでnginxと memcachedをつなぐ Nginxのproxy設定でvarnishとつなぐ ▹
どちらの環境もあらかじめCacheデータは作成しておく ▸ Cacheデータはhttp://www.yahoo.co.jpのhtmlデータ memcached varnish http http
Benchmark Metrics HTTP load testing tool https://github.com/tsenart/vegeta 7
Benchmark Metrics ▹ 秒間100リクエストを20sec実施 ▸ Memcached ⬩ echo "GET https://192.168.33.10"
| vegeta attack -rate=100 -duration=20s -insecure | tee results_memcached.bin | vegeta report ▸ Varnish ⬩ echo "GET http://192.168.33.10:8000" | vegeta attack -rate=100 -duration=20s -insecure | tee results_varnish.bin | vegeta report 8
Benchmark Results 9
Benchmark Results 10
Benchmark Results 11 memcached varnish
Summary ▹ 今回のBenchmarkではvarnishのが高速に動いていた ▹ 所感ではcacheとしてのその他の機能はvarnishのが整っ ている感ある ▹ どちらも枯れた技術ではありそれなりの安心感はあると 思ってる ▹
CDN屋さんでもまだ使われるproduct=varnishなので ▹ 当初から思ってたvarnishのが早いんじゃない?は思った 通りだった 12
おまけ 13 ELB varnish Nginx PHP-FPM ELB Nginx Varnish Nginx
PHP-FPM より高速になるだろう構成