2

does anyone offer a fault-tolerant (replicated) memcache solution that is hosted in amazon ec2, needs zero maintenance and works with providing just one IP?

I know that amazon offers ElastiCache. But it is still quite low level and has some disadvantages:

  • it needs maintenance (e.g. define count of instances, manage IP addresses etc.)
  • it doesn't do replication (I am aware of client librarys that do this. But this is not as safe as a server side solution)
  • it does not work with one provided IP address
  • currently not offered in EU West (Ireland) (but I am sure this will come)
  • currenty only beat (will change in the future)

I dream of a hosted service that gives me one IP adresse and "just works, always".

Thanks, Marcel

Steffen Opel
  • 5,638
  • 37
  • 55
Marcel
  • 150
  • 10
  • 2
    "Fault-tolerant" and "Memcache" should never be used in the same sentence. Memcache isn't fault-tolerant or replicated, you have clusters of single nodes and the sharding is done inside your application. ElastiCache works the same, you can't (I don't think) assign a key to one node and pick it up on a different node. If you use one IP address, you hit one instance. Unless there was some sort of device in front of the instances distributing and sharding but since you want Memcache performance to be as good as possible this is a bad idea. –  Nov 22 '11 at 11:48
  • You might look into [MemBase](http://www.couchbase.org/get/couchbase/current). It is distributed (and supports replication), functions on the same protocol as memcached, and the data is also saved to disk for persistence. It does require some setup in terms of scaling, but there are AMIs to get you started - ami-06f5066f (64 bit) and ami-faf50693 (32 bit)). Putting the servers behind an elastic load balancer might solve your 'one IP' issue. – cyberx86 Jan 19 '12 at 21:56
  • Please keep in mind that EC2 in specific, and the cloud in general, can have some problems with inter-node latency. That is, latency between different machines within the same datacenter. This can mess with applications involving caching. Memcached should be fine, but a Riak circle or even a Membase cluster might cause some unexpected latency under some circumstances. – Scrivener Jan 19 '12 at 22:26

1 Answers1

5

Memcache (and ElastiCache by extension) is not secure, persistent data storage. It is a caching mechanism. It's goal is to improve application speed. By it's very design, memcache will drop old data as new data comes in if memory limits are being reached.

Replication and "fault-tolerance" are not part of the memcache system.

For this reason, your application should not rely on the data being present. Instead, it should be happy it hit cached data, and store data for caching when not hit.

If you're looking for an "easy" memcache client interface, depending on your development language, you can check out ServiceStack (www.servicestack.net). They have a .NET library called ServiceStack.Caching which can you use as a memcache client. I have not tried it, but I would assume (and hope) that it works with ElastiCache too.

Matt Houser
  • 10,053
  • 1
  • 28
  • 28