Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use Amazon Elasticache on Heroku?

I am currently using Heroku's Memcached in a Rails 3 app and would like to move over to Elasticache because the pricing is much more favorable. Is this possible? Is the configuration relatively straightforward? Is there anything that I should be aware of as regards the performance?

like image 435
alpheus Avatar asked Jun 14 '12 23:06

alpheus


1 Answers

No, it isn't recommended you use Elasticache as there is no authentication mechanism with it. As such, anyone can access your cache! This is normally fine as you would use AWS security rules to restrict what machines can access it to yours. However, this obviously doesn't work with Heroku since your app is run on a randomly chosen machine of Herokus.

You could deploy memcache yourself with SASL authentication on an EC2 machine. ElastiCache doesn't really give you anything more than an EC2 machine with memcache pre-installed anyway.

There is another option: MemCachier

(Full disclaimer, I work for MemCachier).

There is another memcache provider on Heroku that is significantly cheaper than the membase provided one. It's called MemCachier, addon home page is here.

It's comparable in price to ElasticCache depending on your cache size and if you use reserved instances or not (at the very large cache sizes ElatiCache is cheaper).

Update (June, 2013): The membase memcache addon has shutdown, so MemCachier is the only provider of Memcache on Heroku.

Please reach out to me if you need any help even if you go with ElastiCache.

like image 131
David Terei Avatar answered Oct 14 '22 20:10

David Terei