Introduction to Google Compute Engine

2,102 views

Published on

Published in: Technology

Introduction to Google Compute Engine

  1. 1. Getting Started with Google's Infrastructure ! ! ! ! 
 +ColinSu Developer Expert, Google Cloud Platform A Tour of Google Compute Engine
  2. 2. Google Cloud Platform Slides are available on slideshare.net goo.gl/ARRyaq
  3. 3. Google Cloud Platform Overview Google Cloud Platform
  4. 4. Google Cloud Platform The best way how Google share their + Cloud Infrastructure + Cloud Knowledge + Cloud Engineers Your own data center, with minimum cost as possible as it could be What is Google Cloud Platform
  5. 5. Google Cloud Platform You will be using Google's Infrastructure
 Virtual Machines
 Networking
 Storage And be placed in a safe place
 Google's Data Center And Google will do those for you
 Scaling
 Migrating
 Maintenance
 Take over anything you don't wanna do
 Powered by Google
  6. 6. Google Cloud Platform Google Cloud Family
  7. 7. Google Cloud Platform Manage all API services on Google Cloud 
 (e.g. Translation API, Prediction API, Maps API...) Compose equivalent commands for:
 Command-line tools (Google Cloud SDK)
 RESTful API Dashboard for monitoring all resources on Google Cloud Platform Cloud Developer Console
  8. 8. Google Cloud Platform Install/uninstall/upgrade all command-line tools related to Google Cloud Platform Notification for new release of any Cloud SDK component Automatization Google Cloud SDK
  9. 9. Google Cloud Platform Storage Storage Services in Google Cloud Platform
  10. 10. Google Cloud Platform It's MySQL, but managed by Google Relational Data Storage on Google Cloud Use Cases + LAMP Applications + Google App Engine Cloud SQL
  11. 11. Google Cloud Platform Non-relational database (NoSQL) Schema-less data Use Cases + Highly scalable application Cloud Datastore
  12. 12. Google Cloud Platform Protected
 Your data is protected at multiple physical locations Strong, configurable security
 OAuth or simple access control on your data Multiple usages + Serve static objects directly + Use with other Google Cloud products (Bridge) Cloud Storage
  13. 13. Google Cloud Platform Google Compute Engine Infrastructure-as-a-Service in Google Cloud Platform
  14. 14. Google Cloud Platform Google has resources + CPU Cores + Memory + Networking + Persistency (Disks, Snapshot, Cloud Storage...) + Well-trained engineering monkeys You have business and be busy Infrastucture-as-a-Service
  15. 15. Google Cloud Platform High-performance virtual machines
 from micro-VM to large instance Powered by Google's global network
 you could build a large cluster with strong and consistent bandwidth, provided by Google Load Balancing
 spread incoming traffic across instances Fast Bullet Reloading
 quick deployment of large VMs
 command-line interface
 web-based console Highly secured
 All data written to disk in Compute Engine will be encrypted by high-class encryption algorithm Google Compute Engine
  16. 16. Google Cloud Platform KVM-based Virtual machines Fast booting time
 routinely takes less than 30 secs Various OS support Various machine types Instances on GCE http://gce-demos.appspot.com
  17. 17. Google Cloud Platform Operating Systems
  18. 18. Google Cloud Platform Operating Systems
  19. 19. Google Cloud Platform Operating Systems Limited Preview
  20. 20. Google Cloud Platform Operating Systems Limited Preview
  21. 21. Google Cloud Platform a unit of CPU capacity used to describe the compute power of instance types 2.75 GCEUs = 1 minimum power of 1 logical core on Sandy Bridge platform Google Compute Engine Units (GCEUs) =
  22. 22. Google Cloud Platform Machine Types (Shared-Core) f1-micro Shared Core 0.6 GB Memory g1-small 1 Core 1.7 GB Memory 1.38 GCEUs
  23. 23. Google Cloud Platform Machine Types (Standard) n1-standard-n Starts from 1 Core Start from 3.75 GB Memory n Virtual CPUs Memory GCEUs 1 1 3.75 GB 2.75 2 2 7.50 GB 5.50 4 4 15 GB 11 8 8 30 GB 30 16 16 60 GB 60
  24. 24. Google Cloud Platform Machine Types (High Memory) n1-highmem-n Starts from 2 Core Start from 13 GB Memory n Virtual CPUs Memory GCEUs 2 2 13 GB 5.50 4 4 26 GB 11 8 8 52 GB 22 16 16 104 GB 44
  25. 25. Google Cloud Platform Machine Types (High CPU) n1-highcpu-n Starts from 2 Core Start from 1.8 GB Memory n Virtual CPUs Memory GCEUs 2 2 1.8 GB 5.50 4 4 3.6 GB 11 8 8 7.2 GB 22 16 16 14.4 GB 44
  26. 26. Google Cloud Platform Regions & Zones us-central1-a
 us-central1-b europe-west1-a
 europe-west1-b
  27. 27. Google Cloud Platform Regions & Zones us-central1-a
 us-central1-b europe-west1-a
 europe-west1-b Singapore? asia-east-a
 asia-east-b
  28. 28. Google Cloud Platform Transparent Maintenance Auto restart instances shutdown by system events During transparent maintenance, you could set GCE to handle your instance in two ways: + Live migrate
 affect performance in some degree
 but remain your instances online (no downtime) + Terminate and reboot Live Migration
  29. 29. Google Cloud Platform Virtual SCSI device Block Storage Persistent until deleted Hot-plug to GCE instances (attach/deattach) Persistent Disk
  30. 30. Google Cloud Platform Primary Disk: OS boot volume Persistent Disk Mode GCE Virtual Machine Root Stateful Root Volume
  31. 31. Google Cloud Platform Additional Disk: Read/Write Mode for user managed data volume Persistent Disk Mode GCE Virtual Machine Root Stateful Root Volume RW Data Stateful Data Volume
  32. 32. Google Cloud Platform Distribution Disk: Instant distribution of static content Persistent Disk Mode GCE Virtual Machine RO Data Read-Only Data Volume GCE Virtual MachineGCE Virtual Machine
  33. 33. Google Cloud Platform Target Pools Health Checking Forwarding Rules
 iptables for target pools Load Balancing
  34. 34. Google Cloud Platform CGE reserved IP for instance, won't change with the reboot of VMs You can promote ephemeral IP to persistent IP no DNS changing anymore Persistent IP Addresses
  35. 35. Google Cloud Platform Networking is first-class object on GCE
 which means you could apply/unapply it anytime easily pre-defined networks before the first instance started Integrated Networking
  36. 36. Google Cloud Platform Those resources are global resources + Images (OS Images) + Snapshots + Network + Firewalls + Routes And they're also first-class object in GCE Multi-Region Resources
  37. 37. Google Cloud Platform Scalr Right Scale Services Host GCE
  38. 38. Google Cloud Platform Benchmark How Google Compute Engine performs?
  39. 39. Google Cloud Platform Benchmarks - Sequential I/O w/ a well-known and you-know competitor http://github.com/Scalr/perf-benchmarks
  40. 40. Google Cloud Platform Volume I/O GCE EC2 Writes on ephemeral 175 MB/s 38-45 MB/s Reads on ephemeral 93.3 MB/s 100-110 MB/s Writes on persistent 84.5 MB/s 35-45 MB/s Reads on persistent 98.9 MB/s 80-100 MB/s http://gigaom.com/2013/03/15/by-the-numbers-how-google-compute-engine-stacks-up-to-amazon-ec2/ w/ a well-known and you-know competitor
  41. 41. Google Cloud Platform Fast Booting Time http://gigaom.com/2013/03/15/by-the-numbers-how-google-compute-engine-stacks-up-to-amazon-ec2/ w/ a well-known and you-know competitor
  42. 42. Google Cloud Platform Network Bandwidth & Latency http://gigaom.com/2013/03/15/by-the-numbers-how-google-compute-engine-stacks-up-to-amazon-ec2/ w/ a well-known and you-know competitor
  43. 43. Google Cloud Platform Machine Types (Shared-Core) & Pricing
  44. 44. Google Cloud Platform Machine Types (Standard) & Pricing
  45. 45. Google Cloud Platform Machine Types (High Memory) & Pricing
  46. 46. Google Cloud Platform Machine Types (High CPU) & Pricing
  47. 47. Google Cloud Platform Other Pricing https://developers.google.com/compute/pricing
  48. 48. Google Cloud Platform Limited Preview Projects Sealed Projects with Google Compute Engine
  49. 49. Google Cloud Platform Create and manage a large number of homogeneous resources Set up health checking to ensure you will have certain number of heathy instance to serve requests config-based tool Replica Pool Limited Preview
  50. 50. Google Cloud Platform Replica Pool Limited Preview Pool Resource GCE Virtual Machine GCE Virtual MachineGCE Virtual Machine Replica Resource Replica Resource Replica Resource
  51. 51. Google Cloud Platform Replica Pool Configuration Limited Preview {! "name": POOLNAME,! "type": "SMART_VM",! "initialNumReplicas": "3",! "template": {! "vmParams": {! "machineType": "n1-standard-1",! "baseInstanceName": "my-replica",! "disksToCreate": [{! "boot": "true",! "mode": "READ_WRITE",! "initializeParams": {! "sourceImage": IMAGE_URI,! "diskSizeGb": "100"! }! }],! "networkInterfaces": [{! "network": "default",! "accessConfigs": [{! "type": "ONE_TO_ONE_NAT",! "name": "External NAT"! }]! }]! }! }! }!
  52. 52. Google Cloud Platform Useful Template Settings Limited Preview "action": {! "name": "install-apache",! "commands": [! "sudo apt-get update"! "sudo apt-get install apache"! ...! ],! "envVariables: [! ...! ]! }! "template.action": specify Linux command that will run on your instances after deployed
  53. 53. Google Cloud Platform Useful Template Settings Limited Preview "baseInstanceName": "my-vm-replicas"! "template.vmParams.baseInstanceName": The base instance name to use for these replicas
  54. 54. Google Cloud Platform Useful Template Settings Limited Preview "disksToAttach": [{! "source": "full-uri-to-disk",! "mode": "read-only",! "type": "PERSISTENT",! }! ]! "template.vmParams.disksToAttach[]": Attaches persistent disks to your replicas
  55. 55. Google Cloud Platform Health Checking Limited Preview "healthChecks": [{! "name": "testhealth",! "path": "localhost/healthCheck"! }]! Make sure all instance are healthy, if not, Pool will create more instances until it satisfies
  56. 56. Google Cloud Platform Health Checking Options Limited Preview checkIntervalSec
 Determines how often, in seconds, to make HTTP requests for the health check. healthyThreshold
 Sets the number of consecutive health check requests that must succeed before the replica is considered healthy. The default is 2 successful consecutive health checks. timeoutSec
 How long to wait in seconds before claiming failures for a health check. unhealthyThreshold
 The number of consecutive health check requests that need to fail to consider the replica unhealthy. Only a HTTP 2xx response is considered successful.
  57. 57. Google Cloud Platform Windows Server Images
 https://developers.google.com/compute/docs/premium-operating-systems SSD Persistent Disks
 https://developers.google.com/compute/docs/disks#typeofdisks Advanced Routing
 https://developers.google.com/compute/docs/networking#routing Push-to-deploy
 https://developers.google.com/appengine/docs/push-to-deploy Other Limited Preview Projects
  58. 58. Google Cloud Platform Technical Detail of Google Compute Engine
 http://commondatastorage.googleapis.com/io2012/presentations/live%20to%20website/313.pdf Github Google Cloud Platform Team
 http://googlecloudplatform.github.io/ Resources
  59. 59. Google Cloud Platform EOF 
 Thanks For Listening
 +GDGTaipei
  60. 60. Google Cloud Platform Questions?
  61. 61. Google Cloud Platform Interested? Search "google cloud starter pack", use promo code: gcpteam-in

×