Fundamentals - Virtual Machines Flashcards
What does VPC stand for?
Virtual Private Cloud
Why do you need to configure a VPC networks?
The VPC networks:
- connect your GCP resources
- to each other
- and to the internet.
What do you need to configure so that you can connect your Google Cloud Platform resources to each other and to the internet.
A Virtual Private Cloud (VPC) network
Name 3 things you can configure on your VPC network (same as you would on a corporate network)?
You can segment your networks,
use firewall rules to restrict access to instances,
and create static routes to forward traffic to specific destinations
When defining a VPC network, do you need to limit it to a specific zone?
No - The virtual private cloud networks that you define have global scope.
They can have subnets in any GCP region worldwide.
And subnets can span the zones that make up a region.
Can VPC network subnets span more than one zone?
Yes - subnets can span the zones that make up a region.
Can VPC network subnets span more than one region?
No - Although VPC network can have subnets in any GCP region worldwide, subnets themselves are regional resources.
Can you increase the size of a subnet after it’s been created?
Yes - You can dynamically increase the size of a subnet in a custom network by expanding the range of IP addresses allocated to it.
What is the impact of provisioned VMs when you increase the size of subnet?
None - expanding the range of IP addresses allocated to a subnet doesn’t affect already‑configured VMs
Why would you define a subnet that spans more than one zone?
Resiliency - you could configure two VMs on different zones but which can easily communicate with each other as “neighbours” on the same subnet.
Which Cloud service do you use to create VMs?
Google Compute Engine
Name 4 benefits from provisioning your VM in the cloud over creating it on-prem?
There are no upfront investments,
You can run thousands of virtual CPUs…
…on a system that is designed to be fast …
…and to offer consistent performance.
Name 2 ways you can create a virtual machine in GCP?
Google Cloud Platform Console
Command line - using gcloud
What operating system images can you run on a GCP VM?
Google’s images of:
+ Linux
+ Windows
Or your own customised images
Which resource sizes does your choice of GCP VM determine?
How much memory…
… and how many virtual CPUs it has
Are GPUs available in all zones?
No - but they are available in many of them.
What type of workload would prompt you to consider using GPUs on your VM?
Machine learning
Certain types of data processing that can take advantage of GPUs
What types of disks can you choose for your GCP VMs?
Standard - Persistent disk
SSD - Local Solid State Drive
When storing data to SSD, what should you be mindful of?
Content doesn’t last past when the VM terminates
So don’t use it for data you need to persist.
What type of data should you store on an SSD?
Scratch pad - as content doesn’t last past when the VM terminates
What type of data SHOULDN’T you store on an SSD?
Persistent - as content doesn’t last past when the VM terminates
What is the default disk type for VMs?
Standard (persistent disk as opposed to SSD)
How can you configure your VM to come up with pre-defined configuration?
By passing in a startup script
Why would you choose to configure your VM as pre-emptible?
You can save money
What are the differences between a pre-emptible and a standard VM?
Just one difference: you’ve given Compute Engine permission to terminate it if it’s resources are needed elsewhere.
What is the max number of vCPUs you can specify on your VM?
96 according to Pluralsight training
60 according to GCP online documentation
What is the maximum memory size you can define on a VM?
For N1 machine types, you can add up to a total of 624 GB of memory per VM.
For N2 machine types, you can add up to a total of 640 GB of memory per VM.
For N2D machine types, you can add up to a total of 768 GB of memory per VM.
What happens if you enable autoscaling on a managed instance group (MIG)?
Compute Engine will add and takeaway VMs from your application based on load metrics.
What does MIG stand for?
Managed Instance Group
What are VPC routing tables used for?
VPCs routing tables are used to forward traffic from one instance to another instance:
- within the same network,
- across subnetworks
- and even between GCP zones,
Do you have to configure and manage VPC routing tables?
No - VPCs routing tables are built in. You don’t have to provision or manage a router.
Why wouldn’t you need to configure and manage firewall instances?
Because:
- VPCs …
- give you a global‑distributed firewall
- that you can control to restrict access to instances,
- both incoming and outgoing traffic.
What convenient attribute can you use to configure your firewall rules?
Metadata tags - You can define firewall rules in terms of metadata tags on Compute Engine instances
For example:
- You can tag all your web servers with “web”
- and write a firewall rule saying that traffic on ports 80 or 443 is allowed into all VMs with the “web” tag (no matter what their IP address happens to be)
What are VPCs attached to (org, folder, project, resource)?
VPCs belong to a given GCP project
What two options do you have to enable VPCs belonging to different GPC projects to communicate with each other?
Peering vs Shared:
- VPC Peering
- Shared VPC
In what case would you use VPC peering?
If you simply want to establish a peering relationship between two VPCs so that they can exchange traffic.
You don’t need IAM to control who and what in one project can interact with the VPC in another.
In what case would you use shared VPC?
If you want to use the full power of IAM to control who and what in one project can interact with the VPC in another.
What Google Cloud service do you need to use to route traffic to your VMs if you’ve enabled autoscalling?
Cloud Load Balancing
What is Cloud Load Balancing?
Cloud Load Balancing is:
- A fully distributed,
- software‑defined
- managed service
- for all your traffic.
Does Cloud Load Balancing run on a VM?
No - it’s software-defined managed service.
Do you need to worry about scalling or managing Cloud Load Balancers?
No - because the load balancers don't run in VMs you have to manage; Cloud Load Balancer is: * a software-defined * managed service for your traffic.
What front-ends your Cloud Load Balancer?
A single anycast IP front ends all your back‑end instance
Do you need to define more than one anycast IP address for your load balancer if you’re application is defined as multi-region?
No - a single anycast IP front ends all your back‑end instances in regions around the world.
It provides cross‑region load balancing, including automatic multiregion failover
There are 5 Cloud Load Balancing options you can you choose from; what are they?
Note:
Global vs. Regional traffic
External vs. Internal traffic
- Global HTTP(S)
- Global SSL Proxy
- Global TCP Proxy
- Regional
- Regional Internal
When would you choose Global HTTP(S) load balancing?
If you need cross‑regional load balancing for a web application
When would you choose Global SSL Proxy load balancing?
For secure sockets layer traffic that is not HTTP
The proxy services only work for specific port numbers, and they only work for TCP
When would you choose Global TCP Proxy load balancing?
If it’s other TCP traffic that does not use secure sockets layer (SSL)
The proxy services only work for specific port numbers, and they only work for TCP
When would you choose Regional load balancing?
If you want to load balance UDP traffic or traffic on any port number, you can still load balance across a GCP region with the regional load balancer
When would you choose Regional Internal load balancing?
Use the internal load balancer if you want to load balance traffic inside your project (say between the presentation layer and the business logic layer of your application).
It accepts traffic on a GCP internal IP address and load balances it across Compute Engine VMs.
What is 8.8.8.8?
Google’s Domain Name Service (DNS)
One of the most famous Google services that people don’t pay for is 8.8.8.8
It provides a public domain name service to the world. DNS is what translates internet hostnames to addresses.
And as you would imagine, Google has a highly developed DNS infrastructure.
It makes 8.8.8.8 available so that everybody can take advantage of it.
What does DNS stand for?
Domain Name Service
DNS is what translates internet hostnames to addresses.
What GCP service can you use to route traffic to your applications?
Cloud DNS
What is Cloud DNS?
- A managed DNS service
- Running on the same infrastructure as Google.
- It has low latency and high availability,
- and it’s a cost‑effective way to make your applications and services available to your users.
The DNS information you publish is served from redundant locations around the world. Cloud DNS is also programmable.
What does CDN stand for?
Content Delivery Network
What is Cloud CDN?
A managed service that allows you to accelerate content delivery to your applications.
It leverages Google’s global system of edge caches.
What are the benefits of using Cloud CDN?
- Your customers will experience lower network latency,
- the origins of your content will experience reduced load,
- and you can save money.
What is a pre-req for using Cloud CDN?
You need to have set up HTTPS load balancing
What’s involved in turning on Cloud CDN?
Tick a checkbox - Once you’ve set up HTTPS load balancing, simply enable Cloud CDN with a single checkbox.
What options do you have to interconnect your existing network to your VPC one?
- VPN
- Direct Peering: Not over the internet, direct between you and Google
- Carrier Peering: Not over the internet, indirect (via a partner who has direct peering with Google)
- Dedicated Interconnect: Best for high-availability etc - in partnership with Google
What Google feature can you use to make your VPN interconnect with Google dynamic?
Cloud Router - lets your other networks and your Google VPC exchange route information over the VPN using the Border Gateway Protocol (instead of IPSec?)
What protocol does VPN interconnect use (for non dynamic routing)?
IPSec
What protocol does Cloud Router use which enables dynamic routing of VPN interconnect traffic?
Boarder Gateway Protocol
What does “Peering” interconnect mean?
Peering means:
- putting a router in the same public data center as a Google point of presence…
- …and exchanging traffic