firebase - 为什么我的项目 firestore 是 eu3,但 firebase 云功能位置是 US1?

标签 firebase google-cloud-platform google-cloud-functions

我希望 Firestore DB 和我的 Firebase 函数都位于 EU3 区域

目前firestore数据库是EU3 firebase 函数自动部署到 US1

有办法改变吗?

最佳答案

创建 Firebase 项目时,您必须选择 Cloud Firestore 和/或实时数据库的区域。一旦创建了这些资源,就无法更改它们。

您的 Cloud Functions 的区域在代码中指定 - 默认情况下为 us-central1。您可以像这样轻松更改它( see docs ):

// Example of a Cloud Function trigger for a delete event in RTDB:
functions
  .runWith({ memory: '512MB', timeoutSeconds: 30 })
  .region('europe-west1') // this specifies the region
  .database.ref('/documents/{documentId}/users')
  .onDelete(...);

要查看哪些区域可用,have a look here in the docs .

对于您的情况,如果您想在靠近数据库的位置执行 Cloud Functions,请将区域更改为 europe-west1

关于firebase - 为什么我的项目 firestore 是 eu3,但 firebase 云功能位置是 US1?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72110100/

相关文章:

java - 是否有Java或任何api可以通过给定的字符串(例如Apple-> Fruit)检测产品类型(类别)?

java - Firebase 更新后 RecyclerView 不刷新

swift - Firebase 问题 - 使用 iOS 8.3 的 iPod 上的实时数据库没有响应

google-cloud-platform - 如何更改谷歌云实例上的ssh端口?

node.js - 在存储位置 : Google Function 找不到存档

javascript - 云功能 - 无法看到我的功能部署到 firebase 控制台

firebase - 从字符串格式的 "gs"url 创建 Firebase 存储引用

google-cloud-platform - Cloud Run 是否受冷启动和最大执行长度的限制?

javascript - TypeError : firebase. auth(...).onAuthStateChanged 不是函数

node.js - 使用 Firebase Cloud Functions 时 Nodemailer queryA EREFUSED localhost