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
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
1.9k
PHPを少し深堀るよ.pdf
tsuyoshi
0
380
Reactive_Manifesto.pdf
tsuyoshi
0
81
About_Resilience.pdf
tsuyoshi
1
93
エンジニアの循環ってgood_or_bad_.pdf
tsuyoshi
0
1.3k
スタートアップしてからの失敗の数々
tsuyoshi
0
2.4k
スタートアップエンジニアの役割
tsuyoshi
0
540
Other Decks in Programming
See All in Programming
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
140
書籍「ユーザーストーリーマッピング」が私のバイブル
asumikam
4
380
YJITとZJITにはイカなる違いがあるのか?
nakiym
0
220
おれのAgentic Coding 2026/03
tsukasagr
1
150
PHP で mp3 プレイヤーを実装しよう
m3m0r7
PRO
0
280
t *testing.T は どこからやってくるの?
otakakot
1
690
SkillがSkillを生む:QA観点出しを自動化した
sontixyou
6
3.4k
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
210
PCOVから学ぶコードカバレッジ #phpcon_odawara
o0h
PRO
0
270
ドメインイベントでビジネスロジックを解きほぐす #phpcon_odawara
kajitack
3
790
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
5k
의존성 주입과 모듈화
fornewid
0
150
Featured
See All Featured
Mind Mapping
helmedeiros
PRO
1
160
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Evolving SEO for Evolving Search Engines
ryanjones
0
180
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
200
4 Signs Your Business is Dying
shpigford
187
22k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
130
The untapped power of vector embeddings
frankvandijk
2
1.7k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.4k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
210
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.7k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
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 より高速になるだろう構成