Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Caching Systems - Redis vs Geode/GemFire

We are considering to use a caching system to our application to do data lookup. This data will change very infrequently. My findings came out with Redis, GemFire/Geode, VoltDB, Aerospike, Hazlecast and few others. I shortlisted Geode and Redis. Both are key-value in-memory stores.

Redis (C based) seems to be easier to use and supports data types such as lists, hashes, sets, sorted sets, etc. It also has some good client available in Java, NodeJS, C#, etc. It supports multiple nodes (master-slave).

Geode (Java based) seems to have more features considering its existence dates a long back. It has concepts of regions in which stores the data. It has clients available in Java, C#, C++. It has locator(s) and server(s) which make the system. It supports distributed servers/nodes (non-shared/no single point of failure).

I searched internet but could not find any comparison between these two in terms of Read/write speed, Memory usage, Disk I/O dumping, Scaling, Security. Has anyone come across such situation before ?

like image 433
Brij Avatar asked Jul 04 '17 12:07

Brij


People also ask

What is Geode GemFire?

GemFire is a distributed data management platform that provides a key-value data grid along with advanced distributed system features, such as event processing, continuous querying, and remote function execution. This guide assumes some familiarity with the commercial Pivotal GemFire or Open Source Apache Geode.

Should I use Redis for caching?

Redis is extremely fast. It delivers sub-millisecond response times that enable millions of requests per second to power demanding real-time applications. Typically, you'll want to store frequently accessed data in Redis so that whenever the data is requested, it can come from the cache instead of your database.

What is the difference between Redis and cache?

When storing data, Redis stores data as specific data types, whereas Memcached only stores data as strings. Because of this, Redis can change data in place without having to re-upload the entire data value. This reduces network overhead.

What is difference between ehcache and Redis cache?

You can think Redis as a shared data structure, while Ehcache is a memory block storing serialized data objects. This is the main difference. Redis as a shared data structure means you can put some predefined data structure (such as String, List, Set etc) in one language and retrieve it in another language.


1 Answers

I'm working primarily with Redis but got to know Geode (Open-Source variant of Pivotal Gemfire) throughout the last year as I work for Pivotal. Might be biased, though.

Redis is primarily a standalone Key-Value store, driven by Salvatore Sanfilippo, HA and sharding options (Sentinel, Cluster) were built at a much later time. Redis is blazing fast, and if you favor performance over consistency, Redis is a good choice. Redis only security feature is password-based authentication, but you would rather secure it on transport-level which requires additional effort. There's no support besides the community or if you opt for a commercial Redis product (such as RedisLabs).

Geode (Open-Sourced Pivotal GemFire about a year ago, nowadays GemFire is based on Geode) is a product driven by Pivotal for many years. It's built with consistency, HA, and data distribution in mind – call it an in-memory data grid. The security layer of Geode is extensible and pluggable so you can tailor it to your needs. If you want to get commercial support, then Pivotal can serve you with your needs.

Geode features a Redis protocol adapter which allows you to connect with Redis clients to Geode and to use a subset of Redis data structures and commands. It's not complete from a Redis 3.2 perspective but still a good choice if you want to integrate with a single key-value store product, and you don't want to use Redis and Geode.

like image 195
mp911de Avatar answered Oct 04 '22 16:10

mp911de