Cloud Firestore 数据是否跨大陆复制? [英] Is Cloud Firestore data replicated over continents?

查看:29
本文介绍了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)

NY 用户是否可以在案例 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?

即使您使用目前仅适用于美国和欧盟的多区域数据库.据我了解,多区域仅在同一大陆(北美、欧盟)的区域内复制数据,而不是在大陆之间.那么如何使用 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天全站免登陆