SlideShare a Scribd company logo
1 of 93
@mirakui
BEFORE TOFU

               app
               app
                app




              apache
              apache
800
  …
800
  …
800




7,000   /sec
IDC→EC
2
BEFORE TOFU

               app
               app
                app



       NFS




              apache
              apache
BEFORE TOFU

               app
               app
                app



       NFS




              apache
              apache
BEFORE TOFU

               app
               app
                app



       NFS




              apache
              apache
BEFORE TOFU

               app
               app
                app



       NFS




              apache
              apache
NFS
S3
99.999999999%
TOFU
BEFORE TOFU

               app
               app
                app




              apache
              apache
AFTER TOFU

             app
             app
              app




             TOFU
             apache
http://d3921.image.cookpad.com/recipes/
          1237075/100x141c/
0b9c3ad1cba65869058e17cf78988bcb.jpg
http://d3921.image.cookpad.com/recipes/
            1237075/100x141c/
  0b9c3ad1cba65869058e17cf78988bcb.jpg
ID




http://d3921.image.cookpad.com/recipes/
       1237075/100x141c/
0b9c3ad1cba65869058e17cf78988bcb.jpg
http://d3921.image.cookpad.com/recipes/
       1237075/100x141c/
0b9c3ad1cba65869058e17cf78988bcb.jpg
‘100’



‘100x100’


‘100x100c’


‘100x100c40_198_137_104_300’
‘100x100cq10’

‘100x100cq30’

‘100x100cq50’

‘100x100cq70’

‘100x100cq90’
http://d3921.image.cookpad.com/recipes/
          1237075/100x141c/
0b9c3ad1cba65869058e17cf7
        8988bcb.jpg
DEMO
Apache module (mod_tofu.so)




 ImageMagick(Wand)




 Amazon S3
<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
3
TOFU
akamai (cdn)

               ELB
                                          ec2
                                          c1.xlarge
Apache     Apache            Apache
(mod_tofu) (mod_tofu)   …    (mod_tofu)   x6


                        S3
ImageMagick
    OR
  Imlib2
ImageMagick or Imlib2
               Imlib2


Imlib2




          ImageMagick
ImageMagick
ImageMagick




  ImageMagick
EC2
TOFU
akamai (cdn)

               ELB


Apache     Apache            Apache
(mod_tofu) (mod_tofu)   …    (mod_tofu)




                        S3
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
c1.xlarge

8 cores / 20 ECUs

core                c1.xlarge


tofu CPU
S3
S3
2011.4.12
s3::ListAllBuckets




→
  …
S3
Akamai
akamai (cdn)

               ELB


Apache     Apache            Apache
(mod_tofu) (mod_tofu)   …    (mod_tofu)
                                          x6


                        S3
Akamai
                         CDN
(Contents Delivery Network)




                   80%   1hop
           SLA100%
Akamai
OR
CloudFront
CloudFront

AWS      CDN


S3                   EC2


Akamai
(Custom Origin   )
Akamai     CloudFront

 50


37.5


 25


12.5


  0

                ping (msec)



            ※      just-ping.com
Akamai
Akamai
akamai (cdn)                     hit90%

               ELB


Apache     Apache            Apache
(mod_tofu) (mod_tofu)   …    (mod_tofu)




                        S3
akamai (cdn)                     hit90%

               ELB                        24


           CACHE(?)
                                     hit60%
Apache     Apache            Apache
(mod_tofu) (mod_tofu)   …    (mod_tofu)




                        S3
akamai (cdn)

               ELB


     Varnish            Varnish


Apache     Apache            Apache
(mod_tofu) (mod_tofu)    …   (mod_tofu)




                        S3
…
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/


                                          ……
akamai (cdn)

               ELB                  tofu



     Varnish            Varnish


Apache     Apache            ApacheApache
                                ApacheApache
(mod_tofu) (mod_tofu)    …   (mod_tofu) (mod_tofu)
                                 (mod_tofu)
                                     (mod_tofu)




                        S3
TOFU


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

More Related Content

What's hot

What's hot (20)

マイクロサービス 4つの分割アプローチ
マイクロサービス 4つの分割アプローチマイクロサービス 4つの分割アプローチ
マイクロサービス 4つの分割アプローチ
 
初心者向けMongoDBのキホン!
初心者向けMongoDBのキホン!初心者向けMongoDBのキホン!
初心者向けMongoDBのキホン!
 
DDDのモデリングとは何なのか、 そしてどうコードに落とすのか
DDDのモデリングとは何なのか、 そしてどうコードに落とすのかDDDのモデリングとは何なのか、 そしてどうコードに落とすのか
DDDのモデリングとは何なのか、 そしてどうコードに落とすのか
 
ビジネスパーソンのためのDX入門講座エッセンス版
ビジネスパーソンのためのDX入門講座エッセンス版ビジネスパーソンのためのDX入門講座エッセンス版
ビジネスパーソンのためのDX入門講座エッセンス版
 
ホットペッパービューティーにおけるモバイルアプリ向けAPIのBFF/Backend分割
ホットペッパービューティーにおけるモバイルアプリ向けAPIのBFF/Backend分割ホットペッパービューティーにおけるモバイルアプリ向けAPIのBFF/Backend分割
ホットペッパービューティーにおけるモバイルアプリ向けAPIのBFF/Backend分割
 
信頼性とアジリティを同時に上げろ!モノタロウのカナリアリリース導入.pdf
信頼性とアジリティを同時に上げろ!モノタロウのカナリアリリース導入.pdf信頼性とアジリティを同時に上げろ!モノタロウのカナリアリリース導入.pdf
信頼性とアジリティを同時に上げろ!モノタロウのカナリアリリース導入.pdf
 
DiI/DIコンテナを一から学んでみた
DiI/DIコンテナを一から学んでみたDiI/DIコンテナを一から学んでみた
DiI/DIコンテナを一から学んでみた
 
MySQL Casual Talks Vol.4 「MySQL-5.6で始める全文検索 〜InnoDB FTS編〜」
MySQL Casual Talks Vol.4 「MySQL-5.6で始める全文検索 〜InnoDB FTS編〜」MySQL Casual Talks Vol.4 「MySQL-5.6で始める全文検索 〜InnoDB FTS編〜」
MySQL Casual Talks Vol.4 「MySQL-5.6で始める全文検索 〜InnoDB FTS編〜」
 
新たなgitのブランチモデル「Git Feature Flow」!Git Flow,Git Hub Flow,Git Lab Flowを超えれるか?
新たなgitのブランチモデル「Git Feature Flow」!Git Flow,Git Hub Flow,Git Lab Flowを超えれるか?新たなgitのブランチモデル「Git Feature Flow」!Git Flow,Git Hub Flow,Git Lab Flowを超えれるか?
新たなgitのブランチモデル「Git Feature Flow」!Git Flow,Git Hub Flow,Git Lab Flowを超えれるか?
 
ドメイン駆動設計 本格入門
ドメイン駆動設計 本格入門ドメイン駆動設計 本格入門
ドメイン駆動設計 本格入門
 
概念モデリング再入門 + DDD
概念モデリング再入門 + DDD概念モデリング再入門 + DDD
概念モデリング再入門 + DDD
 
O/Rマッパーによるトラブルを未然に防ぐ
O/Rマッパーによるトラブルを未然に防ぐO/Rマッパーによるトラブルを未然に防ぐ
O/Rマッパーによるトラブルを未然に防ぐ
 
マイクロサービス化に向けて
マイクロサービス化に向けてマイクロサービス化に向けて
マイクロサービス化に向けて
 
PMBOKガイド7をアジャイル屋はどう迎え撃つか?
PMBOKガイド7をアジャイル屋はどう迎え撃つか?PMBOKガイド7をアジャイル屋はどう迎え撃つか?
PMBOKガイド7をアジャイル屋はどう迎え撃つか?
 
マスターデータの キャッシュシステムの改善の話
マスターデータの キャッシュシステムの改善の話マスターデータの キャッシュシステムの改善の話
マスターデータの キャッシュシステムの改善の話
 
Redisの特徴と活用方法について
Redisの特徴と活用方法についてRedisの特徴と活用方法について
Redisの特徴と活用方法について
 
MongoDBが遅いときの切り分け方法
MongoDBが遅いときの切り分け方法MongoDBが遅いときの切り分け方法
MongoDBが遅いときの切り分け方法
 
SQL上級者こそ知って欲しい、なぜO/Rマッパーが重要か?
SQL上級者こそ知って欲しい、なぜO/Rマッパーが重要か?SQL上級者こそ知って欲しい、なぜO/Rマッパーが重要か?
SQL上級者こそ知って欲しい、なぜO/Rマッパーが重要か?
 
各種データベースの特徴とパフォーマンス比較
各種データベースの特徴とパフォーマンス比較各種データベースの特徴とパフォーマンス比較
各種データベースの特徴とパフォーマンス比較
 
アジャイルにモデリングは必要か
アジャイルにモデリングは必要かアジャイルにモデリングは必要か
アジャイルにモデリングは必要か
 

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

Bare Metal Cloud: 実マシンを提供するクラウドサービス (SWoPP 2010)
Bare Metal Cloud: 実マシンを提供するクラウドサービス (SWoPP 2010)Bare Metal Cloud: 実マシンを提供するクラウドサービス (SWoPP 2010)
Bare Metal Cloud: 実マシンを提供するクラウドサービス (SWoPP 2010)
Yasuhito Takamiya
 
Camel Kafka Connectors: Tune Kafka to “Speak” with (Almost) Everything (Andre...
Camel Kafka Connectors: Tune Kafka to “Speak” with (Almost) Everything (Andre...Camel Kafka Connectors: Tune Kafka to “Speak” with (Almost) Everything (Andre...
Camel Kafka Connectors: Tune Kafka to “Speak” with (Almost) Everything (Andre...
HostedbyConfluent
 
ドワンゴでのScala活用事例「ニコニコandroid」
ドワンゴでのScala活用事例「ニコニコandroid」ドワンゴでのScala活用事例「ニコニコandroid」
ドワンゴでのScala活用事例「ニコニコandroid」
Satoshi Goto
 
Introduction to Apache Camel
Introduction to Apache CamelIntroduction to Apache Camel
Introduction to Apache Camel
FuseSource.com
 

Similar to 料理を楽しくする画像配信システム (20)

EC2とVarnishで画像配信
EC2とVarnishで画像配信EC2とVarnishで画像配信
EC2とVarnishで画像配信
 
tofu - COOKPAD's image system
tofu - COOKPAD's image systemtofu - COOKPAD's image system
tofu - COOKPAD's image system
 
Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - Deployment
 
Deployment de Rails
Deployment de RailsDeployment de Rails
Deployment de Rails
 
Bare Metal Cloud: 実マシンを提供するクラウドサービス (SWoPP 2010)
Bare Metal Cloud: 実マシンを提供するクラウドサービス (SWoPP 2010)Bare Metal Cloud: 実マシンを提供するクラウドサービス (SWoPP 2010)
Bare Metal Cloud: 実マシンを提供するクラウドサービス (SWoPP 2010)
 
Apache Sling - The whys and the hows
Apache Sling - The whys and the howsApache Sling - The whys and the hows
Apache Sling - The whys and the hows
 
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integration
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integrationSouJava May 2020: Apache Camel 3 - the next generation of enterprise integration
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integration
 
Golang Performance : microbenchmarks, profilers, and a war story
Golang Performance : microbenchmarks, profilers, and a war storyGolang Performance : microbenchmarks, profilers, and a war story
Golang Performance : microbenchmarks, profilers, and a war story
 
Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...
Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...
Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...
 
Camel Kafka Connectors: Tune Kafka to “Speak” with (Almost) Everything (Andre...
Camel Kafka Connectors: Tune Kafka to “Speak” with (Almost) Everything (Andre...Camel Kafka Connectors: Tune Kafka to “Speak” with (Almost) Everything (Andre...
Camel Kafka Connectors: Tune Kafka to “Speak” with (Almost) Everything (Andre...
 
ドワンゴでのScala活用事例「ニコニコandroid」
ドワンゴでのScala活用事例「ニコニコandroid」ドワンゴでのScala活用事例「ニコニコandroid」
ドワンゴでのScala活用事例「ニコニコandroid」
 
Continuous Deployment at Spreaker
Continuous Deployment at SpreakerContinuous Deployment at Spreaker
Continuous Deployment at Spreaker
 
10 Lessons Learned from using Kafka in 1000 microservices - ScalaUA
10 Lessons Learned from using Kafka in 1000 microservices - ScalaUA10 Lessons Learned from using Kafka in 1000 microservices - ScalaUA
10 Lessons Learned from using Kafka in 1000 microservices - ScalaUA
 
Apache Sparkにおけるメモリ - アプリケーションを落とさないメモリ設計手法 -
Apache Sparkにおけるメモリ - アプリケーションを落とさないメモリ設計手法 -Apache Sparkにおけるメモリ - アプリケーションを落とさないメモリ設計手法 -
Apache Sparkにおけるメモリ - アプリケーションを落とさないメモリ設計手法 -
 
Jazoon 2011 - Smart EAI with Apache Camel
Jazoon 2011 - Smart EAI with Apache CamelJazoon 2011 - Smart EAI with Apache Camel
Jazoon 2011 - Smart EAI with Apache Camel
 
TorqueBox at DC:JBUG - November 2011
TorqueBox at DC:JBUG - November 2011TorqueBox at DC:JBUG - November 2011
TorqueBox at DC:JBUG - November 2011
 
Sparklife - Life In The Trenches With Spark
Sparklife - Life In The Trenches With SparkSparklife - Life In The Trenches With Spark
Sparklife - Life In The Trenches With Spark
 
Introduction to Apache Camel
Introduction to Apache CamelIntroduction to Apache Camel
Introduction to Apache Camel
 
Cloudpack
CloudpackCloudpack
Cloudpack
 
Can we run the Whole Web on Apache Sling?
Can we run the Whole Web on Apache Sling?Can we run the Whole Web on Apache Sling?
Can we run the Whole Web on Apache Sling?
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

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

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. \n
  65. \n
  66. \n
  67. \n
  68. \n
  69. \n
  70. \n
  71. \n
  72. \n
  73. \n
  74. \n
  75. \n
  76. \n
  77. \n
  78. \n
  79. \n
  80. \n
  81. \n
  82. \n
  83. \n
  84. \n
  85. \n
  86. \n
  87. \n
  88. \n
  89. \n
  90. \n
  91. \n
  92. \n
  93. \n
  94. \n
  95. \n
  96. \n