我目前在 Rails 3 应用程序中使用 Heroku 的 Memcached,并希望转移到 Elasticache,因为价格更优惠。这可能吗?配置是不是比较简单?关于性能,有什么我应该注意的吗?
最佳答案
危险:我不建议将此解决方案用于生产用途。虽然这确实有效,但@btucker 指出它允许任何 Heroku 托管的应用程序访问您的 ElastiCache 集群。
是的,你可以。设置类似于 Heroku 在 Amazon RDS 上的指南。 .不同的步骤是这样的:
rds-
带有 elasticache-
的命令那些:elasticache-authorize-cache-security-group-ingress \
--cache-security-group-name default \
--ec2-security-group-name default \
--ec2-security-group-owner-id 098166147350 \
# If your AWS_CREDENTIAL_FILE environment setting is configured,
# this option is not necessary.
--aws-credential-file ../credential-file-path.template
heroku config:set MEMCACHE_SERVERS=elasticachehostname.amazonaws.com
之后,关注 Memcache Rails setup ,你就准备好了。
关于ruby-on-rails - 我可以在 Heroku 上使用 Amazon Elasticache 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11042794/