This document explains how to plan, deploy, and manage standard, general-purpose compute workloads on Google Cloud by using Compute Engine instances.
For high-level guidance on choosing among different compute products, see Choose compute options.
Overview
In Google Cloud, standard compute refers to deploying standard, general-purpose applications directly on compute instances. Unlike containerized platforms such as Google Kubernetes Engine (GKE), or serverless platforms such as Cloud Run, standard compute provides Infrastructure as a Service (IaaS). You have complete control over the guest operating system, file system, networking, and software stack.
Standard compute is suitable for the following workloads:
- Traditional multi-tier applications: web and application servers that run on compute instances without container orchestration.
- Self-managed databases: relational or NoSQL database engines running on dedicated compute instances with specific storage or licensing needs.
- Monolithic and legacy software: commercial ready-made applications, line-of-business (LOB) software, or systems that cannot be containerized.
- Custom operating system configurations: workloads requiring custom Linux kernels, specific kernel modules, or certified Windows Server configurations.
Control and responsibility
When using standard compute, you operate under a shared responsibility model:
- Google manages: physical data centers, server hardware, virtualization host infrastructure, physical network hardware, and storage infrastructure.
- You manage: guest operating system installation and patching, application configuration, user access control, firewall rules, and data backup policies.
Pricing and cost optimization
Compute Engine charges for compute instances based on memory, CPU cores, GPUs, TPUs, disks, and networking. For details, see Compute Engine pricing.
For steady-state, long-running enterprise workloads, you can optimize costs by using the following tools:
- Committed use discounts (CUDs): you can get discounted prices for compute resources in exchange for a commitment to maintain continuous resource usage for a 1-year or 3-year term.
- Machine type recommendations: Compute Engine can use historical instance utilization to identify overprovisioned or underutilized compute instances, and recommend optimal machine sizes.
Web serving architectures
You can host web applications and APIs on Compute Engine by using different architectural patterns depending on your traffic volume, redundancy requirements, and operational complexity. Web serving operates as a continuous, long-running serving process, in contrast to finite batch processing jobs.
Common deployment patterns
- Single-instance web servers: a single compute instance running a web server (such as NGINX, Apache, or IIS). This pattern is suitable for development environments, internal tools, or low-traffic websites where high availability is not required.
- Multi-instance load-balanced web servers: multiple compute instances running identical web server software behind Cloud Load Balancing. This pattern provides high availability and traffic distribution across zones.
- Stateless managed instance groups (MIGs): a managed group of identical compute instances created from an instance template. Stateless MIGs automatically scale the number of compute instances based on CPU utilization or HTTP traffic, and automatically recreate unhealthy instances. For more information, see Instance groups.
Supporting services for web architectures
- Cloud Load Balancing: distributes incoming HTTP(S), TCP, or UDP traffic across compute instances across multiple zones or regions.
- Cloud CDN: caches static web assets (such as images, CSS, and JavaScript) at Google edge locations to reduce latency and compute instance load.
- Cloud Armor: provides web application firewall (WAF) protection and DDoS mitigation for load-balanced web applications.
When to choose Compute Engine for web serving
Use Compute Engine for web serving when:
- Your application depends on specific OS-level packages, kernel extensions, or system daemons strictly incompatible with containerized runtimes.
- You are migrating existing on-premises compute instances to the cloud with minimal re-architecture (lift and shift).
- You require static IP addresses attached directly to individual virtual network interfaces.
If your web application is containerized and stateless, consider using Cloud Run or GKE to reduce infrastructure management overhead.
Database setups on Compute Engine
You can run self-managed database engines on compute instances when you need granular control over database binaries, configuration parameters, and underlying storage layouts.
Common database workloads
- Relational databases: PostgreSQL, MySQL, MariaDB, and Microsoft SQL Server.
- NoSQL databases: MongoDB, Apache Cassandra, Couchbase, and Redis.
- Enterprise database platforms: Oracle Database and SAP HANA on certified Compute Engine machine types.
Storage selection for databases
Selecting the correct block storage type is critical for database performance and data durability:
| Storage type | Best for | Key characteristics |
|---|---|---|
| Hyperdisk Extreme | High-performance production databases, transactional systems | High IOPS and throughput, independently configurable performance |
| Hyperdisk Balanced / Balanced Persistent Disk | General-purpose databases, development and testing environments | Balanced price and performance for mainstream workloads |
| Local SSD | In-memory caches, temporary database scratch space | Ultra-low latency, non-persistent storage tied to compute instance lifecycle |
For a detailed comparison of block storage options, see Block storage.
High availability and disaster recovery
To ensure continuous operation of self-managed databases:
- Multi-zone deployment: deploy database replicas across different zones in the same region by using database-native replication (such as PostgreSQL streaming replication or MySQL replication).
- Regional Persistent Disk and Hyperdisk Balanced High Availability: use Regional Persistent Disk and Hyperdisk Balanced High Availability storage to provide synchronous data replication across two zones in the same region.
- Scheduled snapshots: configure automated snapshot schedules for data disks to support point-in-time recovery.
When to self-manage databases on Compute Engine
Self-manage your database on Compute Engine when:
- You require database versions, extensions, or third-party plugins not supported by managed database services.
- You require direct root or administrator access to the underlying operating system.
- You have existing database software licenses (Bring Your Own License, BYOL) that apply to compute instance cores.
If standard configurations meet your needs, consider using fully managed database services such as Cloud SQL, AlloyDB for PostgreSQL, or Spanner to eliminate database administration overhead.
Custom and legacy application stacks
Many enterprise applications require specific execution environments that don't fit into containerized or serverless frameworks. Compute Engine provides the environment flexibility needed to run these systems.
Workload characteristics
- Commercial ready-made applications: packaged enterprise applications from third-party vendors that specify compute instance-based installation and support models.
- Monolithic architectures: applications where the presentation tier, business logic, and background processing run together in a unified operating system environment.
- Custom OS and kernel requirements: applications that depend on specific Linux kernel versions, kernel modules, or legacy Windows Server distributions.
- Proprietary licensing: software licensed per physical socket, core, or MAC address, including license server integrations.
Migration approach
For custom and legacy workloads, the standard path is a lift-and-shift migration:
- Assess on-premises resource utilization (CPU, memory, storage IOPS).
- Use Migrate to Virtual Machines to replicate on-premises compute instances directly into Compute Engine.
- Select appropriate Compute Engine machine families (such as general-purpose C4 and C4D) to match performance requirements.
- We recommend that you use sole-tenant nodes for workloads with strict licensing requirements for Bring Your Own License (BYOL) software.
Managing independent compute instances
When managing loosely coupled or un-orchestrated compute instances on Compute Engine, you retain direct control over the guest operating system, runtime environment, and data lifecycle. To maintain high reliability and reduce operational overhead across independent compute instances, focus on the core operational strategies described in the following sections.
Centralize OS lifecycle and configuration management
Instead of manually connecting to individual compute instances to apply updates or manage packages, manage instances through centralized configuration and patching policies. This approach reduces configuration drift and maintains security compliance across environments.
- Automated patching: use VM Manager to automate operating system inventory collection, vulnerability scanning, and scheduled patch deployments across Linux and Windows instances.
- Policy-driven configuration: to enforce consistent software packages and OS policies across fleets of independent compute instances, see OS configuration management.
Standardize identity, access, and network isolation
Secure independent compute instances by enforcing organization-level identity controls and isolating network perimeters:
- Centralized access management: manage administrative SSH access through Identity and Access Management (IAM) permissions and organization policies rather than maintaining static SSH keys on individual compute instances. For details, see OS Login overview.
- Network perimeter defense: place compute instances on private Virtual Private Cloud (VPC) subnets without public external IP addresses. Use Cloud NAT for secure outbound internet connectivity (such as software updates) and Private Google Access to connect to Google Cloud APIs.
- Host and boot integrity: protect instances against boot-level and kernel-level tampering by enabling Shielded VM features (Secure Boot, vTPM, and integrity monitoring).
Establish automated observability
Because un-orchestrated compute instances lack an automated platform orchestrator to restart failed services or detect degraded performance, implement centralized telemetry and alerting:
- In-guest telemetry: install the Ops Agent to collect detailed system metrics, such as memory and disk utilization, and application logs.
- Proactive alerting: configure alerting policies in Cloud Monitoring for resource exhaustion, health check failures, or host maintenance events.
Decouple data and automate recovery
Ensure business continuity for standalone compute instances by separating persistent data from the compute lifecycle and establishing automated recovery points:
- Automated disk snapshots: protect application and database storage against data corruption or accidental deletion by configuring scheduled snapshot policies.
- Compute and storage decoupling: store persistent application state on dedicated secondary disks (such as Hyperdisk or Persistent Disk) rather than the boot disk, enabling disks to be quickly attached to replacement compute instances during recovery.
- Comprehensive disaster recovery: for enterprise-wide backup policies and application-consistent recovery across multiple workloads, see Backup and DR Service.
What's next
- Compare compute options on Google Cloud: Choose compute options
- Explore available machine families: Machine families resource guide
- Review block storage choices: Block storage overview
- Plan a compute instance migration: Migrate to Virtual Machines documentation