dynamodb 适合我的用例吗? (批量读取)
据我所知,使用 Amazon DynamoDB 您需要为预置吞吐量付费。
Application1 执行或多或少一致的写入速率,数据非常适合键/值存储,并且不会读回数据。目前它的写入量为 3 - 5k/小时,但一旦我们启动,它肯定会增加。
应用程序 2 每小时读取(从应用程序 1 写入的数据)一小时的记录,每天读取一小时的记录。最终一致性是可以接受的。
那么我认为 dynamodb 不太适合我是否正确?就像我必须提供高读取速率一样,即使我每小时只达到该速率几秒钟?有没有办法转储记录?
目前,我在 mongodb 上使用主/从。我使用从属设备进行批量读取,这样它就不会影响主设备...但我宁愿让其他人处理数据库基础设施。
From what i gather, with Amazon DynamoDB you pay for provisioned throughput.
Application1 does more or less consistent rate of writes, data is ideal for key/value store, and doesn't ever read the data back. At the moment its 3 - 5k writes/hour but its bound to increase once we launch.
Application2 reads (from the data written by application1) one hour worth of records every hour, and reads one days worth of records every day. Eventual consistency is acceptable.
So am i right to assume dynamodb isn't well suited for me? As in i would have to provision a high read rate, even if I hit that rate only for few seconds every hour? Is there a way to dump records?
At the moment, i'm using master/slave on mongodb. I use the slave for my batch reads, so that it doesn't effect the master... but id much rather let someone else handle the db infrastructure.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好问题 - 我不一定会得出你的结论,尽管你确实需要考虑具体的成本/性能特征,这可能会或可能不会超过你正在寻找的好处。
没错,您根据预留的容量支付固定的每小时费率(请参阅 定价),并且必须根据读取一小时的记录所遇到的最大吞吐量要求提供容量,以避免受到限制。
此外,您还需要针对每天记录一天的峰值调整预置容量。与往常一样,AWS 有一个 API 可用于执行此操作,但请注意相关的常见问题解答项目,例如:
后者特别困难,因为 您可以根据需要随时增加预置吞吐量,但是您每天只能减少一次!
显然,您还应该查看与预配置吞吐量相关的其他可用常见问题解答项目,因为可能还有更多微妙之处。
鉴于所涉及的复杂性,可能不可避免地要完全掌握 Amazon 中预置吞吐量的概念DynamoDB,就必须明智地考虑它的架构才能达到预期的结果。对于 DynamoDB 来说,计算特定用例的成本和性能详细信息显然是一项不简单的工作;)
Good question - I wouldn't necessarily come to your conclusion, though you'll need to account for the specific cost/performance characteristics indeed, which may or may not outweigh the benefits you are looking for.
That's correct, You pay a flat, hourly rate based on the capacity you reserve (see Pricing) and must provision capacity to the maximum throughput requirements encountered for reading one hour worth of records accordingly in order to avoid being throttled.
In addition you'll need to adjust the provisioned capacity for the daily spike of one days worth of records every day. As usual for AWS there is an API available to do this, but be aware of the related FAQ items, e.g.:
The latter is particularly tough, insofar You can increase your provisioned throughput as often as you want, however You can decrease it once per day only!
Obviously You should review the other available FAQ items related to Provisioned Throughput as well, as there might be more subtleties still.
Given the involved complexities it's probably unavoidable to fully grasp the concept of Provisioned Throughput in Amazon DynamoDB, insofar one must account for it architecture wise in order to achieve the desired results. Calculating the cost and performance details for a particular use case is apparently going to be a non trivial exercise for DynamoDB ;)