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
1.3k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Varnish vs Memcached
Benchmark Varnish vs Memcached
tsuyoshi nakamura
December 02, 2016
More Decks by tsuyoshi nakamura
See All by tsuyoshi nakamura
社内の勉強会で発表した_output_一部抜粋版_.pdf
tsuyoshi
0
500
PHPを少しでも早く_条件はあるよ_.pdf
tsuyoshi
0
87
スタートアップ6年目のレビュー文化.pdf
tsuyoshi
1
2k
PHPを少し深堀るよ.pdf
tsuyoshi
0
390
Reactive_Manifesto.pdf
tsuyoshi
0
87
About_Resilience.pdf
tsuyoshi
1
95
エンジニアの循環ってgood_or_bad_.pdf
tsuyoshi
0
1.3k
スタートアップしてからの失敗の数々
tsuyoshi
0
2.5k
スタートアップエンジニアの役割
tsuyoshi
0
550
Other Decks in Programming
See All in Programming
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.3k
並列実装の現場、2ヶ月間実務でAIを使い倒したAIもPCも私も限界が近い
ming_ayami
0
110
New "Type" system on PicoRuby
pocke
1
730
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
12k
Oxlintのカスタムルールの現況
syumai
6
1k
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
170
AutonomyとControlのあいだ:Graflowで記述するAIエージェント協調
myui
0
110
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
510
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
3
1.2k
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.9k
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
3.9k
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
12
3.6k
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
The Curse of the Amulet
leimatthew05
1
13k
Paper Plane (Part 1)
katiecoart
PRO
0
8.7k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
71
40k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
550
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
140
The Invisible Side of Design
smashingmag
302
52k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
860
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
150
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
330
Skip the Path - Find Your Career Trail
mkilby
1
140
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 より高速になるだろう構成