Google Cloud or GCP Compute Engine is very powerful and flexible infrastructure as a service (Iaas) offering by Google Cloud Platform (GCP). GCP provides virtual machine (VMs) or we can called compute engine in term of GCP calling. You can easily to customise the virtual machine according to your requirements and you can design to scale easily and handle various workloads, from simple and small application to complex and large application for high-performance computing task. Google Cloud Platform (GCP) is working on pay-as-you-go concept, it means if you are using any services in GCP then you have to pay for that for particular time of period, like if you are using a compute engine service and you spend 1 hours on Compute Engine then you have to pay for 1 hours charges according to your specific charges for that machine. If you are going to learn the GCP, believe us this is best Cloud to learn.
Table of Contents
- Google Cloud Platform (GCP) Compute Engine related Some Concept
- Virtual Machines (VMs)
- Managing VM Instances
- Machine Types
- Some More Feature from GCP (Google Cloud Platform)
Google Cloud Platform (GCP) Compute Engine related Some Concept
Virtual Machines (VMs)
Compute Engine allows you to create and manage VMs with various configurations, including different machine types, CPUs, memory, and storage options. You can choose predefined machine types or create custom ones. Compute Engine is also called Virtual Machine (VMs) in GCP and during the creation of VMs you can configure the VM according to your requirements and this is very easy to Create VM in GCP. In Google Cloud Platform, we have three types to create a VMs:
Managing VM Instances
- Start/Stop/Restart Instances:
- Use the Google Cloud Console or the
gcloud
command to manage VM states.
- Use the Google Cloud Console or the
- Connect to VM:
- You can connect via SSH from the Cloud Console or use the
gcloud
CLI:
- You can connect via SSH from the Cloud Console or use the
Machine Types
Compute Engine in GCP offers predefined machine types optimised for different use cases, such as general-purpose, compute-optimised, memory-optimised, and accelerator-optimised VMs. You can also create custom machine types tailored to your specific requirements. During the creation of VMs, we can customise the VM because we have option to choose the Machine Types according to requirements, like we need to work on some POC types work then we can go on to spot VM, which you would get for a particular time and time is defined by you that how much time you want to use that VM and you can go with already configured VMs just you need to select according to you requirements. This all configuration will help you to increase your productivity and accelerate to your business plan.
- General Purpose Machine Types
- E2:
- Purpose: Cost-efficient general-purpose workloads.
- Configuration: Balanced compute and memory resources.
- Example:
e2-micro
,e2-small
,e2-medium
,e2-standard-2
,e2-standard-4
, etc.
- N2:
- Purpose: General-purpose with more memory and better performance than E2.
- Configuration: Offers a balance of compute and memory with high-performance networking and local SSD options.
- Example:
n2-standard-2
,n2-standard-4
,n2-standard-8
, etc.
- N2D:
- Purpose: General-purpose with AMD EPYC processors.
- Configuration: Cost-effective with good performance, suitable for a wide range of workloads.
- Example:
n2d-standard-2
,n2d-standard-4
,n2d-standard-8
, etc.
- N1 (Older, but still available):
- Purpose: General-purpose with various machine sizes.
- Configuration: Includes standard and high-memory configurations.
- Example:
n1-standard-1
,n1-standard-2
,n1-standard-4
,n1-highmem-2
, etc.
- E2:
- Compute Optimized Machine Types
- C2:
- Purpose: High-performance computing tasks and applications requiring high CPU performance.
- Configuration: More vCPUs with high clock speeds.
- Example:
c2-standard-4
,c2-standard-8
,c2-standard-16
, etc.
- C2:
- Memory Optimized Machine Types
- M2:
- Purpose: Memory-intensive applications like large in-memory databases.
- Configuration: High memory-to-vCPU ratio.
- Example:
m2-ultramem-208
,m2-ultramem-416
,m2-ultramem-624
, etc.
- M1 (Older, but still available):
- Purpose: High-memory requirements with balanced vCPUs.
- Configuration: Large memory sizes with moderate compute resources.
- Example:
m1-ultramem-40
,m1-ultramem-80
,m1-ultramem-160
, etc.
- M2:
- Accelerator-Optimized Machine Types
- A2:
- Purpose: Machine types designed for GPU-intensive workloads such as machine learning and scientific simulations.
- Configuration: Includes NVIDIA A100 Tensor Core GPUs.
- Example:
a2-highgpu-1g
,a2-highgpu-2g
,a2-highgpu-4g
, etc.
- A2:
- High-Performance Machine Types
- T2D:
- Purpose: High-performance workloads with a balance of compute and memory resources.
- Configuration: Uses the latest generation of Google Cloud’s processors.
- Example:
t2d-standard-2
,t2d-standard-4
,t2d-standard-8
, etc.
- T2D:
Some More Feature from GCP (Google Cloud Platform)
- Persistent Disks: These are durable and high-performance block storage options that you can attach to your VMs. Persistent disks come in standard and SSD varieties, and you can dynamically resize them as needed. Persistent Disks is like you have been created any block storage in GCP and you have been attached that with VMs and within GCP, it have standard and SSD varieties to get the storage according to our requirements and if load will heavy in future and you can select the option during the creation of storage to increase the storage automatically.
- Networking: Compute Engine provides flexible networking options, including private IP addresses, Virtual Private Cloud (VPC) networks, and load balancing. You can configure firewall rules and network tags to control traffic to and from your VMs. Within GCP, this have wonderful feature of Networking here you don’t worry about connection, if you know about little bit of networking then you can easily manage this feature. GCP allow you to create your VM within same VPC to increase the reachability and high-throughput with standard or primary types of connection which you can easily see during the creation of VM, and if you have another network you need to connection with them then you just need to create Peering connection during the VPC and you can easily access that machine within seconds.
- Autoscaling: Compute Engine supports autoscaling, which allows you to automatically adjust the number of VM instances in a managed instance group based on demand, helping to ensure that your application remains performant and cost-effective. Compute Engine is working as a machine of your local but suppose your machine have been stuck of any reason (may be CPU high utilisation, or ram consumption is high or any reason) then within this case autoscaling is come into the picture to handle the machine and it will create one more VMs as copy of primary VMs within given time. So here you can easily handle your application without failure.
- Preemptible VMs: These are short-lived, cost-effective VMs that can be up to 80% cheaper than regular VMs. They are ideal for batch processing and fault-tolerant applications, but they may be terminated by Google Cloud at any time if resources are needed elsewhere. Preeemptible VMs is like spot VM, you have been create for POC types of work and any R&D types of work so you just do your work and after completing that it is not for useable so we can go with preeemptible VMs. This is very cheap and sort period of VMs we just need to give a time period to them like “I need this VMs for 1 hours and may be more than 1 hours” so that we are here to create this VMs.
- Snapshots and Images: You can create snapshots of persistent disks for backup and recovery purposes. Additionally, you can create custom VM images to quickly deploy new VMs with your preferred configuration and software. We are using this feature to deploy a new VMs with our preferred configuration and software during the any reason to occur on current VMs and we need to protect the fault tolerance the VMs, for this we used to Autoscalling.
- Security: Compute Engine includes several security features, such as Identity and Access Management (IAM) for controlling access, encryption of data at rest and in transit, and secure boot options for ensuring the integrity of your VM instances. GCP have one wonderful feature of Identity and Access Management (IAM) for controlling the access, encryption of data at rest and in transit to secure boot option and we create this when we need to give someone a particular permission and according to that IAM he can only use that service which we aligned to that role.
- Integration with Other GCP Services: Compute Engine integrates seamlessly with other GCP services, such as Google Kubernetes Engine (GKE), Cloud Storage, BigQuery, and more, allowing you to build complex, scalable applications using a combination of services.
- Billing and Cost Management: You can monitor and manage costs using GCP’s billing tools and pricing calculators. Compute Engine offers flexible billing options, including pay-as-you-go and committed use discounts.
Within this post i have told you about Compute Engine in Google Cloud Platform (GCP), for more information you can visit the official site of GCP.