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
tsuyoshi nakamura
December 02, 2016
Programming
0
1.2k
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
440
PHPを少しでも早く_条件はあるよ_.pdf
tsuyoshi
0
52
スタートアップ6年目のレビュー文化.pdf
tsuyoshi
1
1.8k
PHPを少し深堀るよ.pdf
tsuyoshi
0
320
Reactive_Manifesto.pdf
tsuyoshi
0
45
About_Resilience.pdf
tsuyoshi
1
63
エンジニアの循環ってgood_or_bad_.pdf
tsuyoshi
0
1.2k
スタートアップしてからの失敗の数々
tsuyoshi
0
2.3k
スタートアップエンジニアの役割
tsuyoshi
0
480
Other Decks in Programming
See All in Programming
Swift Testingのモチベを上げたい
stoticdev
2
220
もう一人で悩まない! 個の知見をチームの知見にする3つの習慣と工夫 / Into team knowledge.
honyanya
2
130
Google Cloudとo11yで実現するアプリケーション開発者主体のDB改善
nnaka2992
1
160
Expoによるアプリ開発の現在地とReact Server Componentsが切り開く未来
yukukotani
2
300
From the Wild into the Clouds - Laravel Meetup Talk
neverything
0
190
AIレビュー導入によるCIツールとの共存と最適化
kamo26sima
1
1.2k
kintone開発を効率化するためにチームで試した施策とその結果を大放出!
oguemon
0
400
たのしいSocketのしくみ / Socket Under a Microscope
coe401_
8
1.5k
気がついたら子供が社会人になって 自分と同じモバイルアプリエンジニアになった件 / Parent-Child Engineers
koishi
0
130
機能が複雑化しても 頼りになる FactoryBotの話
tamikof
1
260
Webフレームワークとともに利用するWeb components / JSConf.jp おかわり
spring_raining
1
160
The Clean ArchitectureがWebフロントエンドでしっくりこないのは何故か / Why The Clean Architecture does not fit with Web Frontend
twada
PRO
62
21k
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.7k
Rails Girls Zürich Keynote
gr2m
94
13k
Into the Great Unknown - MozCon
thekraken
35
1.7k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
100
18k
A Modern Web Designer's Workflow
chriscoyier
693
190k
The Invisible Side of Design
smashingmag
299
50k
A Tale of Four Properties
chriscoyier
158
23k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.5k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Fireside Chat
paigeccino
36
3.2k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
115
51k
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 より高速になるだろう構成