AWS Elastic Beanstalk Caching?

I'm looking to host a standard Java web application on AWS, and the new Elastic Beanstalk ( http://aws.amazon.com/elasticbeanstalk/ ) seems to have most of what we want. The only thing I can not understand is to do distributed caching. AWS does not seem to allow multicast discovery of new nodes, so I’m not sure how the new nodes launched by the autoscale process should be integrated into the existing distributed cache. Any suggestions / best practices appreciated.

Update. Ideally, this would be a cache local to each instance of the application server. The best scenario would be to configure a sleeping level 2 cache for something like ehcache or terracota.

+4
source share
3 answers

Another way to go down today (after 2011-08-23) is to use Amazon ElastiCache , which is compatible with the Memcached protocol, and works in the cloud for you. It easily inserts things into the memory cache.

+5
source

Here are some of my thoughts:

Suppose you provide a caching instance, such as memcached, that runs on some EC2 instances, and you use AWS Elastic IP to map to these instances. Since Elastic IP is a kind of static IP address, you can now pre-configure new instances of web applications to find memcached istanced via memcached IP

During automatic scaling, you can now find memcached servers.

+1
source

If you want your cache in each instance to be divided, I would recommend using Dockers for multi-contact networks for EB to make it easy to configure your application and your layer to trim on each node. The elastic part of Beanstalk will work the same as before, on a regular dedicated platform, it may require some reconfiguration if you use private libraries, etc., Depending on your application details. But if you want your caching layers on separate nodes to talk to each other, this may not be easy to achieve ...

0
source

Source: https://habr.com/ru/post/1347744/


All Articles