【发布时间】:2016-12-06 10:39:54
【问题描述】:
我正在使用dynamodb来存储一个应用程序的配置,这个配置很可能一天改几次,会在几十行的量级。我的应用程序将部署到多个 EC2 实例。我最终将编写另一个应用程序来管理配置,同时通过直接在 AWS 控制台中对表进行更改来管理配置。
我正在尝试使用 dynamo 流来监视配置的更改,当应用程序接收到要处理的记录时,它只是重新读取整个 dynamo 表。
这在本地和部署到一个实例时有效,但是当我将它部署到三个实例时,它从不初始化 IRecordProcessor,并且不会对表进行任何更改。
我怀疑这是因为该表只有一个分片和the number of instances should not exceed the number of shards(至少对于 kinesis 流,我知道 kinesis 和 dynamo 流实际上是 different)。
我知道如何在 kinesis 流中拆分分片,但似乎无法为 dynamo 流找到一种方法。我读到了,事实上,the number of shards in a dynamo stream is equal to the number of partitions in the dynamo table,你可以increase the number of partitions by increasing read/write capacity。我不想增加吞吐量,因为这会很昂贵。
- 分片数应大于实例数的条件是否也适用于 dyanmo 流?如果是,是否有另一种方法来增加分片的数量,如果没有,是否有已知原因导致小型表上的 dynamo 流在被多个实例读取时失败?
- 是否有更好的方法来存储和查看此类配置(最好使用 AWS 基础设施)?我要调查触发因素。
【问题讨论】:
标签: amazon-web-services amazon-dynamodb amazon-dynamodb-streams