EC2とVarnishで画像配信

14,490 views

Published on

どうも、クックパッドの画像配信野郎mirakuiです。Varnish 3 のリリースに合わせて行われたVarnish勉強会「Tokyo.vcl」の第一回で発表したスライドです。

Published in: Technology
0 Comments
11 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
14,490
On SlideShare
0
From Embeds
0
Number of Embeds
6,240
Actions
Shares
0
Downloads
44
Comments
0
Likes
11
Embeds 0
No embeds

No notes for slide

EC2とVarnishで画像配信

  1. 1. EC2 Varnish
  2. 2. @mirakui
  3. 3.
  4. 4. BEFORE TOFU app app app apache apache
  5. 5. tofu
  6. 6. AFTER TOFU app app app tofu apache
  7. 7. http://tofu/recipes/1237075/100x141c/0b9c3ad1cba65869058e17cf78988bcb.jpg
  8. 8. http://tofu/recipes/ 1237075/100x141c/0b9c3ad1cba65869058e17cf78988bcb.jpg
  9. 9. ‘100’‘100x100’‘100x100c’‘100x100c40_198_137_104_300’
  10. 10. DEMO
  11. 11. ! Apache module (mod_tofu.so)! ImageMagick(Wand)! Amazon S3
  12. 12. akamai (cdn) ELBApache Apache Apache(mod_tofu) (mod_tofu) … (mod_tofu) S3
  13. 13. Akamai
  14. 14. 7000rps akamai (cdn) hit90% 700rps ELB Apache Apache Apache (mod_tofu) (mod_tofu) … (mod_tofu) S3
  15. 15. akamai (cdn) hit90% ELB 24 CACHE(?) hit60%Apache Apache Apache(mod_tofu) (mod_tofu) … (mod_tofu) S3
  16. 16. akamai (cdn) ELB Varnish VarnishApache Apache Apache(mod_tofu) (mod_tofu) … (mod_tofu) S3
  17. 17. EC2+Varnish
  18. 18. 1stchallenge
  19. 19. 1st challenge EC2 m2.xlarge EBS (17.1GB mem) 100GB swap Varnish 2.1.5 storage: malloc, 100GB
  20. 20. m2.xlarge(17.1GB) varnish 2+ EBS(100GB swap)300req/s 17.1GB + EBS100G 110GB 60% OS SWAP
  21. 21. 17.1GB Varnish swapLoadAverage →Varnish
  22. 22. 2ndchallenge
  23. 23. 2nd challenge EC2 m2.xlarge EBS (17.1GB mem) 100GB ext3 Varnish 2.1.5 storage: file, 100GB
  24. 24. file storage OS
  25. 25. file storage OS restart
  26. 26. EC2 VarnishI/O
  27. 27. Varnish3persistent storage restart file storagehash director varnish consistent hashing
  28. 28.
  29. 29. instance cores memory pricem1.large 2 7.5gb 23,904/m1.xlarge 4 15gb 47,808/c1.xlarge 8 7gb 47,808/m2.xlarge 2 17.1gb 35,868/m2.2xlarge 4 34.2gb 71,712/m2.4xlarge 8 68.48gb 142,826/ ……
  30. 30. akamai (cdn) tofu ELB Varnish VarnishApache Apache ApacheApache ApacheApache(mod_tofu) (mod_tofu) … (mod_tofu) (mod_tofu) (mod_tofu) (mod_tofu) S3
  31. 31. cache …
  32. 32. DISK I/O EC2 varnish m2.2xlargefile storagevarnish

×