App Hosting on Google Cloud

Google Cloud offers a wide range of options for application hosting. Take a look at the charts below to find out which one is right for your needs.


Use cases

Not sure where to start? Take a look at some common scenarios below.
HTTP services and backend apps
Web frameworks, microservices
Examples:
  • Flask
  • Django
  • Express.js
  • Symfony
  • Spring Boot
Cloud Run
  • Scales to meet sudden demand
  • Pay for what you use
  • Supports API endpoints
Cloud Run Overview
Event driven and data processing apps
Manipulate user generated data and events
Examples:
  • Post a comment on Slack channel following a GitHub commit
  • Statistical analysis
  • Image thumbnail generation
Cloud Functions
  • Designed for event-driven workloads
  • Scales to meet sudden demand
  • Minimal configuration
Cloud Functions Quickstart
Container-based apps and services
Industry standard packaging for multi-cloud infrastructure
Examples:
  • Custom runtime environments such as Rust, Kotlin, C++, and Bash
  • Legacy web apps using languages such as Python 2.7, Java 7
Cloud Run
  • Supports industry-standard Docker containers
  • Scales your containerized app automatically
  • Custom binaries and system dependencies
  • Supports API endpoints
Cloud Run Quickstart
On-premises and monolithic workloads
Raw compute to meet existing infrastructure requirements
Examples:
  • Relational databases, SAP HANA
  • CRM systems
  • Legacy ERP systems
Compute Engine
Compute Engine Tutorials
Self-hosted, scalable infrastructure
Self-managed hosting, with serverless scalability
Examples:
  • Containerized apps that need custom hardware and software (OS, GPUs)
  • Existing containerized stateless apps
  • Apps on Google Kubernetes Engine that can benefit from scaling to zero
Cloud Run for Anthos
  • Industry standard Docker container packaging
  • Highly configurable for legacy workloads and configurations
  • Scales to meet demand, including scale to zero 1
Cloud Run for Anthos Quickstart

Hosting options

Many workloads have specific technical requirements. Platforms are ordered by degree of abstraction.
Compute Engine Google Kubernetes Engine (GKE) Cloud Run for Anthos Cloud Run App Engine flexible environment App Engine standard environment Cloud Functions
Deployment format
VM image
Cluster
Container

App

or

Container

App

or

Container

App
Function
Custom URLs
Scale-to-zero
~
1
Free tier
Persistent disks
2
Custom system packages
WebSockets
~
3
β
Run any language
Request timeout
None
None
15 minutes
60 minutes
60 minutes
1 minute
9 minutes
Background processes
~
4
GPU/TPU access
~
3
VPC connectivity
Managed event-driven architecture support
1
Cloud Run for Anthos scales pod counts to zero. The node count per cluster cannot scale to zero, and these nodes are billed during no-request periods.
2
Container instances on GKE do not persist data upon shutdown. However, Compute Engine persistent disks can be mounted to container instances on GKE.
3
While WebSocket use and GPU/TPU access are technically possible with Cloud Run for Anthos, they are not officially supported.
4
App Engine standard environment supports background tasks for basic and manual scaling modes.
β
Beta software has no SLA and may not be suitable for production workloads.

Key terms

Deployment format

How is your code packaged upon deployment to a given platform?

  • VM images - snapshots of an entire filesystem, including the underlying OS.
  • Containers - portable cross-platform filesystems isolated from the underlying OS.
  • Apps - one service contained in a directory with one or more use cases.
  • Functions - individual code snippets each corresponding to a single use case.

Custom URLs

Can you create multi-layer URL paths (such as /abc/def) and/or use your own domain name?

Persistent disks

Can disk state be saved when an instance shuts down, or must long-term data be stored outside the instance?

Scale-to-zero

Can this product scale down to zero instances and avoid billing me for periods of zero requests?

WebSockets

Does this product support the WebSocket protocol?

Run any language

Can this product run code in arbitrary programming languages?

Request timeout

What is the maximum amount of time the platform will wait for a response from the application's code?

Background processes

Can this product run ongoing background operations outside a request period?

Use GPUs and TPUs

Does this product support hardware acceleration for GPU/TPU-optimized workloads?

VPC connectivity

Can this product access resources within a Virtual Private Cloud?