Pros and cons of various caching engines

Pros and cons of various caching engines

Memcached
Pros
Has clients in all major languages. Customers can wrte their own clients in any lnaguage
Easy to setup in a distributed environment
Does not tie you to the JVM
it uses memory efficiently by having each object live on exactly one server
it is distributed
The simple clustering architecture enables Memcached to be very fast and effective
Memcached has a better memory footprint than Redis
Most widely used in industry after ehcache

Cons
Adding or removing memcached nodes is complicated and causes unpredictable application performance degradation
Data gets lost of a node goes down
If node is added, 1/n+1 of objects get lost
Memcached limits key names to 250 bytes
Memcached could be preferable when caching relatively small and static data, such as HTML code fragments. Memcached’s internal memory management, while not as sophisticated as that of Redis, is more efficient in the simplest use cases because it consumes comparatively less memory resources for metadata.

CouchBase
Pros
Data in Couchbase Server is automatically partitioned and distributed across cluster nodes.Each node in the Couchbase cluster is identical and data is replicated across the nodes so that each node stores both active and replica documents
Couchbase is memcached with persistence
It is distributed

EhCache
Cons
Distribution possible after buying terracota license

Pros
Supports key level statistics
Most widely used in industry

JCS
Pros
Twice as faster than EHCache
Very similar to ehcache. We can have application level cache settings. Our current users will be more comfortable with it
It is distributed
It has disk overflow option, which ehcache also supports

Redis
Pros
It can directly store data structures
It is distributed
It has six different eviction policies
Supports both lazy and active eviction
Redis allows key names and values to be as large as 512MB each
Redis are supported by client libraries in every conceivable programming language
Cons
Setting up redis cluster is complex. You need ruby

Uday Ogra

Connect with me at http://facebook.com/tendulkarogra and lets have some healthy discussion :)

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *