Google数据存储跨区域复制 [英] Google Datastore cross region replication

查看:115
本文介绍了Google数据存储跨区域复制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个在美国和欧盟托管的应用程序。
为了获得最佳性能,我们将在两个位置上托管一个数据存储实例。



现在我们的问题是如何将数据从美国数据存储复制到EU数据存储?



或者,无论我们在哪里存储技术视图的数据?

解决方案 div>

没有多点GAE应用程序(至少现在还没有)。该应用程序的独特位置可以在创建应用程序时选择,并且无法更改。请参阅 App Engine - 如何在地区中创建项目 - 中央转移到eu-datacenter的gae应用程序或重新开放



来自创建项目和应用程序


重要提示:每个Cloud Platform项目只能包含一个App Engine应用程序,并且在
创建App Engine应用程序后无法更改区域。


现在数据存储本身只能存在于一个云计划中,该计划也将1:1映射到一个位置。从 Google云端数据存储位置


创建Google Cloud Platform项目时,您必须选择存储项目数据的
位置。为了减少延迟和
增加可用性,请将数据存储在需要它的用户和服务
附近。您可以在以下位置创建项目:




  • europe-west - 西欧
  • us-central - 美国中部

  • us- east1 - 东部美国

  • asia-northeast1 - 东北亚 - 太平洋


App Engine和Cloud Datastore都被列为具有多区域覆盖的产品(请参阅 https://cloud.google.com/about/locations/ )。但是这种报道不是全球性的,它仍然包含在一个地区集团内。而美国和欧盟在不同的地区集团,所以这不会帮助你。从多区域资源


与多区域资源相关的数据不与特定区域的
绑定,并且可以在区域和区域之间移动,可以添加
并从区域组中删除。例如,欧元区bb $ b谷仓云存储中的存储桶可将数据保留在欧盟内部
,但可以将剩余数据存储或移动到任何云存储欧盟地区(受
服务条款服务特定条款)。

因此,至多可以在2个不同区域中部署2个不同 GAE应用程序,最终来自(几乎)相同的代码。



您需要照顾自己跨这些应用程序复制数据,例如通过在应用程序之间为此目的添加自定义/专用通信或使用远程API (每个应用都像客户端一样另一个应用程序的远程API)。

最有可能不是微不足道的,特别是如果数据一致性很重要。在这种情况下,根据您的地理位置,您的可能会因单个应用程序而更好,并会对您的某些客户造成一些性能损失。


We have a app that is hosted in US and the EU. For great performance we will host a datastore instance on both locations.

Now is our question how we can replicate the data from the US datastore to the EU datastore?

Or is it no matter where we store the data from technical view?

解决方案

There is not such thing as multi-location GAE apps (at least not yet). The app's unique location can be selected when the app is created and cannot be changed. See App Engine - How to create project in region us-central and gae app moving to eu-datacenter or re-opening

An important note from Creating a project and application:

Important: Each Cloud Platform project can contain only a single App Engine application and you cannot change the region after you create the App Engine application.

Now the datastore itself can only exist in a single cloud project, which also maps 1:1 to a location. From Google Cloud Datastore Locations:

When you create a Google Cloud Platform project, you must choose a location where the project's data is stored. To reduce latency and increase availability, store your data close to the users and services that need it. You can create projects in the following locations:

  • europe-west — Western Europe
  • us-central — Central United States
  • us-east1 — Eastern United States
  • asia-northeast1 — Northeastern Asia-Pacific

Both App Engine and Cloud Datastore are listed as products with Multi-Regional Coverage (see https://cloud.google.com/about/locations/). But that coverage is not global, it still remains contained within a region group. And US and EU are in different region groups, so this won't help you. From Multi-regional resources:

The data associated with multi-regional resources is not tied to a specific region and can be moved between regions and regions can be added and removed from a region group. For example, buckets in the European Union location for Google Cloud Storage keep data at-rest inside the European Union, but at-rest data can be stored in or moved to any Cloud Storage region within the European Union (subject to terms of service and service specific terms).

So at best you can have 2 different GAE apps deployed in 2 different regions, eventually from (almost) the same code.

You need to take care of replicating the data across these apps yourself, for example by adding custom/dedicated communication between the apps for that purpose or by using the Remote API (each app acting like a client for the other app's remote API).

Most likely not trivial, especially if the data consistency is important. In such case you might be better off with a single app and some performance penalty for some of your customers, based on their location.

这篇关于Google数据存储跨区域复制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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