是否可以稍后在 DynamoDB GlobalTable 中添加区域
Is it possible to add regions later in DynamoDB GlobalTable
AWS 最近提出了 GlobalTable 来实现跨不同区域的多主机、容错设置。限制之一似乎是设置 GlobalTable 的 "Table must be empty"。
问题是 - 我可以从美国的 2 个区域开始,然后随着我们的发展扩展到其他区域吗?如果是,则上述约束条件不成立。
有人试过 GlobalTable 了吗?有什么想法吗?
我会尽量根据你举的例子来回答。
假设您有两个 DynamoDB table,一个在 us-east-1,另一个在 us-west-1。根据 DynamoDB 的术语,这两个 tables 是 replica tables。现在,您想在 eu-west-1.
中添加另一个 table
答案是可以,但前提是根据 this 文档满足以下限制条件:
- The table must have the same partition key as all of the other replicas.
- The table must have the same name as all of the other replicas.
- The table must have DynamoDB Streams enabled, with the stream containing both the new and the old images of the item.
- None of the replica tables in the global table can contain any data.
换句话说,您在 us-east-1 和 us-west-1 中的 table 必须是空的。如果不是,您将无法将 eu-west-1 中的那个添加到全局 table.
快速更新:自 2019 年 11 月起,此功能现已可用
https://aws.amazon.com/about-aws/whats-new/2019/11/you-can-now-enhance-availability-of-your-existing-amazon-dynamodb-tables-by-adding-global-replicas/
要注意的是,dynamodb 表现在有两个版本,所有在 11/21/2019(旧版本)之前创建的表都没有启用该功能。
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GlobalTables.html
AWS 最近提出了 GlobalTable 来实现跨不同区域的多主机、容错设置。限制之一似乎是设置 GlobalTable 的 "Table must be empty"。
问题是 - 我可以从美国的 2 个区域开始,然后随着我们的发展扩展到其他区域吗?如果是,则上述约束条件不成立。
有人试过 GlobalTable 了吗?有什么想法吗?
我会尽量根据你举的例子来回答。
假设您有两个 DynamoDB table,一个在 us-east-1,另一个在 us-west-1。根据 DynamoDB 的术语,这两个 tables 是 replica tables。现在,您想在 eu-west-1.
中添加另一个 table答案是可以,但前提是根据 this 文档满足以下限制条件:
- The table must have the same partition key as all of the other replicas.
- The table must have the same name as all of the other replicas.
- The table must have DynamoDB Streams enabled, with the stream containing both the new and the old images of the item.
- None of the replica tables in the global table can contain any data.
换句话说,您在 us-east-1 和 us-west-1 中的 table 必须是空的。如果不是,您将无法将 eu-west-1 中的那个添加到全局 table.
快速更新:自 2019 年 11 月起,此功能现已可用 https://aws.amazon.com/about-aws/whats-new/2019/11/you-can-now-enhance-availability-of-your-existing-amazon-dynamodb-tables-by-adding-global-replicas/
要注意的是,dynamodb 表现在有两个版本,所有在 11/21/2019(旧版本)之前创建的表都没有启用该功能。 https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GlobalTables.html