Skip to content

Compute

https://cloud.google.com/compute/docs/

  • Compute Engine
  • App Engine
  • Kubernetes Engine
  • Cloud Functions

Compute Engine

  • Low cost. Google bills in minute level increments
  • Automatic sustained use discounts
  • Global private fiber network
  • Connection between data centers on private high speed connections
  • Same network infrastucture used by Gogle
  • Resize disks with no downtime
  • Pre-emptible VMs as well as Custom machine types (CPU/Memory spec)
  • Create metadata / Startup scripts

Instances

  • Name Should be unique within project
  • Only lowercase, numbers and hypeen
  • Instances can not be moved to differenct zones after created
  • Disk size can not be reduced than the image size
  • Identity and API access
    • Service Account
    • Access Scopes (default, full and custom)
  • Preemptibility VM
    • Last only 24 hours
    • Up to 80% cheaper
  • Automatic Restart
    • Autorestarted if terminated by non-user initiated reasons
  • On host maintenance
    • During maintenance, it moves to another hardware without downtime
  • Tags are network firewall rules assigned to instances
  • Lables are equivalent of tags in aws
  • Intance Groups
    • Managed Groups
      • Automatically Scale up and down as needed
      • Work with load balancers
      • If a instance dies, it it auto recreated
    • Instance templates define and deply the group

Instance Metadata

< http://metadata.google.internal/computeMetadata/v1/instance/>

4!lwXIO1F8S5 4!lwXIO1F8S5

App Engine:

  • Managed Service
  • Has two Envoronments
    • Standard
    • Flexible

Standard

Flexible

  • Instances are health-checked, healed as necessary, and co-located with other services within the project.
  • Critical, backwards compatible updates are automatically applied to the underlying operating system.
  • VM instances are automatically located by geographical region according to the settings in your project. Google's management services ensure that all of a project's VM instances are co-located for optimal performance.
  • VM instances are restarted on a weekly basis. During restarts Google's management services will apply any necessary operating system and security updates.
  • You always have root access to Compute Engine VM instances. SSH access to VM instances in the flexible environment is disabled by default. If you choose, you can enable root access to your app's VM instances.

Cloud Functions

Google Cloud Functions is a serverless execution environment for building and connecting cloud services. With Cloud Functions you write simple, single-purpose functions that are attached to events emitted from your cloud infrastructure and services. Your Cloud Function is triggered when an event being watched is fired. Your code executes in a fully managed environment. There is no need to provision any infrastructure or worry about managing any servers.

Cloud Functions are written in Javascript and execute in a Node.js v6.11.5 environment on Google Cloud Platform. You can take your Cloud Function and run it in any standard Node.js runtime which makes both portability and local testing a breeze.