Virtual Machines in the Cloud
Agenda
Virtual Private Cloud (VPC)
Network
Compute Engine
Important VPC capabilities
Quiz and lab
Virtual Private Cloud Networking
● Each VPC network is contained in a
Google Cloud project.
● You can provision Cloud Platform
resources, connect them to each
other, and isolate them from one
another.
Google Cloud VPC networks are global; subnets are regional
My VPC
us-east1
my-subnet1 us-east1-b us-east1-c
10.0.0.0/24
10.0.0.2 10.0.0.3
AWS VPCs are built within a region using subnets on
Availability Zones
AWS
VPC
VM VM
Subnet 1: Subnet 2:
Availability Zone A Availability Zone B
Region
AWS VPCs are built within a region using subnets on
Availability Zones
AWS
VPC
Private: 10... Private: 10...
Public: 203... VM Public: 203... VM
Subnet 1: Subnet 2:
Availability Zone A Availability Zone B
Region
AWS VPCs are built within a region using subnets on
Availability Zones
AWS
VPC
Private: 10... Private: 10...
Public: 203... VM Public: 203... VM
Subnet 1: 10.0.0.0/24 Subnet 2: 10.0.0.0/24
Availability Zone A Availability Zone B
VPC: 10.0.0.0/16
Region
AWS VPCs are built within a region using subnets on availability
zones
AWS
VPC
Private: 10... Private: 10...
Public: 203... VM Public: 203... VM
Destination Target
Subnet 1: 10.0.0.0/24 Subnet 2: 10.0.0.0/24
10.0.0.0/16 local
Availability Zone A Availability Zone B
0.0.0.0/0 igw-id
VPC: 10.0.0.0/16
Region
Summary of differences between Google and AWS VPC
Google Cloud VPC AWS VPC
Virtual networks VPC networks (global) VPCs (regional)
IP address ranges Subnets (regional) Subnets (Availability Zone)
Routing entries Routes (global) Routes (regional)
Security boundaries Firewall rules (global) NACLs, Security Groups (global)
Agenda
Virtual Private Cloud (VPC)
Network
Compute Engine
Important VPC capabilities
Quiz and lab
Compute Engine offers managed
virtual machines
● No upfront investment
● Fast and consistent performance
Compute Engine offers managed
virtual machines
● Create VMs with Google Cloud
Console
or gcloud
● Run images of Linux or
Windows Server
Compute Engine offers managed
virtual machines
● Pick memory and CPU: use
predefined types, or make a
custom VM
● Pick GPUs if you need them
Compute Engine offers managed
virtual machines
● Pick persistent disks:
standard or SSD
● Pick local SSD for scratch space
too if you need it
Compute Engine offers managed
virtual machines
● Pick a boot image: Linux or
Windows Server
Compute Engine offers managed
virtual machines
● Define a startup script if you like
Compute Engine offers managed
virtual machines
● Take disk snapshots as backups or
as migration tools
Compute Engine offers
innovative pricing
● Per-second billing, sustained
use discounts
● Preemptible instances
● High throughput to storage at no
extra cost
● Custom machine types: Only pay
for the hardware you need
Scale up or scale out with Compute Engine
Use big VMs for memory- and Use Autoscaling for resilient,
compute-intensive applications scalable applications
Similarities between Compute
Engine and Amazon EC2
Similarities between Compute
Engine and Amazon EC2
● RAM, CPU, and GPU
Similarities between Compute
Engine and Amazon EC2
● RAM, CPU, and GPU
● Boot disk and operating system
Similarities between Compute
Engine and Amazon EC2
● RAM, CPU, and GPU
● Boot disk and operating system
● Additional disks
Similarities between Compute
Engine and Amazon EC2
● RAM, CPU, and GPU
● Boot disk and operating system
● Additional disks
● IP addresses
Similarities between Compute
Engine and Amazon EC2
● RAM, CPU, and GPU
● Boot disk and operating system
● Additional disks
● IP addresses
● Startup scripts with metadata
Differences between Compute
Engine and Amazon EC2
Differences between Compute
Engine and Amazon EC2
● Faster spin-ups
Differences between Compute
Engine and Amazon EC2
● Faster spin-ups
● Regional persistent disks
Differences between Compute
Engine and Amazon EC2
● Faster spin-ups
● Regional persistent disks
● Preemptible VMs
Differences between Compute
Engine and Amazon EC2
● Faster spin-ups
● Regional persistent disks
● Preemptible VMs
● Discount pricing
Differences between Compute
Engine and Amazon EC2
● Faster spin-ups
● Regional persistent disks
● Preemptible VMs
● Discount pricing
● Custom machine types
Summary of Compute Engine and Amazon EC2 differences
Summary of Compute Engine and Amazon EC2 differences
Compute Engine Amazon EC2
Machine RAM and CPU Machine types Instance types
Summary of Compute Engine and Amazon EC2 differences
Compute Engine Amazon EC2
Machine RAM and CPU Machine types Instance types
Machine images Images Amazon Machine Images
Summary of Compute Engine and Amazon EC2 differences
Compute Engine Amazon EC2
Machine RAM and CPU Machine types Instance types
Machine images Images Amazon Machine Images
Block storage Persistent disks Elastic Block Store
Summary of Compute Engine and Amazon EC2 differences
Compute Engine Amazon EC2
Machine RAM and CPU Machine types Instance types
Machine images Images Amazon Machine Images
Block storage Persistent disks Elastic Block Store
Local attached disk Local SSD Ephemeral drives
Summary of Compute Engine and Amazon EC2 differences
Compute Engine Amazon EC2
Machine RAM and CPU Machine types Instance types
Machine images Images Amazon Machine Images
Block storage Persistent disks Elastic Block Store
Local attached disk Local SSD Ephemeral drives
Preemptible VMs, Spot Instances,
Discounts
Sustained-Use Discounts Reserved Instances
Agenda
Virtual Private Cloud (VPC)
Network
Compute Engine
Important VPC capabilities
Quiz and lab
You control the topology of your
VPC network
● Use its route table to forward
traffic within the network, even
across subnets.
You control the topology of your
VPC network
● Use its firewall to control what
network traffic is allowed.
You control the topology of your
VPC network
● Use Shared VPC to share a network,
or individual subnets, with other
Google Cloud projects.
● Use VPC Peering to interconnect
networks in GCP projects.
With global Cloud Load Balancing, your application presents a
single front-end to the world
● Users get a single, global anycast IP
address.
● Traffic goes over the Google backbone
User
from the closest point-of-presence to
Tokyo the user.
● Backends are selected based on load.
● Only healthy backends receive traffic.
● No pre-warming is required.
User User
New York Germany
Google VPC offers a suite of load-balancing options
Layer 7 load Layer 4 load Layer 4 load Load balancing of Load balancing of
balancing based balancing of balancing of any traffic (TCP, traffic inside a VPC
on load non-HTTPS SSL non-SSL TCP UDP)
traffic based on traffic
load
Can route different Supported on Supported on Supported on any Use for the internal
URLs to different specific port specific port port number tiers of multi-tier
back ends numbers numbers applications
Cloud DNS is highly available
and scalable
● Create managed zones, then
add, edit, delete DNS records
Cloud DNS is highly available
and scalable
● Programmatically manage zones
and records using RESTful API or
command-line interface
Cloud CDN
(Content Delivery Network)
● Use Google's globally distributed
edge caches to cache content close
to your users
Cloud CDN
(Content Delivery Network)
● Use Google's globally distributed
edge caches to cache content close
to your users
● Or use CDN Interconnect if you’d
prefer to use a different CDN
Google Cloud Platform offers many interconnect options
VPN Direct Peering Carrier Peering Dedicated
Interconnect
Secure multi-Gbps Private connection Connection Connect N X 10G
connection over between you and through the transport circuits for
VPN tunnels Google for your largest partner private cloud traffic
hybrid cloud network of service to Google Cloud at
providers
workloads Google POPs
Common Google Cloud and AWS load
balancing features
Common Google Cloud and AWS load
balancing features
● HTTP, TCP, and UDP requests
Common Google Cloud and AWS load
balancing features
● HTTP, TCP, and UDP requests
● Internal and external access
Common Google Cloud and AWS load
balancing features
● HTTP, TCP, and UDP requests
● Internal and external access
● Firewall protection
Common Google Cloud and AWS load
balancing features
● HTTP, TCP, and UDP requests
● Internal and external access
● Firewall protection
● Health checks and session affinity
Common Google Cloud and AWS load
balancing features
● HTTP, TCP, and UDP requests
● Internal and external access
● Firewall protection
● Health checks and session affinity
● Path-based routing
AWS load balancers
Region Load balancer
80 8080
Listener Listener
Rule /orders Rule Rule /inventory
80 8080 9090
Target Target Target Target Target Target Target
Target Group Target Group Target Group
Summary of Google Cloud and AWS load balancing
approaches
Summary of Google Cloud and AWS load balancing
approaches
Google Cloud load balancers AWS load balancers
Service type Software-based Instance-based
Summary of Google Cloud and AWS load balancing
approaches
Google Cloud load balancers AWS load balancers
Service type Software-based Instance-based
Managed service Global Regional
Summary of Google Cloud and AWS load balancing
approaches
Google Cloud load balancers AWS load balancers
Service type Software-based Instance-based
Managed service Global Regional
Request routing URL map (HTTP only) Listener, listener rule
Summary of Google Cloud and AWS load balancing
approaches
Google Cloud load balancers AWS load balancers
Service type Software-based Instance-based
Managed service Global Regional
Request routing URL map (HTTP only) Listener, listener rule
Service health check Instance group, Target group
Backend service (capacity)
Summary of Google Cloud and AWS load balancing
approaches
Google Cloud load balancers AWS load balancers
Service type Software-based Instance-based
Managed service Global Regional
Request routing URL map (HTTP only) Listener, listener rule
Service health check Instance group, Target group
Backend service (capacity)
Load balanced scope Global Region*
Lab
Getting Started with
Compute Engine