Cloud Firestore数据是否可以在各大洲之间复制? [英] Is Cloud Firestore data replicated over continents?

查看:33
本文介绍了Cloud Firestore数据是否可以在各大洲之间复制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在阅读此博客文章.这使我想知道在区域和多区域数据库项目的情况下如何处理数据复制和故障转移.文章提到,事情有点简化.但我希望这篇文章中关于数据复制的观点有一定道理.

I was reading this blog post. It make me wonder how data replication and fail overs handled in case of regional and multi-regional database projects. Article mentions that things are over-simplified a bit. But I hope there is certain truth to the point made in the article about data replication.

所以我的问题是:

假设用户正在编写社交媒体应用,其中纽约的用户希望查看悉尼的用户个人资料.

Lets say user is writing a social media app, where user in NY wants to look the profile of the user in Sydney.

  • 案例1:如果我正在为此应用使用区域数据库(每个区域中只有区域数据库)

  • Case 1: If I am using regional databases for this app (only regional database in every region)

案例2:如果我正在使用美国和欧盟的多区域数据库以及其他国家(亚洲,澳大利亚)的区域数据库

Case 2: If I am using multi-regional databases for US and EU and regional database for others (Asia, Australia)

在案例1,案例2中,纽约用户是否可以查看悉尼用户的个人资料?区域数据库中是否在大陆上复制了数据?

Is it possible for NY user to view the profile of the Sydney user in case 1, case 2? Is data replicated over continents in regional databases case?

即使您使用的多区域数据库目前仅适用于美国和欧盟.据我了解,多区域仅复制同一大陆(NA,EU)区域内的数据,而不是各大洲之间的数据.那么,如何使用Firestore将社交媒体应用构建到全球市场呢?

Even if you use multi region databases which only available for US and EU for now. As I understood muti-region only replicated data within the regions of the same continent(NA, EU), not between continents. So how to build social media app to global market using Firestore?

推荐答案

在项目中创建Firestore数据库时,您可以选择是否:

When you create a Firestore database in a project, you get to choose whether to:

  1. 将数据存储在单个区域中.

  1. Store the data in a single regional location.

在这种情况下,数据存储在单个地理区域中的多个数据中心中.例如: us-east4 ,这是北弗吉尼亚州的数据中心.

In this case the data is stored in multiple data centers in a single geographical region. For example: us-east4, which are data centers in Northern Virginia.

将数据存储在多区域位置.

Store the data in multi-region locations.

在这种情况下,数据存储在多个地理区域的多个数据中心中.例如: nam5/us-central ,它是整个美国的数据中心.

In this case the data is stored in multiple data centers across multiple geographical regions. For example: nam5/us-central, which are data centers across the entire US.

有关更多信息,请参见位置类型上的文档.

For more on this, see the documentation on location types.

创建数据库时,您将必须选择以下选项之一.因此,您不能选择多区域位置和单个区域位置的混合.

You will have to pick one of these options when you create the database. So you can't select a mix of of multi-region and single region locations.

您的应用程序的所有用户都访问相同的数据.写入数据后,将自动跨区域中的所有数据中心复制数据.

All users of your app access the same data. When data is written, it is automatically replicated across all data centers in the region(s).

这篇关于Cloud Firestore数据是否可以在各大洲之间复制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆