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
490
PHPを少しでも早く_条件はあるよ_.pdf
tsuyoshi
0
86
スタートアップ6年目のレビュー文化.pdf
tsuyoshi
1
1.9k
PHPを少し深堀るよ.pdf
tsuyoshi
0
380
Reactive_Manifesto.pdf
tsuyoshi
0
80
About_Resilience.pdf
tsuyoshi
1
89
エンジニアの循環ってgood_or_bad_.pdf
tsuyoshi
0
1.3k
スタートアップしてからの失敗の数々
tsuyoshi
0
2.4k
スタートアップエンジニアの役割
tsuyoshi
0
540
Other Decks in Programming
See All in Programming
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
510
Redox OS でのネームスペース管理と chroot の実現
isanethen
0
460
Ruby and LLM Ecosystem 2nd
koic
1
1.3k
Windows on Ryzen and I
seosoft
0
410
CSC307 Lecture 15
javiergs
PRO
0
270
Strategy for Finding a Problem for OSS: With Real Examples
kibitan
0
110
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
560
安いハードウェアでVulkan
fadis
1
810
20260313 - Grafana & Friends Taipei #1 - Kubernetes v1.36 的開發雜記:那些困在 Alpha 加護病房太久的 Metrics
tico88612
0
240
「接続」—パフォーマンスチューニングの最後の一手 〜点と点を結ぶ、その一瞬のために〜
kentaroutakeda
4
2k
脱 雰囲気実装!AgentCoreを良い感じにWEBアプリケーションに組み込むために
takuyay0ne
3
400
「効かない!」依存性注入(DI)を活用したAPI Platformのエラーハンドリング奮闘記
mkmk884
0
250
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
The Curious Case for Waylosing
cassininazir
0
280
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
500
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
150
sira's awesome portfolio website redesign presentation
elsirapls
0
200
Utilizing Notion as your number one productivity tool
mfonobong
4
270
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Testing 201, or: Great Expectations
jmmastey
46
8.1k
Balancing Empowerment & Direction
lara
5
990
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.4k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
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 より高速になるだろう構成