AWS Elastic Beanstalk caching?
Asked Answered
I

3

5

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.

Idaline answered 12/4, 2011 at 14:44 Comment(0)
W
6

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.

Won answered 26/8, 2011 at 8:9 Comment(1)
Thanks, this now looks like the way to go. I had originally been looking for an auto-discovery 2nd level cache for hibernate, but I know think this wouldn't scale properly anyway and that a memcache like setup is the way to go.Idaline
L
1

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.

Lammers answered 20/5, 2011 at 2:5 Comment(1)
This is definitely an interesting option, but I should have been a little more clear in that I wanted this to be a distributed cache, so local to each application server. Ideally, since this is a beanstalk, so Java, it would be a hibernate level 2 cache solution like ehcache or something. I'll update the question to make that more clear. Thanks for the elastic IP suggestion though, that's good to know.Idaline
F
0

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...

Fructification answered 19/4, 2017 at 9:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.