Compute Engine: Google Cloud VPS with a New Line of Machine Families
If your older references still mention N1, N2, and E2 as the three main options, there is a major update — the N4 generation is now replacing N2 as the primary balanced choice.
Compute Engine is an Infrastructure as a Service (IaaS) offering from Google Cloud Platform (GCP) that allows you to create and run virtual machines (VMs) — essentially the GCP version of a “VPS.” The service gives you full control over the operating system, hardware specifications, and network configuration, running on Google’s global infrastructure that also powers Google Search and YouTube. This article explains how Compute Engine works, the latest available machine generations, how to create an instance, and best practices for managing costs and security.
Latest Compute Engine Machine Generations
Compute Engine machine types continue to evolve. Older references that only mention N1, N2, and E2 need to be updated — the N4 generation and its variants (N4D, N4A) are now positioned as the primary balanced options replacing N2/N2D, with DDR5 memory support and improved price-performance ratios.
| Family | Characteristics | Best For |
|---|---|---|
| E2 | Low cost per core, does not support custom machine types | Dev/test and cost-sensitive workloads |
| N4 / N4D / N4A | Latest balanced generation, DDR5, replacing N2/N2D | Web servers, general applications, medium-scale databases |
| N2 / N2D / N1 | Previous generations, still available | Existing workloads that have not yet been migrated |
| C4 / C4A / C3 | High per-core performance, with C4A for Arm architecture | Compute-intensive workloads and HPC |
| Tau T2A / T2D | Arm-based architecture | Microservices and cost-efficient web servers |
Spot VM: The Evolution of Preemptible VM
Google has transitioned from the older “Preemptible VM” model to Spot VM, offering similarly large discounts — potentially up to 91% off on-demand pricing — with greater flexibility. The trade-off remains the same: Google can reclaim the capacity at any time and terminate your instance. This makes Spot VM most suitable for workloads that can tolerate interruptions, such as batch processing, rendering, or computational jobs that can be resumed.
How to Create a Compute Engine Instance
- Make sure your GCP account is active. Sign up and complete account verification if you do not yet have full access to GCP services.
- Open Compute Engine in the GCP Console and click “Create Instance” to begin configuring a new VM.
- Choose a geographic zone. Server location affects latency, so select a region or zone close to your user base.
- Select a machine family and type based on your workload requirements — from E2 for cost efficiency to C4 for high performance.
- Choose an operating system from the available images, such as Debian or Ubuntu, or upload a custom image using Cloud Storage.
- Configure the boot disk — use SSD for better performance or HDD for larger capacity at a lower cost.
- Configure networking and firewall settings — define internal/external IP addresses and inbound and outbound traffic rules.
- Click “Create” — the instance should be ready to use within a few minutes.
Common Uses of Compute Engine
Compute Engine is suitable for a wide range of use cases: web applications and servers with support for autoscaling and load balancing; development and testing environments that can be cloned quickly using snapshots; databases such as MySQL and PostgreSQL with replication across zones; large-scale data processing through integrations with Apache Spark or Hadoop; and game servers that require low latency and consistent performance.
Best Practices for Managing Cost and Security
- Take advantage of Sustained Use Discounts — N2, N2D, N4, N4D, C3, and C4 machine families can receive automatic discounts that increase with qualifying usage during the month.
- Consider Committed Use Discounts for workloads that are expected to run continuously over the long term, providing deeper discounts than sustained usage savings.
- Use Spot VM for flexible workloads that can tolerate interruptions to achieve significant cost savings.
- Isolate your network with VPC (Virtual Private Cloud) and configure firewall rules and IAM permissions specifically rather than relying on broad default permissions.
- Use regular snapshots for backups and faster recovery in case of failures.
Analysis: When Should You Use Compute Engine Instead of Other Services?
Compute Engine provides the most detailed level of control among GCP compute services, but that also means you are fully responsible for configuring and maintaining the operating system. If your only requirement is to run a web application without managing the server yourself, App Engine or Cloud Run may be simpler choices. Compute Engine is particularly useful when you need deep customization — such as a specialized operating system, legacy software that requires manual installation, or highly specific network controls — requirements that can be difficult to meet with managed services such as App Engine.
Compare Compute Engine with other GCP hosting options in How to Host a Website on GCP, or learn more about official pricing and machine types in the official Compute Engine documentation.
FAQ
What is the difference between Compute Engine and a VPS from a regular hosting provider?
Conceptually, both are virtual machines that you manage yourself. The difference is that Compute Engine runs on Google’s global infrastructure, offers a much broader selection of machine families, and integrates deeply with other GCP services such as BigQuery and Cloud Storage.
Can Preemptible VM still be used?
Google has transitioned to Spot VM as the successor, with greater flexibility. For new workloads, Spot VM is the recommended option instead of the older Preemptible VM model.
Which machine family is the cheapest?
E2 generally offers the lowest cost per core and is suitable for development, testing, or applications that do not require maximum performance. However, it does not support custom machine types like several other families.
Do all machine families receive Sustained Use Discounts?
No. N2, N2D, N4, N4D, C3, and C4 are among the families that receive these discounts, so qualifying usage over a longer portion of the month can reduce the effective hourly cost.
When should I choose Compute Engine instead of App Engine?
Choose Compute Engine when you need full control over the operating system and server configuration. Choose App Engine when you want to focus on application code without managing the underlying infrastructure yourself.
Conclusion
Compute Engine remains a major foundation for VPS-style workloads on Google Cloud Platform, but its machine-family landscape continues to evolve. The N4 generation is now positioned as a primary balanced option replacing N2, while Spot VM has replaced Preemptible VM as the preferred way to obtain substantial discounts for interruptible workloads. For anyone evaluating Compute Engine, start by mapping your workload requirements — cost efficiency (E2), balanced performance (N4), or high performance (C4) — before choosing a configuration. You can then combine applicable Sustained Use Discounts, Committed Use Discounts, and Spot VM where appropriate to optimize long-term costs without sacrificing the flexibility of cloud infrastructure.





