Cloud Run は Google Cloud のサーバレスコンテナプラットフォームで、任意言語の Docker イメージをデプロイして自動スケールできます。 Knative ベースで、HTTP リクエスト駆動 (Service) とバッチ処理 (Job) の両モードに対応。マイクロサービスの第一選択肢として GKE と並ぶ存在になっています。
| 項目 | Service | Job |
|---|---|---|
| トリガー | HTTP リクエスト / Eventarc / Pub/Sub Push | 手動 / Cloud Scheduler / Workflows |
| 実行時間 | 最大 60 分 / リクエスト | 最大 7 日 / タスク |
| 並列度 | 同時リクエストで横スケール | Parallelism 設定で並列タスク |
| 主用途 | Web API / マイクロサービス | バッチ処理 / ETL / レポート生成 |
| 項目 | 料金 (us-central1, 2026) |
|---|---|
| vCPU 時間 | $0.00002400 / vCPU 秒 (リクエスト処理中) |
| メモリ時間 | $0.00000250 / GiB 秒 |
| リクエスト数 | $0.40 / 100 万リクエスト |
| 無料枠 | 月 240,000 vCPU 秒、450,000 GiB 秒、200 万リクエスト |
| 項目 | Cloud Run | Cloud Functions (2nd gen) | GKE Autopilot |
|---|---|---|---|
| ベース | Container | Container (内部) | Kubernetes |
| 言語 | 任意 | Node / Python / Go / Java / .NET / Ruby / PHP | 任意 |
| 最大実行時間 | 60 分 (Service) | 9 分 (HTTP) / 60 分 (Event) | 無制限 (Pod) |
| スケール | 0 → 1000 | 0 → 3000 | Pod 数調整 |
| 料金 | 従量 | 従量 | Pod 時間 (vCPU/メモリ) |
| 主用途 | マイクロサービス全般 | イベント駆動 | 複雑なオーケストレーション |
Cloud Run (Backend) + Cloud SQL (PostgreSQL) + Cloud Storage (画像) + IAP / Cloud Armor (セキュリティ)
Pub/Sub → Cloud Run (Push) → Firestore / BigQuery 書き込み
Cloud Scheduler → Cloud Run Job → BigQuery / GCS 処理
Global External HTTPS LB + 複数リージョン Cloud Run Service + Cloud CDN
Cloud Run と Cloud Functions の違いは?
Cloud Run = Container ベース、任意言語、長時間処理 OK (最大 60 分)。Cloud Functions = ソースコードベース、特定言語、短時間処理向け。Cloud Functions 2nd gen は内部的に Cloud Run 上で動作します。
Cloud Run Service と Job の違いは?
Service = HTTP リクエスト駆動 (常時起動可能)、Job = バッチ処理 (タイムアウトまで実行して終了)。スケジュール実行は Cloud Scheduler から Job をトリガー。
GKE と Cloud Run どちらを選ぶ?
コンテナのスケール管理を Google に任せたい → Cloud Run、Kubernetes API / カスタムワークロード / StatefulSet が必要 → GKE。マイクロサービスは Cloud Run が圧倒的に楽。
コールドスタートはどのくらい?
ベースイメージ + アプリ次第。Go / Rust / Node.js なら 100ms 以下、Java / Python は 1〜3 秒。Min instances 1 でゼロにできるがコスト発生。
料金体系は?
CPU 時間 + メモリ時間 + リクエスト数。リクエスト処理中のみ課金 (Request-based、CPU is allocated only during request processing)、または Always-on モード。月 200 万リクエストまで無料枠あり。
Cloud Run でステートを保持できる?
原則ステートレス。状態は Firestore / Cloud SQL / Memorystore に外出し。Persistent Volume 不可。Cloud Run Volumes (Cloud Storage マウント) は限定的に利用可能。
認証はどう設定する?
Public (allUsers) または IAM 制限 (roles/run.invoker)。Cloud Endpoints / API Gateway / Apigee を前段に置く構成も一般的。Service-to-Service は Service Account + ID token。
Cloud Run でリージョン横断デプロイは?
可能。Global External HTTPS LB の Backend に複数リージョンの Cloud Run Service を登録。最寄りリージョンに自動ルーティング。
関連記事・コンピュート
App Engine 完全ガイド|Standard vs Flexible・料金・Cloud Run 比較 (GCP)
Google App Engine の Standard と Flexible の違い、料金、Traffic Splitting、Cron、Cloud Run / Cloud Functions との使い分け、AWS Elastic Beanstalk / Azure App Service 比較を徹底解説。
GCP Professional Cloud Developer (PCD) 完全ガイド|Cloud Run・GKE・CI/CD・APM
Google Cloud Professional Cloud Developer の試験範囲、Cloud Run / GKE / Cloud Build / Cloud Trace、AWS DVA / Azure AZ-204 比較、学習ロードマップを徹底解説。
Cloud Scheduler + Cloud Functions/Run で定期バッチ自動化チュートリアル (GCP)
Google Cloud Scheduler と Cloud Functions / Cloud Run Job で定期バッチ自動化。cron 形式、OIDC 認証、リトライ、Dead Letter、Workflows 連携、Cloud Run Job 並列実行を 2026 年最新版で解説。
Cloud Functions (2nd gen) 完全ガイド|1st gen 違い・料金・Lambda 比較 (GCP)
Google Cloud Functions 2nd gen の全機能解説。1st gen 違い、Eventarc 統合、Cloud Run ベース、対応言語、コールドスタート対策、AWS Lambda 比較、無料枠・料金体系を網羅。
※ Google Cloud、Cloud Run は Google LLC の商標です。最新情報は Cloud Run 公式 をご確認ください。
NicheeLab編集部
データエンジニアリング・クラウド資格の専門家。Databricks・Snowflake等の認定資格を保有し、実務経験に基づいた問題作成・解説を行っています。NicheeLab運営。
Google Cloud (GCP) 認定資格ロードマップ 2026 完全版|全 15 試験を体系化
Google Cloud 認定資格 全 15 試験 (Foundational 2 + Associate 3 + Pr...
Cloud Digital Leader (CDL) 完全ガイド|出題範囲・学習リソース・合格戦略
Google Cloud Cloud Digital Leader (CDL) の完全ガイド。6 ドメイン 92 bul...
Generative AI Leader (GAIL) 完全ガイド|Google Cloud 生成 AI 認定
Google Cloud Generative AI Leader (GAIL、2025-05-14 リリース) の完全...
Vertex AI 入門|Google Cloud 統合 ML プラットフォームの全機能
Google Cloud Vertex AI の入門解説。Vertex AI Studio / Agent Builde...
GCP Associate Cloud Engineer (ACE) 完全ガイド|試験範囲・受験料・学習ロードマップ
Google Cloud Associate Cloud Engineer (ACE) の試験範囲・受験料 125 US...