【发布时间】:2014-08-12 11:51:58
【问题描述】:
我在 AWS 中创建了一个 DynamoDB 实例,我还在 AWS Elasticache 中创建了一个缓存集群。我想使用 Elasticache 来提高读/写性能。我不确定 Python 是如何做到的。
您能否提供有关如何将 Elasticache 附加到我的 DynamoDB 实例的指示/指导?我能够连接到 Elasticache 并获取集群,但需要有关如何继续的帮助。
参考代码:
conn = boto.elasticache.connect_to_region('us-west-2',
aws_access_key_id='<KEY_ID>',
aws_secret_access_key='<KEY_ACCESS>')
print conn.describe_cache_clusters(cache_cluster_id='<ID>')
【问题讨论】:
-
为什么需要提高 DynamoDB 读取性能? DynamoDB 查询通常具有个位数毫秒的延迟。添加缓存会增加复杂性,而对性能的影响可能很小。如果您的 DynamoDB 读取速度如此之慢,那么您可能使用错误和/或没有很好地设计您的数据模型。
-
你想做什么? “将 Elasticache 附加到我的 DynamoDB 实例”是什么意思?
标签: python-2.7 amazon-dynamodb amazon-elasticache