Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Varnish vs Memcached

Varnish vs Memcached

Benchmark Varnish vs Memcached

tsuyoshi nakamura

December 02, 2016
Tweet

More Decks by tsuyoshi nakamura

Other Decks in Programming

Transcript

  1. agenda 2 ▹ What is Varnish? ▹ Benchmark Memcached and

    Varnish ▸ System Configuration ▸ Benchmark Results ▹ Summary
  2. 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
  3. 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
  4. 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
  5. 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
  6. おまけ 13 ELB varnish Nginx PHP-FPM ELB Nginx Varnish Nginx

    PHP-FPM より高速になるだろう構成