注意:Go 1.11 已於 2024 年 1 月 30 日
停止支援。現有的 Go 1.11 應用程式將繼續執行並接收流量。不過,App Engine 可能會阻擋
支援期限過後使用執行階段的應用程式重新部署。建議您
改用最新的 Go 支援版本。
瞭解資料與檔案儲存空間
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
如要在 App Engine 上儲存資料與檔案,可以使用 Google Cloud 服務或您的語言支援且可從 App Engine 執行個體存取的其他任何儲存空間服務。這些第三方資料庫可能由其他雲端服務供應商託管、在內部部署環境中託管,或由第三方廠商代管。
Google Cloud 儲存空間服務
對於在 App Engine 中執行的 App Engine 應用程式,建議使用下列其中一項 Google Cloud 儲存空間服務:
如需 Google Cloud 儲存空間產品的完整清單,請參閱 Cloud Storage 產品頁面。
其他雲端服務供應商
App Engine 應用程式可以連線至其他公用雲端託管的外部資料庫,前提是這些資料庫伺服器和您的防火牆均已適當設定,可以接受連線。您的 App Engine 應用程式會利用外部服務的公開 IP 位址,透過網際網路建立連線。
第三方供應商代管的資料庫
許多服務供應商都提供代管資料庫服務,例如 MongoDB 的 mLab,以及 Redis Labs 提供的託管 Redis 快取服務。這些供應商可處理資料庫的託管、設定和維護作業。App Engine 可以透過網際網路連線至這些外部服務,方法跟其他公用雲端一樣,都是使用服務的公開 IP 位址進行連線。
內部部署
如要讓 App Engine 應用程式能夠存取現有的內部部署資料庫,您可以設定內部網路和防火牆來給予資料庫一個公開 IP 位址,或是使用 VPN 來連線。
設定
Cloud VPN 後,App Engine 應用程式就能存取內部部署網路,不必讓資料庫伺服器冒著直接暴露到公開網際網路的風險。App Engine 和 Compute Engine 都使用相同的網路基礎架構,因此您可以使用 VPN 連線,利用資料庫伺服器的內部 IP 位址來建立 App Engine 應用程式與內部部署資料庫之間的連線。
實際運作環境注意事項
您可以透過設定,讓 App Engine 依據各種指標,水平自動調整應用程式的資源配置。資料庫經常會因為資源調度而進行重大變更,這點與網路應用程式不同。在實際運作環境中出現龐大流量時,App Engine 可能會迅速導致資料庫癱瘓。建議您在設定和部署資料庫時,將預期的平均流量負載和尖峰時段負載納入考量。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-08 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-08 (世界標準時間)。"],[[["App Engine allows you to store data and files using various Google Cloud storage services, such as Firestore in Datastore mode, Cloud SQL for MySQL or PostgreSQL, and Cloud Storage for files."],["You can connect App Engine apps to external databases hosted on other public clouds, provided the database servers and firewalls are configured to accept connections via public IP addresses."],["App Engine can integrate with third-party managed database services, like mLab for MongoDB or Redis Labs for Redis caching, connecting via the service's public IP address."],["On-premises databases can be accessed by App Engine apps by configuring the internal network to provide the database with a public IP address, or through a VPN connection using Cloud VPN for enhanced security."],["When deploying databases for production with App Engine, it is crucial to account for average traffic load and potential spikes, as databases may require significant adjustments to scale effectively."]]],[]]