61
Getting Started with Google's Infrastructure +ColinSu Developer Expert, Google Cloud Platform A Tour of Google Compute Engine

Introduction to Google Compute Engine

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Introduction to Google Compute Engine

Getting Started with Google's Infrastructure

!!!!+ColinSu

Developer Expert, Google Cloud Platform

A Tour of Google Compute Engine

Page 2: Introduction to Google Compute Engine

Google Cloud Platform

Slides are available on slideshare.net

goo.gl/ARRyaq

Page 3: Introduction to Google Compute Engine

Google Cloud Platform

OverviewGoogle Cloud Platform

Page 4: Introduction to Google Compute Engine

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

Page 5: Introduction to Google Compute Engine

Google Cloud Platform

You will be using Google's InfrastructureVirtual MachinesNetworkingStorage

And be placed in a safe placeGoogle's Data Center

And Google will do those for youScaling Migrating Maintenance Take over anything you don't wanna do

Powered by Google

Page 6: Introduction to Google Compute Engine

Google Cloud Platform

Google Cloud Family

Page 7: Introduction to Google Compute Engine

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

Page 8: Introduction to Google Compute Engine

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

Page 9: Introduction to Google Compute Engine

Google Cloud Platform

StorageStorage Services in Google Cloud Platform

Page 10: Introduction to Google Compute Engine

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

Page 11: Introduction to Google Compute Engine

Google Cloud Platform

Non-relational database (NoSQL)

Schema-less data

Use Cases

+ Highly scalable application

Cloud Datastore

Page 12: Introduction to Google Compute Engine

Google Cloud Platform

ProtectedYour data is protected at multiple physical locations

Strong, configurable securityOAuth or simple access control on your data

Multiple usages

+ Serve static objects directly

+ Use with other Google Cloud products (Bridge)

Cloud Storage

Page 13: Introduction to Google Compute Engine

Google Cloud Platform

Google Compute Engine Infrastructure-as-a-Service in Google Cloud Platform

Page 14: Introduction to Google Compute Engine

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

Page 15: Introduction to Google Compute Engine

Google Cloud Platform

High-performance virtual machinesfrom micro-VM to large instance

Powered by Google's global networkyou could build a large cluster with strong and consistent bandwidth, provided by Google

Load Balancingspread incoming traffic across instances

Fast Bullet Reloadingquick deployment of large VMscommand-line interfaceweb-based console

Highly securedAll data written to disk in Compute Engine will be encrypted by high-class encryption algorithm

Google Compute Engine

Page 16: Introduction to Google Compute Engine

Google Cloud Platform

KVM-based Virtual machines

Fast booting timeroutinely takes less than 30 secs

Various OS support

Various machine types

Instances on GCE

http://gce-demos.appspot.com

Page 17: Introduction to Google Compute Engine

Google Cloud Platform

Operating Systems

Page 18: Introduction to Google Compute Engine

Google Cloud Platform

Operating Systems

Page 19: Introduction to Google Compute Engine

Google Cloud Platform

Operating Systems

Limited Preview

Page 20: Introduction to Google Compute Engine

Google Cloud Platform

Operating Systems

Limited Preview

Page 21: Introduction to Google Compute Engine

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)

=

Page 22: Introduction to Google Compute Engine

Google Cloud Platform

Machine Types (Shared-Core)

f1-microShared Core

0.6 GB Memory

g1-small1 Core1.7 GB Memory

1.38 GCEUs

Page 23: Introduction to Google Compute Engine

Google Cloud Platform

Machine Types (Standard)

n1-standard-nStarts from 1 Core

Start from 3.75 GB Memory

n Virtual CPUs Memory GCEUs

1 1 3.75 GB 2.752 2 7.50 GB 5.504 4 15 GB 118 8 30 GB 30

16 16 60 GB 60

Page 24: Introduction to Google Compute Engine

Google Cloud Platform

Machine Types (High Memory)

n1-highmem-nStarts from 2 Core

Start from 13 GB Memory

n Virtual CPUs Memory GCEUs

2 2 13 GB 5.504 4 26 GB 118 8 52 GB 22

16 16 104 GB 44

Page 25: Introduction to Google Compute Engine

Google Cloud Platform

Machine Types (High CPU)

n1-highcpu-nStarts from 2 Core

Start from 1.8 GB Memory

n Virtual CPUs Memory GCEUs

2 2 1.8 GB 5.504 4 3.6 GB 118 8 7.2 GB 22

16 16 14.4 GB 44

Page 26: Introduction to Google Compute Engine

Google Cloud Platform

Regions & Zones

us-central1-aus-central1-b

europe-west1-a europe-west1-b

Page 27: Introduction to Google Compute Engine

Google Cloud Platform

Regions & Zones

us-central1-aus-central1-b

europe-west1-a europe-west1-b

Singapore?

asia-east-aasia-east-b

Page 28: Introduction to Google Compute Engine

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 degreebut remain your instances online (no downtime)

+ Terminate and reboot

Live Migration

Page 29: Introduction to Google Compute Engine

Google Cloud Platform

Virtual SCSI device

Block Storage

Persistent until deleted

Hot-plug to GCE instances (attach/deattach)

Persistent Disk

Page 30: Introduction to Google Compute Engine

Google Cloud Platform

Primary Disk: OS boot volume

Persistent Disk Mode

GCE Virtual Machine

Root

Stateful Root Volume

Page 31: Introduction to Google Compute Engine

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

Page 32: Introduction to Google Compute Engine

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

Page 33: Introduction to Google Compute Engine

Google Cloud Platform

Target Pools

Health Checking

Forwarding Rulesiptables for target pools

Load Balancing

Page 34: Introduction to Google Compute Engine

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

Page 35: Introduction to Google Compute Engine

Google Cloud Platform

Networking is first-class object on GCEwhich means you could apply/unapply it anytime easily

pre-defined networks before the first instance started

Integrated Networking

Page 36: Introduction to Google Compute Engine

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

Page 37: Introduction to Google Compute Engine

Google Cloud Platform

Scalr

Right Scale

Services Host GCE

Page 38: Introduction to Google Compute Engine

Google Cloud Platform

BenchmarkHow Google Compute Engine performs?

Page 39: Introduction to Google Compute Engine

Google Cloud Platform

Benchmarks - Sequential I/Ow/ a well-known and you-know competitor

http://github.com/Scalr/perf-benchmarks

Page 40: Introduction to Google Compute Engine

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

Page 41: Introduction to Google Compute Engine

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

Page 42: Introduction to Google Compute Engine

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

Page 43: Introduction to Google Compute Engine

Google Cloud Platform

Machine Types (Shared-Core) & Pricing

Page 44: Introduction to Google Compute Engine

Google Cloud Platform

Machine Types (Standard) & Pricing

Page 45: Introduction to Google Compute Engine

Google Cloud Platform

Machine Types (High Memory) & Pricing

Page 46: Introduction to Google Compute Engine

Google Cloud Platform

Machine Types (High CPU) & Pricing

Page 47: Introduction to Google Compute Engine

Google Cloud Platform

Other Pricing

https://developers.google.com/compute/pricing

Page 48: Introduction to Google Compute Engine

Google Cloud Platform

Limited Preview ProjectsSealed Projects with Google Compute Engine

Page 49: Introduction to Google Compute Engine

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

Page 50: Introduction to Google Compute Engine

Google Cloud Platform

Replica Pool Limited Preview

Pool Resource

GCE Virtual Machine GCE Virtual MachineGCE Virtual Machine

Replica Resource

Replica Resource

Replica Resource

Page 51: Introduction to Google Compute Engine

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"! }]! }]! }! }!}!

Page 52: Introduction to Google Compute Engine

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

Page 53: Introduction to Google Compute Engine

Google Cloud Platform

Useful Template Settings Limited Preview

"baseInstanceName": "my-vm-replicas"!

"template.vmParams.baseInstanceName": The base instance name to use for these replicas

Page 54: Introduction to Google Compute Engine

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

Page 55: Introduction to Google Compute Engine

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

Page 56: Introduction to Google Compute Engine

Google Cloud Platform

Health Checking Options Limited Preview

checkIntervalSec Determines how often, in seconds, to make HTTP requests for the health check.

healthyThresholdSets 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.

unhealthyThresholdThe number of consecutive health check requests that need to fail to consider the replica unhealthy.

Only a HTTP 2xx response is considered successful.

Page 57: Introduction to Google Compute Engine

Google Cloud Platform

Windows Server Imageshttps://developers.google.com/compute/docs/premium-operating-systems

SSD Persistent Disks https://developers.google.com/compute/docs/disks#typeofdisks

Advanced Routinghttps://developers.google.com/compute/docs/networking#routing

Push-to-deployhttps://developers.google.com/appengine/docs/push-to-deploy

Other Limited Preview Projects

Page 58: Introduction to Google Compute Engine

Google Cloud Platform

Technical Detail of Google Compute Enginehttp://commondatastorage.googleapis.com/io2012/presentations/live%20to%20website/313.pdf

Github Google Cloud Platform Teamhttp://googlecloudplatform.github.io/

Resources

Page 59: Introduction to Google Compute Engine

Google Cloud Platform

EOFThanks For Listening+GDGTaipei

Page 60: Introduction to Google Compute Engine

Google Cloud Platform

Questions?

Page 61: Introduction to Google Compute Engine

Google Cloud Platform

Interested?Search "google cloud starter pack", use promo code: gcpteam-in