AWS Elastic Beanstalk 缓存?
我正在考虑在 AWS 和新的 Elastic Beanstalk (http://aws.amazon .com/elasticbeanstalk/)似乎拥有我们想要的大部分内容。我不明白的一件事是如何进行分布式缓存。 AWS似乎不允许新节点的多播发现,所以我不确定自动扩展过程启动的新节点应如何集成到现有的分布式缓存中。任何建议/最佳实践表示赞赏。
更新:理想情况下,这将是每个应用程序服务器实例的本地缓存。最好的情况是使用 ehcache 或 terracota 之类的 hibernate 2 级缓存配置。
I'm looking into hosting a standard Java web app on AWS and the new Elastic Beanstalk (http://aws.amazon.com/elasticbeanstalk/) seems to have most of what we want. The one thing I can't figure out is how to do distributed caching. It seems that AWS doesn't allow multicast discovery of new nodes, so I'm not sure how new nodes started by the auto-scaling process should be integrated into an existing distributed cache. Any suggestions / best practices appreciated.
Update: Ideally this would be a cache local to each application server instance. Best case scenario would be a hibernate level 2 cache config for something like ehcache or terracota.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
今天(2011 年 8 月 23 日之后)的另一条路线是使用 Amazon ElastiCache,它与 Memcached 和协议兼容在云端为您运行。可以轻松地将内容放入内存缓存中。
Another route to go down today (after 2011-08-23) is to use Amazon ElastiCache which is protocol-compliant with Memcached and runs in the cloud for you. Makes it easy to put things into an in-memory cache.
以下是我的一些想法:
假设您有分布式缓存实例,例如在某些 EC2 实例中运行的 memcached,并且您使用 Elastic来自 AWS 的 IP 映射到这些实例。由于弹性 IP 是一种静态 IP 地址,现在您可以预先配置新的 Web 应用程序实例,以通过 memcached IP 定位 memcached
在自动扩展期间,现在可以找到您的 memcached 服务器。
Here is some of my thought:
Suppose you have distributed cacheing instance such as memcached running in some EC2 instances and you use the Elastic IP from AWS to map to these instances. As Elastic IP is sort of static IP address, now you can pre-configure your new web app instances to locate the memcached istanced through the memcached IP
During auto-scaling, now it is possible to locate your memcached servers.
如果您希望在每个实例上分别进行缓存,我建议使用 多容器用于 EB 的 Docker 环境,作为一种方便在每个节点上设置应用程序和缓存层的方法。 Elastic Beanstalk 部分将像以前一样在普通专用平台上工作,如果您使用私有库等,则可能需要进行一些重新配置,具体取决于您的应用程序详细信息。但是,如果您希望不同节点上的缓存层相互通信,则可能不容易实现......
If you want your cache on every instance separatly, I would recommend to use Multicontainer Docker Environments for EB, as a way to facilitate settign your app, and your casching layer on every node. Elastic Beanstalk part will work just like before on normal dedicated platform, some reconfiguration may be needed there if you are using private libs, etc. depending on your app details. But if you want your caching layers on separate nodes to talk to each other it may be not easy to achive...