App Hosting とその他の Google ソリューション
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Firebase App Hosting などのサーバーレス プロダクトを使用すると、インフラストラクチャを自分で管理することなく、アプリケーションを迅速にデプロイできます。Google ソリューションの中で、App Hosting は、CDN からサーバーサイド レンダリングまでフルスタックを管理するため、一般的なフレームワークで最新のウェブアプリを作成するウェブ デベロッパーにとって最適な選択肢です。
ただし、App Hosting は Google のサーバーレス プロダクトの 1 つにすぎません。アプリの性質やスケーラビリティのニーズに応じて、App Hosting または次のいずれかのプロダクトを選択できます。
- Cloud Run: 最大限の構成可能性を備えたコンテナでバックエンド サービスを実行する場合に最適です。
- Cloud Functions: 単一目的のイベント ドリブン関数をすばやく作成する場合に最適です。
- Cloud Functions for Firebase: Cloud Functions と同様ですが、Realtime Database や Cloud Firestore などの他の Firebase 機能との統合を容易にするために、モデルが簡素化されています。
- Firebase App Hosting: サーバーサイド レンダリング(SSR)または生成 AI 機能を使用する最新のフレームワーク ベースのウェブアプリのホスティングに最適です。
- Firebase Hosting : ウェブサイトや画像などの静的アセットのホスティングに最適です。
費用について、Cloud Run、Cloud Functions、Firebase App Hosting を使用するには、まず請求先アカウントが必要です。小規模なデプロイ用の無料枠が含まれており、使用量に基づいて料金が設定されています。Firebase Hosting には、小規模なデプロイで請求アカウントを必要としない無料階層が用意されています。アプリのスケールアップに合わせて柔軟に拡張できます。
App Hosting と Firebase Hosting
App Hosting は Firebase Hosting の代替として簡単に使用できるものではなく、特定のギャップを埋めるものです。SSR を使用して動的なサーバー レンダリングのウェブアプリを開発している場合は、App Hosting が最適です。静的ウェブサイトまたはシングルページ アプリのホスティングが必要な場合は、元の Hosting を使用して費用とパフォーマンスを最適化することをおすすめします。
App Hosting と Firebase Hosting はサポートする機能に重複する部分があるため、より詳細な確認が必要になる場合があります。
機能
|
Hosting
|
App Hosting
|
サーバーサイド レンダリングされたウェブアプリの自動デプロイ
|
試験運用版
|
○
|
リクエストのタイムアウト |
1 分
|
5 分
|
キャッシュ タイムアウト
|
1 時間
|
1 時間
|
Stale-While-Revalidate キャッシュ制御
|
×
|
○
|
利用規約
|
Firebase
|
Cloud
|
静的コンテンツのオリジン レプリカ |
3
|
なし
|
動的コンテンツ領域
|
3
|
3
|
継続的デプロイ
|
限定的
|
組み込み
|
ビルドプロセス
|
ローカル環境 |
再現可能な環境
|
コンテンツをプレビューする
|
○
|
×
|
フォールト トレラント
|
グローバルなサービス停止
|
リージョンの停止 |
エミュレータ
|
○
|
○
|
App Hosting と Hosting の開発ライフサイクル機能
Firebase App Hosting は GitHub と深く統合されており、アプリを効率的に本番環境にロールアウトできます。ライブブランチに変更を push すると、App Hosting は再現可能な Cloud Build 環境でブランチをビルドします。その後、App Hosting ダッシュボード UI で、ウェブアプリの各バージョンをビルドに使用された正確なコミットに追跡できるため、特定の時点でどの変更がライブ状態であったかを確認できます。
また、Firebase Hosting は、GitHub アクションを使用した統合も提供しており、リポジトリ内のアクションに応じてプレビュー チャネルを作成し、ライブチャネルにデプロイできます。
Firebase CLI のフレームワーク試験運用版を使用してデプロイされたアプリ
Firebase CLI のフレームワーク試験運用版を使用して Firebase Hosting にデプロイされた最新のウェブアプリの場合は、App Hosting に「移行する」ことをおすすめします。App Hosting には、CDN からサーバーサイド レンダリングまですべてを管理する統合ソリューションがあり、GitHub インテグレーションが向上します。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-08 UTC。
[null,null,["最終更新日 2025-08-08 UTC。"],[],[],null,["\u003cbr /\u003e\n\nServerless products like Firebase App Hosting let you deploy applications\nfast, without managing the infrastructure yourself. Among Google solutions,\nApp Hosting is the best\nchoice for web developers creating modern web apps on popular\nframeworks because it manages the full stack, from the CDN to server-side\nrendering.\n\nHowever, App Hosting is only one of several Google serverless products.\nDepending on the nature of your app or your scalability needs, you might choose\nApp Hosting or one of these other products:\n\n- **[Cloud Run](https://cloud.google.com/run/docs):** Best for running backend services in containers with maximum configurability.\n- **[Cloud Functions](https://cloud.google.com/functions/docs):** Best for quickly creating single-purpose, event-driven functions.\n- **[Cloud Functions for\n Firebase](/docs/functions)** : Like Cloud Functions, but with a simplified model for easier integration with other Firebase features like Realtime Database or Cloud Firestore.\n- **Firebase App Hosting:** Ideal for hosting modern frameworks-based web apps with server-side rendering (SSR) or generative AI features.\n- **[Firebase Hosting](/docs/hosting):** Excellent for hosting static assets like websites and images.\n\nRegarding cost, Cloud Run, Cloud Functions, and Firebase App Hosting require\na billing account to get started, include a no-cost tier for small deployments,\nand are priced based on usage. Firebase Hosting offers a no-cost tier with\nno billing account required for small deployments, with flexibility to expand as\nyour app scales up.\n\nApp Hosting and Firebase Hosting\n\nApp Hosting is not a drop-in replacement for Firebase Hosting -- it fills\na specific gap. If you are developing a dynamic, server-rendered web app with\nSSR, App Hosting is definitely for you. If you want\nhosting for a static website or single-page app, it may make sense to use the\noriginal Hosting to optimize for cost and performance.\n\nSince App Hosting and Firebase Hosting have a degree of overlap in the\nfeatures they support, a more detailed look may be helpful.\n\n| Feature | Hosting | App Hosting |\n|--------------------------------------------------|-----------------------------------------------------------|-----------------------------------------|\n| Automatic deployment of server-rendered web apps | Experimental | Yes |\n| Request timeout | 1m | 5m |\n| Cache timeout | 1hr | 1hr |\n| Stale-While-Revalidate cache control | No | Yes |\n| Terms of Service | [Firebase](https://firebase.google.com/terms) | [Cloud](https://cloud.google.com/terms) |\n| Static content origin replicas | 3 | N/A |\n| Dynamic content regions | 3 | 3 |\n| Continuous deployment | [Limited](/docs/hosting/github-integration) | Built-in |\n| Build process | Local environment | Reproducible environment |\n| Preview content | [Yes](/docs/hosting/test-preview-deploy#preview-channels) | No |\n| Fault tolerance | Global outage | Regional outage |\n| Emulator | Yes | Yes |\n\nDevelopment lifecycle features of App Hosting and Hosting\n\nFirebase App Hosting is deeply integrated with GitHub and offers efficient\nrollouts to production for your app. When you push a change to your live branch,\nApp Hosting builds the branch in a reproducible Cloud Build environment.\nThen, in the App Hosting dashboard UI, you can track each version of\nyour web app to\nthe exact commit it was built with, so that you know which changes were live at\na certain time.\n\nFirebase Hosting also provides a degree of\n[integration using GitHub actions](/docs/hosting/github-integration)\nto create preview channels and deploy to live channel in response to actions in\na repository.\n\nApps deployed using the frameworks experiment in the Firebase CLI\n\nFor modern web apps deployed to Firebase Hosting using\nthe frameworks experiment in the Firebase CLI, we recommend \"graduating\" to\nApp Hosting. With App Hosting, you'll have a unified solution to\nmanage everything from CDN to server-side rendering, along with improved\nGitHub integration."]]