gcpug-20150417-gcp-aws

28e154e6e0351c70091997d2f574295a?s=47 rrreeeyyy
April 20, 2015

 gcpug-20150417-gcp-aws

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

28e154e6e0351c70091997d2f574295a?s=128

rrreeeyyy

April 20, 2015
Tweet

Transcript

  1. 1.

    Google Cloud Platform & Amazon Web Service Google Cloud Platform

    & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 1
  2. 3.

    ࣗݾ঺հ • Yoshikawa Ryota ( @rrreeeyyy ) • גࣜձࣾϋʔτϏʔπ (

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

    ࠷ॳʹॴײ - AWS • AWS ͸ϢʔβχʔζΛϕʔεʹͨ͠αʔϏεల։ • ࠓ΍Ϋϥ΢υͷσϑΝΫτελϯμʔυ • ๛෋ͳαʔϏε/ར༻ࣄྫ/ར༻஌ݟ

    • ΄ͱΜͲͷࣄ͕ AWS Ͱ׬݁Ͱ͖Δʂ • ஌ݟ͕๛෋ʹ͋ΓɺϢʔβ͕࡞੒ͨ͠πʔϧ΋਺ଟ͋͘Δ • બ΂ΔΠϯελϯελΠϓ/σʔλϕʔελΠϓ౳΋๛෋ Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 8
  6. 9.

    GCP ͷ֤ػೳΛ AWS ͷػೳͱൺֱ͠ͳ͕Β঺հ Google Cloud Platform & Amazon Web

    Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 9
  7. 11.

    Google Compute Engine (GCE) Google Cloud Platform & Amazon Web

    Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 11
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 22.

    Google Cloud Storage Google Cloud Platform & Amazon Web Service

    (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 22
  14. 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
  15. 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
  16. 25.

    Google Cloud SQL Google Cloud Platform & Amazon Web Service

    (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 25
  17. 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
  18. 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
  19. 29.

    Google BigQuery • Google ͷϏοάσʔλղੳ SaaS • TB/PB ڃͷσʔλʹରͯ͠ SQL

    ϥΠΫͳΫΤϦΛൃߦͰ͖Δ • ਺ඵʙ਺ेඵ୯ҐͰ݁Ռ͕ฦͬͯ͘Δ • ՝͕ۚΫΤϦ୯Ґͱ͔ͳͷͰɺ͙͢ࢼͤΔ • େྔʹΫΤϦΛൃߦ͢Δͱ͔Ͱͳ͚Ε͹҆Ձ Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 29
  20. 30.

    Google BigQuery <=> Amazon Redshift • ಉ͡ྖҬΛΧόʔ͢Δ΋ͷͷ΄΅ҧ͏αʔϏε • େ͖ͳձࣾͰ BI

    πʔϧΛ࡞ΔΑ͏ͳ࣌͸ Redshift ͕ྑͦ͞ ͏ • ޿͍ҙຯͰͷσʔλղੳΈ͍ͨͳͷ͸ BigQuery ͕ྑͦ͞͏ • εέʔϧ౳ͷ഑ྀ͸ෆཁ/ׂͱ؆୯ʹ࢝ΊΒΕΔ • ݸਓͷײ૝Ͱ͢ Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 30
  21. 32.

    Google App Engine Google Cloud Platform & Amazon Web Service

    (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 32
  22. 33.

    Google App Engine (GAE) • ݴΘͣͱ஌Εͨ Google ͷ PaaS αʔϏε

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

    Google Container Engine Google Cloud Platform & Amazon Web Service

    (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 34
  24. 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
  25. 36.

    ྉۚʹ͍ͭͯ • αʔϏε΍ܖ໿΍௨৴ྉ΍࢖͍ํ࣍ୈ • ͲΕ͘Β͍ͷظؒ࢖͏͔ • Ͳͷ͘Β͍ͷ௨৴ྉ͕ൃੜ͢Δ͔ • ڝͬͯΔͷͰ౎౓ܭࢉ͢Δͱྑ͍͔΋ •

    ͲͪΒ͕ѹ౗తʹߴ͍/͍҆ͱ͍͏͜ͱ͸ແͦ͞͏ Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 36
  26. 38.

    GCP ͕޲͍ͯͦ͏ (ྫ) • ৽͍͠΋ͷ͕޷͖ͳਓ • όʔεττϥϑΟοΫ͕ൃੜ͢ΔαʔϏε • Πϯελϯεͷىಈ/ෳ੡౳͕සൟʹൃੜ͢ΔαʔϏε •

    ඞཁͳཁ݅ʹԠͯࣗ͡෼ͰOSS/֎෦αʔϏεΛ࢖͑Δਓ • ྫ͑͹શจݕࡧαʔϏεͱ͔͸ GCP ʹ͸ࠓ͸ແ͍ Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 38
  27. 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
  28. 40.

    એ఻ • ݁ہͲͬͪΛ࢖͍͍͔ͬͯ෼͔Βͳ͔ͬͨͱ͍͏ํ • GCP ࢖ͬͯΈ͍͚ͨͲΠϯϑϥͷઃఆͳͲ೚͍ͤͨͱ͍͏ํ • => ฐࣾ·Ͱ͝༻໋͍ͩ͘͞ʂ •

    ৭ʑͳΫϥ΢υΛ৮ͬͯΈ͍ͨํ • ৮্ͬͨͰ͓٬༷ͷαʔϏεʹର͠ద੾ʹఏҊͯ͠Έ͍ͨํ • => ٻਓதͰ͢ͷͰԠืԼ͍͞ʂ Google Cloud Platform & Amazon Web Service (2015/04/17) - Yoshikawa Ryota ( @rrreeeyyy ) 40
  29. 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