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.1k
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
400
PHPを少しでも早く_条件はあるよ_.pdf
tsuyoshi
0
39
スタートアップ6年目のレビュー文化.pdf
tsuyoshi
1
1.7k
PHPを少し深堀るよ.pdf
tsuyoshi
0
280
Reactive_Manifesto.pdf
tsuyoshi
0
36
About_Resilience.pdf
tsuyoshi
1
55
エンジニアの循環ってgood_or_bad_.pdf
tsuyoshi
0
1.1k
スタートアップしてからの失敗の数々
tsuyoshi
0
2.2k
スタートアップエンジニアの役割
tsuyoshi
0
440
Other Decks in Programming
See All in Programming
Temporalを取り巻く仕様を整理する
sajikix
0
120
Introduction of Happy Eyeballs Version 2 (RFC8305) to the Socket library
coe401_
1
220
Harnessing Large Language Models for Training-free Video Anomaly Detection
tereka114
1
1.3k
GraphQL はいいぞ! ~Laravel で学ぶ GraphQL 入門~
azuki
1
160
生成AIをkintoneに連携してみた
hideg
0
230
日付と正規化
megmogmog1965
0
140
CSC307 Lecture 11
javiergs
PRO
0
240
AWS初心者ってどうやってAWSを学ぶ?〜アプリエンジニアがやってよかったアーキテクチャ学習方法〜
yamanashi_ren01
0
190
ドメイン駆動設計の実践
masuda220
PRO
19
5.2k
CSC307 Lecture 06
javiergs
PRO
0
360
Activities at Cairo Library
cairolibrary720
0
1.2k
Cloudflare Workers x AWS Lambdaの組み合わせユースケース / Cloudflare Workers x AWS Lambda Combination Use Case
seike460
PRO
2
310
Featured
See All Featured
Building Your Own Lightsaber
phodgson
101
5.9k
Build your cross-platform service in a week with App Engine
jlugia
227
17k
The Invisible Customer
myddelton
117
13k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
78
15k
Web development in the modern age
philhawksworth
203
10k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
19k
We Have a Design System, Now What?
morganepeng
46
7k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
44
4.7k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
277
13k
Writing Fast Ruby
sferik
623
60k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
36
9.1k
Testing 201, or: Great Expectations
jmmastey
33
6.9k
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 より高速になるだろう構成