Compute Engine Flashcards

1
Q

What is Compute Engine?

A

Compute Engine is an IaaS solution offered by Google.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are Compute Engine spot VMs?

A

Compute Engine Spot VMs are VMs that can be terminated at any time by Compute Engine. They are significantly less expensive but should only be used for fault-tolerant jobs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is an Instance Template?

A

An instance template is a template for creating VMs. In other words, a template represents the configuration that you would like to use to create new VMs. This allows you to create new VMs with the same configuration in a convenient manner.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is an Instance Group?

A

An Instance Group is a feature that allows Compute Engine to automatically scale Compute Engine instances based on specific criteria. Keep in mind, you must provision your own load balancer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

If you don’t want your Compute Engine instance to have any downtime during host maintenance, what can you do?

A

By default, “Migrate VM instance” is enabled, which will migrate your VM instance to other hardware and avoid downtime.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

By default, are Compute Engine instances automatically restarted if they are shutdown for non-user-initiated reasons?

A

Yes. However, this feature can be turned off.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Is it possible to modify the attached storage to a Compute Engine instance while it is running?

A

Yes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a Network Interface Card?

A

A network interface is hardware or software used to connect to a network. In the case of a Compute Engine instance, its network interface is what makes it possible to connect to a subnetwork that belongs to a VPC Network. An instance can have up to 8 network interfaces.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Do MIGs require an Instance Template?

A

Yes. Without an Instance Template, a Managed Instance Group cannot be created.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Do MIGs support application-based health checks for autohealing?

A

Yes. You can enable health checks for applications running on MIGs. If an application is not healthy, Compute Engine will recreate the VM instance. Checking that an application is running is more precise than checking if a VM is running.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the difference between load balancing health checks and managed instance group health checks?

A

Load balancing health checks simply direct traffic way from unhealthy instances to healthy instances. Managed instance group health checks delete and recreate instances for non-healthy applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

A Compute Engine instance Network Tag can be used as …

A

The target of a fire wall rule.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Is there an additional fee for using MIGs?

A

No. You simply pay for the resources that you use.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

If you need to create a group of heterogenous Compute Engine instances, what can you do?

A

You can create a user-managed instance group

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Is every Compute Engine instance associated with a VPC Network?

A

Yes. Every single Compute Engine instance is associated with a VPC Network.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Each Compute Engine instance network interface has an internal IP address which is allocated from the subnet. You can also optionally configure an external IP address

A
17
Q

Does GCP automatically create an internal DNS name when a Compute Engine instance is created?

A

Yes. The DNS name becomes the hostname of the Compute Engine instance and can be used for communication between VMs in the same VPC Network instead of using internal IP addresses.

18
Q

What is the difference between Forwarding Rules and Routes?

A

Forwarding Rules are associated with ingress (traffic coming into a VM). Routes are associated with egress (traffic going out a VM).

19
Q

What can firewall rules be used for?

A

Firewall rules can be used to define who can connect to your VM instances.

20
Q

If you plan to run containers on a Compute Engine instance, which operating system should you consider using?

A

You should consider using the “container-optimized OS” that GCP provides. In fact, this is the default OS that is used for GKE nodes. There is no licensing fee.

21
Q

Can the same service account be attached to multiple VM instances?

A

Yes. However, a VM instance can only be attached to 1 service account.

22
Q

Is it possible to create a VM instance that does not have an external IP address?

A

Yes. While an internal IP address is mandatory, an external IP address is not.

23
Q

Can Compute Engine instances be created with OpsAgent?

A

Yes. OpsAgent can be installed on instances upon creation. It can also be installed on existing instances.

24
Q

Is OpsAgent available to Compute Engine container optimized OS instances?

A

No

25
Q

When using an Instance Template to create instances, is it possible to override its defaults when creating an instance?

A

Yes. This can be done through gcloud.

For example:

gcloud compute instances create example-instance \
    --source-instance-template example-instance --machine-type e2-standard-2 \
    --image-family debian-9 --image-project debian-cloud \
    --metadata bread=butter --disk=boot=no,name=my-override-diskx
26
Q

Are Instance Templates immutable after creation?

A

Yes. Therefore, if you need to make changes to an Instance Template, you will need to create a new one.

27
Q

Is there an additional fee for using Instance Templates?

A

No

28
Q

What are the 3 different types of Instance Groups?

A
  1. Stateless Managed Instance Groups
  2. Stateful Managed Instance Groups
  3. User-managed Instance Groups

Stateless Managed Instance Groups support autoscaling and homogenous instances.

Stateful Managed Instance Groups does not support autoscaling but supports homogenous instances.

User-managed Instance Groups do not support autoscaling but supports heterogenous instances.

29
Q

VM interfaces are assigned IP addresses from the subnet that they are connected to.

A
30
Q

What is the difference between using persistent disks and Cloud Storage?

A

Persistent disks can have lower latency and higher throughput. Cloud Storage has higher latency, lower throughput, but is the most durable and can easily share data.

“Using the Cloud Storage Standard storage class in the same location as your VM gives performance that is comparable to Persistent Disk but with higher latency and less consistent throughput characteristics”

There are various types of Persistent Disks, and Google did not specify which type is being compared to Cloud Storage.

31
Q

What are the 3 different types of Disks that can be used by Compute Engine instances?

A
  1. Persistent Disks
  2. Google Cloud Hyperdisks
  3. Local SSDs

Persistent Disks:
1. Standard Disks (HDD)
2. Balanced Disks (SSD)
3. SSD Disks (SSD)
4. Extreme Disks (SSD)
Persistent Disks can be regional

Hypderdisks (next-gen storage):
1. Hyperdisk Balanced
2. Hyperdisk Throughput
3. Hyperdisk Extreme
Hyperdisks can only be zonal

Local SSDs are non-persistent. Once an instance terminates, data is lost.

32
Q

For most applications, you can authenticate by using Application Default Credentials, which finds credentials and manages tokens for you. However, if your application requires you to provide an OAuth2 access token, Compute Engine lets you get an access token from its metadata server for use in your application. Every virtual machine (VM) instance stores its metadata on a metadata server. Your VM automatically has access to the metadata server API without any additional authorization. When you make a request to get information from the metadata server, your request and the subsequent metadata response never leave the physical host that is running the VM.

https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys#instance-metadata

A
33
Q

Google Cloud accounts for bandwidth per virtual machine (VM) instance, not per virtual network interface (vNIC) or IP address.Neither additional virtual network interfaces (vNICs) nor additional IP addresses per vNIC increase ingress or egress bandwidth for a VM. For example, a C3 VM with 22 vCPUs is limited to 23 Gbps total egress bandwidth. If you configure the C3 VM with two vNICs, the VM is still limited to 23 Gbps total egress bandwidth, not 23 Gbps bandwidth per vNIC.

A
34
Q

Which Network Interface Card has better performance, gVNIC or virtIO?

A

gVNIC is a next gen Network Interface Card and has better performance.