Successfully reported this slideshow.

料理を楽しくする画像配信システム

101

Share

Upcoming SlideShare
EC2とVarnishで画像配信
EC2とVarnishで画像配信
Loading in …3
×
1 of 93
1 of 93

料理を楽しくする画像配信システム

101

Share

Download to read offline

「料理を楽しくする画像配信システム」
クックパッド株式会社 成田 一生(@mirakui)

2011/5/25 クックパッドxサイバーエージェント合同勉強会(#amepad)で発表しました。

「料理を楽しくする画像配信システム」
クックパッド株式会社 成田 一生(@mirakui)

2011/5/25 クックパッドxサイバーエージェント合同勉強会(#amepad)で発表しました。

More Related Content

Related Books

Free with a 14 day trial from Scribd

See all

料理を楽しくする画像配信システム

  1. 1. @mirakui
  2. 2. BEFORE TOFU app app app apache apache
  3. 3. 800 …
  4. 4. 800 …
  5. 5. 800 7,000 /sec
  6. 6. IDC→EC 2
  7. 7. BEFORE TOFU app app app NFS apache apache
  8. 8. BEFORE TOFU app app app NFS apache apache
  9. 9. BEFORE TOFU app app app NFS apache apache
  10. 10. BEFORE TOFU app app app NFS apache apache
  11. 11. NFS
  12. 12. S3
  13. 13. 99.999999999%
  14. 14. TOFU
  15. 15. BEFORE TOFU app app app apache apache
  16. 16. AFTER TOFU app app app TOFU apache
  17. 17. http://d3921.image.cookpad.com/recipes/ 1237075/100x141c/ 0b9c3ad1cba65869058e17cf78988bcb.jpg
  18. 18. http://d3921.image.cookpad.com/recipes/ 1237075/100x141c/ 0b9c3ad1cba65869058e17cf78988bcb.jpg
  19. 19. ID http://d3921.image.cookpad.com/recipes/ 1237075/100x141c/ 0b9c3ad1cba65869058e17cf78988bcb.jpg
  20. 20. http://d3921.image.cookpad.com/recipes/ 1237075/100x141c/ 0b9c3ad1cba65869058e17cf78988bcb.jpg
  21. 21. ‘100’ ‘100x100’ ‘100x100c’ ‘100x100c40_198_137_104_300’
  22. 22. ‘100x100cq10’ ‘100x100cq30’ ‘100x100cq50’ ‘100x100cq70’ ‘100x100cq90’
  23. 23. http://d3921.image.cookpad.com/recipes/ 1237075/100x141c/ 0b9c3ad1cba65869058e17cf7 8988bcb.jpg
  24. 24. DEMO
  25. 25. Apache module (mod_tofu.so) ImageMagick(Wand) Amazon S3
  26. 26. <Location /> SetHandler tofu AWSAccessKeyId AKIXXXXX AWSSecretAccessKey XXXXXXXXXXX AWSS3BucketName my-tofu-bucket </Location> s3://my-tofu-bucket/recipes/1234/1234.jpg http://[host]/recipes/1234/[size]/[hash].jpg
  27. 27. 3
  28. 28. TOFU
  29. 29. akamai (cdn) ELB ec2 c1.xlarge Apache Apache Apache (mod_tofu) (mod_tofu) … (mod_tofu) x6 S3
  30. 30. ImageMagick OR Imlib2
  31. 31. ImageMagick or Imlib2 Imlib2 Imlib2 ImageMagick
  32. 32. ImageMagick
  33. 33. ImageMagick ImageMagick
  34. 34. EC2
  35. 35. TOFU
  36. 36. akamai (cdn) ELB Apache Apache Apache (mod_tofu) (mod_tofu) … (mod_tofu) S3
  37. 37. instance cores memory price m1.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/ $1=83yen, tokyo region
  38. 38. c1.xlarge 8 cores / 20 ECUs core c1.xlarge tofu CPU
  39. 39. S3
  40. 40. S3
  41. 41. 2011.4.12 s3::ListAllBuckets → …
  42. 42. S3
  43. 43. Akamai
  44. 44. akamai (cdn) ELB Apache Apache Apache (mod_tofu) (mod_tofu) … (mod_tofu) x6 S3
  45. 45. Akamai CDN (Contents Delivery Network) 80% 1hop SLA100%
  46. 46. Akamai OR CloudFront
  47. 47. CloudFront AWS CDN S3 EC2 Akamai (Custom Origin )
  48. 48. Akamai CloudFront 50 37.5 25 12.5 0 ping (msec) ※ just-ping.com
  49. 49. Akamai
  50. 50. Akamai
  51. 51. akamai (cdn) hit90% ELB Apache Apache Apache (mod_tofu) (mod_tofu) … (mod_tofu) S3
  52. 52. akamai (cdn) hit90% ELB 24 CACHE(?) hit60% Apache Apache Apache (mod_tofu) (mod_tofu) … (mod_tofu) S3
  53. 53. akamai (cdn) ELB Varnish Varnish Apache Apache Apache (mod_tofu) (mod_tofu) … (mod_tofu) S3
  54. 54.
  55. 55. instance cores memory price m1.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/ ……
  56. 56. akamai (cdn) ELB tofu Varnish Varnish Apache Apache ApacheApache ApacheApache (mod_tofu) (mod_tofu) … (mod_tofu) (mod_tofu) (mod_tofu) (mod_tofu) S3
  57. 57. TOFU UP →

Editor's Notes

  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • ×