【问题标题】:How to use Amazon ElastiCache with DynamoDB in Python to improve read/write performance如何在 Python 中将 Amazon ElastiCache 与 DynamoDB 结合使用以提高读/写性能
【发布时间】: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


【解决方案1】:

这是一篇文章,描述了涉及 Elasticache 和 DynamoDB 的类似情况。代码在节点中,但会帮助您了解如何执行此操作。

Caching Strategy with DynamoDB Streams, AWS Lambda and ElastiCache

【讨论】:

    猜你喜欢
    • 2012-07-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-10
    • 1970-01-01
    • 1970-01-01
    • 2012-02-02
    • 1970-01-01
    相关资源
    最近更新 更多