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

gcpug-20150417-gcp-aws

rrreeeyyy
April 20, 2015

 gcpug-20150417-gcp-aws

「GCPを検討しているエンジニアのための Compute Engine と AWS の比較」 というタイトルで #gcpug 2015/04/17 で喋った時の資料です

rrreeeyyy

April 20, 2015
Tweet

More Decks by rrreeeyyy

Other Decks in Technology

Transcript

  1. Google Cloud Platform
    &
    Amazon Web Service
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 1

    View full-size slide

  2. Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 2

    View full-size slide

  3. ࣗݾ঺հ
    • Yoshikawa Ryota ( @rrreeeyyy )
    • גࣜձࣾϋʔτϏʔπ ( http://heartbeats.jp )
    • Managed Service Providor ͷձࣾͰ͢
    • Linux ܥͷαʔό؂ࢹ/؅ཧΛओʹ΍͍ͬͯ·͢
    • ج൫։ൃάϧʔϓ ج൫։ൃΤϯδχΞ
    • ࣗಈԽɾ؂ࢹۀʹؔΘΔϓϩμΫτ࡞੒ͳͲ͕ओͰ͢
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 3

    View full-size slide

  4. Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 4

    View full-size slide

  5. Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 5

    View full-size slide

  6. GCP ͱ AWS
    • (Google|Amazon) ͷఏڙ͢ΔΫϥ΢υαʔϏε
    • IaaS/PaaS/SaaS ͷෳ਺ͷαʔϏεΛ·ͱΊ໊ͨশ
    • GCP ͸ Google I/O 2013 Ͱൃද
    • ͱ͸ݴ͑ੲ͔Β App Engine ౳ͷαʔϏε͸͋ͬͨ
    • AWS ͸ 2006 ೥ 7 ݄ʹൃද
    • ຖ೥αʔϏε΍ϦʔδϣϯΛ௥Ճ͠ண࣮ʹ੒௕͍ͯ͠Δ
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 6

    View full-size slide

  7. ࠷ॳʹॴײ - GCP
    • GCP ͸ߴ͍ٕज़ྗΛϕʔεʹͨ͠αʔϏεల։
    • Google ͕ࣾࣗࣾͷҝʹ։ൃٕͨ͠ज़͕ΈΜͳ΋࢖͑Δ
    • ಛʹ ෼ࢄॲཧ/ෛՙ෼ࢄ/Ծ૝Խ/ίϯςφԽ/NW ... ౳͕ڧ͍
    • Google Compute Engine (& Load Balancer)
    • Google Container Engine/Google App Engine
    • Google BigQuery ౳ͷαʔϏεʹݱΕͯΔ
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 7

    View full-size slide

  8. ࠷ॳʹॴײ - AWS
    • AWS ͸ϢʔβχʔζΛϕʔεʹͨ͠αʔϏεల։
    • ࠓ΍Ϋϥ΢υͷσϑΝΫτελϯμʔυ
    • ๛෋ͳαʔϏε/ར༻ࣄྫ/ར༻஌ݟ
    • ΄ͱΜͲͷࣄ͕ AWS Ͱ׬݁Ͱ͖Δʂ
    • ஌ݟ͕๛෋ʹ͋ΓɺϢʔβ͕࡞੒ͨ͠πʔϧ΋਺ଟ͋͘Δ
    • બ΂ΔΠϯελϯελΠϓ/σʔλϕʔελΠϓ౳΋๛෋
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 8

    View full-size slide

  9. GCP ͷ֤ػೳΛ
    AWS ͷػೳͱൺֱ͠ͳ͕Β঺հ
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 9

    View full-size slide

  10. GCP - AWS αʔϏεରԠද 0
    0 http://gihyo.jp/admin/serial/01/google-cloud-platform/0001 (ࣅ͍ͯΔαʔϏεͷରԠͳͷͰҧ͏ͱ͜Ζ΋͋Γ·͢)
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 10

    View full-size slide

  11. Google Compute Engine (GCE)
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 11

    View full-size slide

  12. Google Compute Engine (GCE)
    • Google ͷ IaaS
    • ىಈ͕ͱͯ΋ૣ͍(େମ 30 ඵఔ౓)
    • ׬੒͞ΕͨϥΠϒϚΠάϨʔγϣϯ 1
    • Developer Console Λ࢖͍ϒϥ΢β͔Β SSH ૢ࡞Մೳ
    • ී௨ͷσΟεΫͷϥϯμϜ I/O ͕ૣ͍
    1 http://www.rightscale.com/blog/cloud-industry-insights/google-compute-engine-live-migration-passes-test
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 12

    View full-size slide

  13. Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 13

    View full-size slide

  14. Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 14

    View full-size slide

  15. Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 15

    View full-size slide

  16. GCE <=> Amazon EC2
    • (ΠϯελϯελΠϓ|αϙʔτ OS) ͸ EC2 ͷํ͕গ͠ଟ͍
    • ͱ͸͍͑ GCE Ͱ΋جຊతʹࠔΒͳ͍͙Β͍͋Δ
    • ϋΠεϖοΫͳΠϯελϯε͸ EC2 ͷํ͕ଟ͍
    • GCE ͔Β͸جຊతʹ͸ϝʔϧ͕ૹΕͳ͍
    • SendGrid ౳ͷ֎෦αʔϏεΛ࢖͏ 2
    2 https://cloud.google.com/compute/docs/tutorials/sending-mail
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 16

    View full-size slide

  17. GCE <=> Amazon EC2
    • EC2 ͸ϦβʔϒυΠϯελϯε/εϙοτΠϯελϯε͕͋Δ
    • ར༻ํ๏ʹΑͬͯ͸্͕҆͘Δ͜ͱ΋͋Δ͔΋
    • GCE ͸ Sustained use discounts ͕͋Δ
    • ௕͘࢖͏͚ͩͰউखʹ҆͘ͳ͍ͬͯ͘
    • GCE ͸ 1 ෼୯Ґ/ EC2 ͸ 1 ࣌ؒ୯ҐͰ՝ۚ
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 17

    View full-size slide

  18. GCE Loadbalancer
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 18

    View full-size slide

  19. GCE Loadbalancer
    • GCE/GKE(ޙड़) ౳Ͱར༻Ͱ͖Δϩʔυόϥϯαػೳ
    • Network Loadbalancer ͱ HTTP Loadbalancer ͕͋Δ
    • ΢ΥʔϜΞοϓෆཁ (google.com ͱಉ͡Πϯϑϥ)
    • 100 ສϦΫΤετ/ඵΛࡹ͚ΔϕϯνϚʔΫ݁Ռ
    • ΤοδΩϟογϡΛར༻͢Δ͜ͱ͕ग़དྷΔ 3
    3 http://qiita.com/sinmetal/items/37c105a098174fb6bf77
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 19

    View full-size slide

  20. GCE Loadbalancer <=> Amazon ELB
    • ELB
    • SSL termination ͕ग़དྷΔ(GCE ΋࣮૷༧ఆΒ͍͠)
    • Cookie Λ࢖ͬͯηογϣϯΞϑΟχςΟΛ࣮ݱͰ͖Δ
    • GCE ͷ HTTP Loadbalancer
    • ϦʔδϣϯΛ·͍ͨͩόϥϯγϯά͕ग़དྷΔ
    • ίϯςϯπϕʔεϧʔςΟϯά(URL ʹԠͨ͡ৼΓ෼͚)
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 20

    View full-size slide

  21. Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 21

    View full-size slide

  22. Google Cloud Storage
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 22

    View full-size slide

  23. Google Cloud Storage
    • Google ͷΦϒδΣΫτετϨʔδ SaaS
    • σʔλΛࣗಈతʹ҉߸Խͯ͠อଘ
    • CDN ʹ͋ͨΔ΋ͷ͕࠷ॳ͔Β෇ਵ͍ͯ͠Δ
    • Standard/Durable Reduced Availability(DRA)/Nearline ͷ3छ
    • DRA ͸ Standard ΑΓՄ༻ੑ͕௿͍͕ɺ͍҆
    • Nearline ͸҆ՁͰߴ଎ͳίʔϧυσʔλετϨʔδ
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 23

    View full-size slide

  24. Google Cloud Storage <=> Amazon S3
    • Website ͷϗεςΟϯάग़དྷΔ(྆ํ)
    • Object Change Notification ͕͋Δ
    • AWS Ͱ΋ lambda ౳ͷαʔϏεͱ࿈ܞ͢Ε͹ग़དྷͦ͏
    • Nearline ͸ Glacier ͱಉ౳ͩͱߟ͑ΔͱϨΠςϯγ͕௿͍
    • େ͖ͳࠩ͸ͳͦ͞͏ͳͷͰ࿈ܞαʔϏεʹԠͯ͡બͿͱ٢ʁ
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 24

    View full-size slide

  25. Google Cloud SQL
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 25

    View full-size slide

  26. Google Cloud SQL
    • Cloud SQL ͸ MySQL ͷΈͷαʔϏε
    • ΤϯυϙΠϯτ͸ IP ΞυϨε
    • MySQL 5.5 (5.6 ΋࢖͑Δ͕ stable Ͱ͸ͳ͍)
    • ࣗಈతͳϚΠφʔόʔδϣϯΞοϓ
    • MySQL ͕࠶ىಈ͞Ε਺ඵͷஅ͕ى͖Δ͜ͱ͕͋Δ
    • (ϑΣΠϧΦʔό|εϖοΫมߋ)΋਺ඵͰऴΘΔ
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 26

    View full-size slide

  27. Google Cloud SQL <=> Amazon RDS
    • Read Replica/Multi AZ ౳ͷجຊతͳػೳ͸྆ํ࢖͑Δ
    • RDS ͸ MySQL Ҏ֎ʹ΋৭ʑ࢖͑Δ͠ग़དྷΔࣄ΋ଟ͍
    • MySQL/Postgres/Oracle/SQL Server ...
    • Cloud SQL ͸Πϯελϯεͷىಈ͕࣌ؒૣ͍
    • ΞΫςΟϕʔγϣϯϙϦγʔ(઀ଓ͕དྷͨΒىಈɺ౳)
    • ࣗಈϚΠφʔόʔδϣϯΞοϓ
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 27

    View full-size slide

  28. Google BigQuery
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 28

    View full-size slide

  29. Google BigQuery
    • Google ͷϏοάσʔλղੳ SaaS
    • TB/PB ڃͷσʔλʹରͯ͠ SQL ϥΠΫͳΫΤϦΛൃߦͰ͖Δ
    • ਺ඵʙ਺ेඵ୯ҐͰ݁Ռ͕ฦͬͯ͘Δ
    • ՝͕ۚΫΤϦ୯Ґͱ͔ͳͷͰɺ͙͢ࢼͤΔ
    • େྔʹΫΤϦΛൃߦ͢Δͱ͔Ͱͳ͚Ε͹҆Ձ
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 29

    View full-size slide

  30. Google BigQuery <=> Amazon Redshift
    • ಉ͡ྖҬΛΧόʔ͢Δ΋ͷͷ΄΅ҧ͏αʔϏε
    • େ͖ͳձࣾͰ BI πʔϧΛ࡞ΔΑ͏ͳ࣌͸ Redshift ͕ྑͦ͞
    ͏
    • ޿͍ҙຯͰͷσʔλղੳΈ͍ͨͳͷ͸ BigQuery ͕ྑͦ͞͏
    • εέʔϧ౳ͷ഑ྀ͸ෆཁ/ׂͱ؆୯ʹ࢝ΊΒΕΔ
    • ݸਓͷײ૝Ͱ͢
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 30

    View full-size slide

  31. Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 31

    View full-size slide

  32. Google App Engine
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 32

    View full-size slide

  33. Google App Engine (GAE)
    • ݴΘͣͱ஌Εͨ Google ͷ PaaS αʔϏε
    • ΞϓϦ։ൃऀ͕࢖͍͜ͳͤΔͳΒͱͯ΋ศར
    • ΠϯϑϥΤϯδχΞ͕ډͳͯ͘΋ͳΜͱ͔ͳΔ
    • ΋ͪΖΜ PaaS ͳͷͰ IaaS ΑΓ੍ݶతʹ͸ͳͬͯΔ
    • ϩοΫΠϯ͞ΕΔ
    • ๻ΑΓৄ͍͠ਓձ৔ʹ୔ࢁ͍ΔͷͰฉ͖·͠ΐ͏ʂ
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 33

    View full-size slide

  34. Google Container Engine
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 34

    View full-size slide

  35. Google Container Engine (GKE), Amazon ECS
    • GKE ͸ GCP ্ʹ Docker ίϯςφΛల։Ͱ͖ΔαʔϏε
    • Kubernetes ( http://kubernetes.io ) Ͱ؅ཧ͞ΕΔ
    • k8s ͸ OSS ͳͷͰ࢖ͬͯΔͳΒ͙͢ҠߦͰ͖Δ
    • ECS ΋ AWS ্ʹ Docker ίϯςφΛల։Ͱ͖ΔαʔϏε
    • json ͰઃఆϑΝΠϧΛॻ͖ίϯςφΛ഑ஔ
    • ͜Ε͔ΒͷྖҬͳͷͰظ଴
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 35

    View full-size slide

  36. ྉۚʹ͍ͭͯ
    • αʔϏε΍ܖ໿΍௨৴ྉ΍࢖͍ํ࣍ୈ
    • ͲΕ͘Β͍ͷظؒ࢖͏͔
    • Ͳͷ͘Β͍ͷ௨৴ྉ͕ൃੜ͢Δ͔
    • ڝͬͯΔͷͰ౎౓ܭࢉ͢Δͱྑ͍͔΋
    • ͲͪΒ͕ѹ౗తʹߴ͍/͍҆ͱ͍͏͜ͱ͸ແͦ͞͏
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 36

    View full-size slide

  37. ͲΜͳਓʹ޲͍ͯΔ͔(GCE/AWS/...)
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 37

    View full-size slide

  38. GCP ͕޲͍ͯͦ͏ (ྫ)
    • ৽͍͠΋ͷ͕޷͖ͳਓ
    • όʔεττϥϑΟοΫ͕ൃੜ͢ΔαʔϏε
    • Πϯελϯεͷىಈ/ෳ੡౳͕සൟʹൃੜ͢ΔαʔϏε
    • ඞཁͳཁ݅ʹԠͯࣗ͡෼ͰOSS/֎෦αʔϏεΛ࢖͑Δਓ
    • ྫ͑͹શจݕࡧαʔϏεͱ͔͸ GCP ʹ͸ࠓ͸ແ͍
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 38

    View full-size slide

  39. AWS ͕޲͍ͯͦ͏ (ྫ)
    • ౦ژ͔ΒͷϨΠςϯγ͕ؾʹͳΔਓ (GCP ͷ࠷دΓ͸ asia)
    • ͳΔ΂͘ 1 ͭͷαʔϏεͰ৭ʑͳཁ݅Λୡ੒͍ͨ͠ਓ
    • αϙʔτ΍पล/աڈͷ஌ݟɾπʔϧΛ࢖͍͍ͨਓ
    • EC2/ELB/RDS ͷߏ੒ҊͷΑ͏ͳ஌ݟ΋୔ࢁ͋Δ
    • MySQL 5.6 Ҏ্΍ͦΕҎ֎ͷ DB PaaS Λ࢖͍͍ͨਓ
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 39

    View full-size slide

  40. એ఻
    • ݁ہͲͬͪΛ࢖͍͍͔ͬͯ෼͔Βͳ͔ͬͨͱ͍͏ํ
    • GCP ࢖ͬͯΈ͍͚ͨͲΠϯϑϥͷઃఆͳͲ೚͍ͤͨͱ͍͏ํ
    • => ฐࣾ·Ͱ͝༻໋͍ͩ͘͞ʂ
    • ৭ʑͳΫϥ΢υΛ৮ͬͯΈ͍ͨํ
    • ৮্ͬͨͰ͓٬༷ͷαʔϏεʹର͠ద੾ʹఏҊͯ͠Έ͍ͨํ
    • => ٻਓதͰ͢ͷͰԠืԼ͍͞ʂ
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 40

    View full-size slide

  41. એ఻ 2
    • ձࣾͷϒϩάʹ΋ GCP ͷ͜ͱॻ͍ͯ·͢
    • http://heartbeats.jp/hbblog/gcp/
    • CTO ͷഅ৔ (@netmarkjp) ͕ gihyo.jp Ͱ GCP ͷ࿈ࡌதͰ͢
    • http://gihyo.jp/admin/serial/01/google-cloud-platform
    Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 41

    View full-size slide