SlideShare a Scribd company logo
1 of 3
Redis vs Hazelcast :
 Language: Hazelcast is written in Java, while Redis is implemented in C.
 Threading: Redis is single-threaded. Hazelcast can benefit from all available CPU
cores.
 Design: Hazelcast is designed from the ground up to be used in a distributed
environment; Redis was initially intended to be used in standalone mode. Clustered
Redis does not support SELECT command, meaning it only supports a single DB
(namespace) per cluster. In contrast, Hazelcast supports unlimited number of maps
and caches per cluster.
Clustering
Hazelcast
 The easiest option is multicast discovery, where members use multicast UDP
transmission to get to know each other automatically without any additional
configuration.
 It is also possible to specify the member addresses manually through TCP.
Providing just one working address will be enough regardless of whether your
cluster consists of three or thirty nodes.
 For cloud deployments, Hazelcast supports automatic discovery of its member
instances on Amazon EC2 and Google Compute Engine
 Hazelcast provides a Discovery Service Provider Interface (SPI), which allows
users to implement custom member discovery mechanisms to deploy Hazelcast on
any platform. Hazelcast Discovery SPI also allows you to use third-party software
like Zookeeper, Eureka, Consul, etcd for implementing custom discovery
mechanism.
Redis
 A Redis client connects to a Redis cluster through a TCP connection. There is no
provision for discovering Redis servers on a multicast UDP network.
 Redis does not provide an automatic discovery mechanism for any cloud provider,
which makes it difficult to use in custom cloud deployments.
 Establishing a Redis cluster is not straightforward — one needs to launch a special
utility script while specifying all member addresses. This utility script (“redis-
trib.rb”) is written in Ruby and thus requires additional Ruby runtime dependencies
(script is included in Redis distribution).
Scaling
Adding a node to the Hazelcast cluster is super easy — just launching the node with
the proper configuration does the job. Removing a node is also remarkably simple —
just shutdown the node and the data is recovered on other nodes from backups.
In both cases, Hazelcast automatically rebalances the data across all available server
nodes, without affecting the availability of the data.
On the other hand, adding a node to a Redis cluster is not as convenient — the user
has to use the utility script to manually introduce a new member and then re-partition
the cluster with the same script. Removal in Redis is similar, but the order of
operations is different — repartition, make the cluster “forget” about the node, and
only then shutdown.
Distributed computing
Let’s say you have stored a hundred gigabytes worth of data in your cache and you
need to quickly find all the photos that were taken around a certain location.
Simply fetching the data from the server to the client and then extracting the metadata
on the clientside might work, but it would take quite a lot of time, and would also
cause memory pressure on the client. It is better to send the extraction logic to the
servers that store the actual data and let them work in parallel, with less data
exchanged over the wire.
This can be done in both Hazelcast and Redis.
Redis supports evaluation of Lua scripts that can invoke pretty much any Redis
operation. In clustered mode the Lua scripts have a limitation —if the script is going
to use multiple keys, all those keys must belong to the same hash slot (partition).
Hazelcast has a Distributed Execution Service, which is a special implementation of
java.util. concurrent.ExecutorService that allows one to distribute computation tasks
written in Java among several physical machines. Depending on the use case, the
tasks can be routed to cluster nodes in a few different ways: randomly, based on
address, or based on key ownership.
Hazelcast also supports efficient bulk updates of map data with an abstraction called
EntryProcessor. EntryProcessor can be executed on all keys, specific keys supplied by
the user, or on keys that matchspecific criteria.
Redis vs Hazelcast

More Related Content

What's hot

Evaluating Apache Cassandra as a Cloud Database
Evaluating Apache Cassandra as a Cloud DatabaseEvaluating Apache Cassandra as a Cloud Database
Evaluating Apache Cassandra as a Cloud DatabaseDataStax
 
Introduction to Cassandra
Introduction to CassandraIntroduction to Cassandra
Introduction to CassandraGokhan Atil
 
Introduction to Cassandra
Introduction to CassandraIntroduction to Cassandra
Introduction to CassandraSoftwareMill
 
Apache Cassandra in the Real World
Apache Cassandra in the Real WorldApache Cassandra in the Real World
Apache Cassandra in the Real WorldJeremy Hanna
 
Spark 计算模型
Spark 计算模型Spark 计算模型
Spark 计算模型wang xing
 
Apache Cassandra Lunch #52: Airflow and Cassandra for Cluster Management
Apache Cassandra Lunch #52: Airflow and Cassandra for Cluster ManagementApache Cassandra Lunch #52: Airflow and Cassandra for Cluster Management
Apache Cassandra Lunch #52: Airflow and Cassandra for Cluster ManagementAnant Corporation
 
DSD-INT 2017 The use of big data for dredging - De Boer
DSD-INT 2017 The use of big data for dredging - De BoerDSD-INT 2017 The use of big data for dredging - De Boer
DSD-INT 2017 The use of big data for dredging - De BoerDeltares
 
Cassandra internals
Cassandra internalsCassandra internals
Cassandra internalsnarsiman
 
Introduction to Apache Cassandra
Introduction to Apache Cassandra Introduction to Apache Cassandra
Introduction to Apache Cassandra Knoldus Inc.
 
Apache Cassandra Lunch #70: Basics of Apache Cassandra
Apache Cassandra Lunch #70: Basics of Apache CassandraApache Cassandra Lunch #70: Basics of Apache Cassandra
Apache Cassandra Lunch #70: Basics of Apache CassandraAnant Corporation
 
Cassandra architecture
Cassandra architectureCassandra architecture
Cassandra architectureT Jake Luciani
 
Apache Cassandra at the Geek2Geek Berlin
Apache Cassandra at the Geek2Geek BerlinApache Cassandra at the Geek2Geek Berlin
Apache Cassandra at the Geek2Geek BerlinChristian Johannsen
 

What's hot (20)

Evaluating Apache Cassandra as a Cloud Database
Evaluating Apache Cassandra as a Cloud DatabaseEvaluating Apache Cassandra as a Cloud Database
Evaluating Apache Cassandra as a Cloud Database
 
Introduction to Cassandra
Introduction to CassandraIntroduction to Cassandra
Introduction to Cassandra
 
Cassandra Architecture FTW
Cassandra Architecture FTWCassandra Architecture FTW
Cassandra Architecture FTW
 
Intro to Cassandra
Intro to CassandraIntro to Cassandra
Intro to Cassandra
 
Introduction to Cassandra
Introduction to CassandraIntroduction to Cassandra
Introduction to Cassandra
 
Apache Cassandra in the Real World
Apache Cassandra in the Real WorldApache Cassandra in the Real World
Apache Cassandra in the Real World
 
Spark 计算模型
Spark 计算模型Spark 计算模型
Spark 计算模型
 
Apache Cassandra Lunch #52: Airflow and Cassandra for Cluster Management
Apache Cassandra Lunch #52: Airflow and Cassandra for Cluster ManagementApache Cassandra Lunch #52: Airflow and Cassandra for Cluster Management
Apache Cassandra Lunch #52: Airflow and Cassandra for Cluster Management
 
DSD-INT 2017 The use of big data for dredging - De Boer
DSD-INT 2017 The use of big data for dredging - De BoerDSD-INT 2017 The use of big data for dredging - De Boer
DSD-INT 2017 The use of big data for dredging - De Boer
 
Cassandra ppt 2
Cassandra ppt 2Cassandra ppt 2
Cassandra ppt 2
 
Cassandra internals
Cassandra internalsCassandra internals
Cassandra internals
 
Introduction to Apache Cassandra
Introduction to Apache Cassandra Introduction to Apache Cassandra
Introduction to Apache Cassandra
 
Cassandra admin
Cassandra adminCassandra admin
Cassandra admin
 
Cassandra 101
Cassandra 101Cassandra 101
Cassandra 101
 
Apache Cassandra Lunch #70: Basics of Apache Cassandra
Apache Cassandra Lunch #70: Basics of Apache CassandraApache Cassandra Lunch #70: Basics of Apache Cassandra
Apache Cassandra Lunch #70: Basics of Apache Cassandra
 
Cassandra architecture
Cassandra architectureCassandra architecture
Cassandra architecture
 
Glusterfs and Hadoop
Glusterfs and HadoopGlusterfs and Hadoop
Glusterfs and Hadoop
 
Cassandra useful features
Cassandra useful featuresCassandra useful features
Cassandra useful features
 
Cassandra vs Databases
Cassandra vs Databases Cassandra vs Databases
Cassandra vs Databases
 
Apache Cassandra at the Geek2Geek Berlin
Apache Cassandra at the Geek2Geek BerlinApache Cassandra at the Geek2Geek Berlin
Apache Cassandra at the Geek2Geek Berlin
 

Viewers also liked

IMDB Showdown - OrigoDB, Redis and Hekaton
IMDB Showdown - OrigoDB, Redis and HekatonIMDB Showdown - OrigoDB, Redis and Hekaton
IMDB Showdown - OrigoDB, Redis and HekatonRobert Friberg
 
Redis to the Rescue?
Redis to the Rescue?Redis to the Rescue?
Redis to the Rescue?Tim Lossen
 
Web session replication with Hazelcast
Web session replication with HazelcastWeb session replication with Hazelcast
Web session replication with HazelcastEmrah Kocaman
 
The benefits of using an APM solution while performance testing
The benefits of using an APM solution while performance testingThe benefits of using an APM solution while performance testing
The benefits of using an APM solution while performance testingDevOpsGroup
 
Redis cluster
Redis clusterRedis cluster
Redis clusteriammutex
 
Distributed applications using Hazelcast
Distributed applications using HazelcastDistributed applications using Hazelcast
Distributed applications using HazelcastTaras Matyashovsky
 
Redis in Practice
Redis in PracticeRedis in Practice
Redis in PracticeNoah Davis
 
Hazelcast Essentials
Hazelcast EssentialsHazelcast Essentials
Hazelcast EssentialsRahul Gupta
 
From cache to in-memory data grid. Introduction to Hazelcast.
From cache to in-memory data grid. Introduction to Hazelcast.From cache to in-memory data grid. Introduction to Hazelcast.
From cache to in-memory data grid. Introduction to Hazelcast.Taras Matyashovsky
 
Everything you always wanted to know about Redis but were afraid to ask
Everything you always wanted to know about Redis but were afraid to askEverything you always wanted to know about Redis but were afraid to ask
Everything you always wanted to know about Redis but were afraid to askCarlos Abalde
 

Viewers also liked (11)

IMDB Showdown - OrigoDB, Redis and Hekaton
IMDB Showdown - OrigoDB, Redis and HekatonIMDB Showdown - OrigoDB, Redis and Hekaton
IMDB Showdown - OrigoDB, Redis and Hekaton
 
Redis to the Rescue?
Redis to the Rescue?Redis to the Rescue?
Redis to the Rescue?
 
Web session replication with Hazelcast
Web session replication with HazelcastWeb session replication with Hazelcast
Web session replication with Hazelcast
 
Week3 lecture
Week3 lectureWeek3 lecture
Week3 lecture
 
The benefits of using an APM solution while performance testing
The benefits of using an APM solution while performance testingThe benefits of using an APM solution while performance testing
The benefits of using an APM solution while performance testing
 
Redis cluster
Redis clusterRedis cluster
Redis cluster
 
Distributed applications using Hazelcast
Distributed applications using HazelcastDistributed applications using Hazelcast
Distributed applications using Hazelcast
 
Redis in Practice
Redis in PracticeRedis in Practice
Redis in Practice
 
Hazelcast Essentials
Hazelcast EssentialsHazelcast Essentials
Hazelcast Essentials
 
From cache to in-memory data grid. Introduction to Hazelcast.
From cache to in-memory data grid. Introduction to Hazelcast.From cache to in-memory data grid. Introduction to Hazelcast.
From cache to in-memory data grid. Introduction to Hazelcast.
 
Everything you always wanted to know about Redis but were afraid to ask
Everything you always wanted to know about Redis but were afraid to askEverything you always wanted to know about Redis but were afraid to ask
Everything you always wanted to know about Redis but were afraid to ask
 

Similar to Redis vs Hazelcast

JCConf 2016 - Cloud Computing Applications - Hazelcast, Spark and Ignite
JCConf 2016 - Cloud Computing Applications - Hazelcast, Spark and IgniteJCConf 2016 - Cloud Computing Applications - Hazelcast, Spark and Ignite
JCConf 2016 - Cloud Computing Applications - Hazelcast, Spark and IgniteJoseph Kuo
 
Rhel cluster basics 2
Rhel cluster basics   2Rhel cluster basics   2
Rhel cluster basics 2Manoj Singh
 
Aruman Cassandra database
Aruman Cassandra databaseAruman Cassandra database
Aruman Cassandra databaseUmesh Dande
 
Altoros using no sql databases for interactive_applications
Altoros using no sql databases for interactive_applicationsAltoros using no sql databases for interactive_applications
Altoros using no sql databases for interactive_applicationsJeff Harris
 
Spark cluster computing with working sets
Spark cluster computing with working setsSpark cluster computing with working sets
Spark cluster computing with working setsJinxinTang
 
Hadoop cluster configuration
Hadoop cluster configurationHadoop cluster configuration
Hadoop cluster configurationprabakaranbrick
 
A Novel Approach for Workload Optimization and Improving Security in Cloud Co...
A Novel Approach for Workload Optimization and Improving Security in Cloud Co...A Novel Approach for Workload Optimization and Improving Security in Cloud Co...
A Novel Approach for Workload Optimization and Improving Security in Cloud Co...IOSR Journals
 
[WSO2Con Asia 2018] Architecting for Container-native Environments
[WSO2Con Asia 2018] Architecting for Container-native Environments[WSO2Con Asia 2018] Architecting for Container-native Environments
[WSO2Con Asia 2018] Architecting for Container-native EnvironmentsWSO2
 
The Apache Cassandra ecosystem
The Apache Cassandra ecosystemThe Apache Cassandra ecosystem
The Apache Cassandra ecosystemAlex Thompson
 
Big data processing using hadoop poster presentation
Big data processing using hadoop poster presentationBig data processing using hadoop poster presentation
Big data processing using hadoop poster presentationAmrut Patil
 
Hadoop introduction
Hadoop introductionHadoop introduction
Hadoop introductionChirag Ahuja
 
Fully fault tolerant real time data pipeline with docker and mesos
Fully fault tolerant real time data pipeline with docker and mesos Fully fault tolerant real time data pipeline with docker and mesos
Fully fault tolerant real time data pipeline with docker and mesos Rahul Kumar
 

Similar to Redis vs Hazelcast (20)

JCConf 2016 - Cloud Computing Applications - Hazelcast, Spark and Ignite
JCConf 2016 - Cloud Computing Applications - Hazelcast, Spark and IgniteJCConf 2016 - Cloud Computing Applications - Hazelcast, Spark and Ignite
JCConf 2016 - Cloud Computing Applications - Hazelcast, Spark and Ignite
 
Rhel cluster basics 2
Rhel cluster basics   2Rhel cluster basics   2
Rhel cluster basics 2
 
hadoop-spark.ppt
hadoop-spark.ppthadoop-spark.ppt
hadoop-spark.ppt
 
Aruman Cassandra database
Aruman Cassandra databaseAruman Cassandra database
Aruman Cassandra database
 
Altoros using no sql databases for interactive_applications
Altoros using no sql databases for interactive_applicationsAltoros using no sql databases for interactive_applications
Altoros using no sql databases for interactive_applications
 
Unit 1
Unit 1Unit 1
Unit 1
 
Spark cluster computing with working sets
Spark cluster computing with working setsSpark cluster computing with working sets
Spark cluster computing with working sets
 
Hadoop cluster configuration
Hadoop cluster configurationHadoop cluster configuration
Hadoop cluster configuration
 
Couchbase Data Pipeline
Couchbase Data PipelineCouchbase Data Pipeline
Couchbase Data Pipeline
 
D017212027
D017212027D017212027
D017212027
 
A Novel Approach for Workload Optimization and Improving Security in Cloud Co...
A Novel Approach for Workload Optimization and Improving Security in Cloud Co...A Novel Approach for Workload Optimization and Improving Security in Cloud Co...
A Novel Approach for Workload Optimization and Improving Security in Cloud Co...
 
[WSO2Con Asia 2018] Architecting for Container-native Environments
[WSO2Con Asia 2018] Architecting for Container-native Environments[WSO2Con Asia 2018] Architecting for Container-native Environments
[WSO2Con Asia 2018] Architecting for Container-native Environments
 
The Apache Cassandra ecosystem
The Apache Cassandra ecosystemThe Apache Cassandra ecosystem
The Apache Cassandra ecosystem
 
Unit 5
Unit  5Unit  5
Unit 5
 
Big data processing using hadoop poster presentation
Big data processing using hadoop poster presentationBig data processing using hadoop poster presentation
Big data processing using hadoop poster presentation
 
OpenStack SDN
OpenStack SDNOpenStack SDN
OpenStack SDN
 
Features of Hadoop
Features of HadoopFeatures of Hadoop
Features of Hadoop
 
Hadoop introduction
Hadoop introductionHadoop introduction
Hadoop introduction
 
Fully fault tolerant real time data pipeline with docker and mesos
Fully fault tolerant real time data pipeline with docker and mesos Fully fault tolerant real time data pipeline with docker and mesos
Fully fault tolerant real time data pipeline with docker and mesos
 
Apache Spark
Apache SparkApache Spark
Apache Spark
 

Redis vs Hazelcast

  • 1. Redis vs Hazelcast :  Language: Hazelcast is written in Java, while Redis is implemented in C.  Threading: Redis is single-threaded. Hazelcast can benefit from all available CPU cores.  Design: Hazelcast is designed from the ground up to be used in a distributed environment; Redis was initially intended to be used in standalone mode. Clustered Redis does not support SELECT command, meaning it only supports a single DB (namespace) per cluster. In contrast, Hazelcast supports unlimited number of maps and caches per cluster. Clustering Hazelcast  The easiest option is multicast discovery, where members use multicast UDP transmission to get to know each other automatically without any additional configuration.  It is also possible to specify the member addresses manually through TCP. Providing just one working address will be enough regardless of whether your cluster consists of three or thirty nodes.  For cloud deployments, Hazelcast supports automatic discovery of its member instances on Amazon EC2 and Google Compute Engine  Hazelcast provides a Discovery Service Provider Interface (SPI), which allows users to implement custom member discovery mechanisms to deploy Hazelcast on any platform. Hazelcast Discovery SPI also allows you to use third-party software like Zookeeper, Eureka, Consul, etcd for implementing custom discovery mechanism. Redis  A Redis client connects to a Redis cluster through a TCP connection. There is no provision for discovering Redis servers on a multicast UDP network.  Redis does not provide an automatic discovery mechanism for any cloud provider, which makes it difficult to use in custom cloud deployments.  Establishing a Redis cluster is not straightforward — one needs to launch a special utility script while specifying all member addresses. This utility script (“redis- trib.rb”) is written in Ruby and thus requires additional Ruby runtime dependencies (script is included in Redis distribution).
  • 2. Scaling Adding a node to the Hazelcast cluster is super easy — just launching the node with the proper configuration does the job. Removing a node is also remarkably simple — just shutdown the node and the data is recovered on other nodes from backups. In both cases, Hazelcast automatically rebalances the data across all available server nodes, without affecting the availability of the data. On the other hand, adding a node to a Redis cluster is not as convenient — the user has to use the utility script to manually introduce a new member and then re-partition the cluster with the same script. Removal in Redis is similar, but the order of operations is different — repartition, make the cluster “forget” about the node, and only then shutdown. Distributed computing Let’s say you have stored a hundred gigabytes worth of data in your cache and you need to quickly find all the photos that were taken around a certain location. Simply fetching the data from the server to the client and then extracting the metadata on the clientside might work, but it would take quite a lot of time, and would also cause memory pressure on the client. It is better to send the extraction logic to the servers that store the actual data and let them work in parallel, with less data exchanged over the wire. This can be done in both Hazelcast and Redis. Redis supports evaluation of Lua scripts that can invoke pretty much any Redis operation. In clustered mode the Lua scripts have a limitation —if the script is going to use multiple keys, all those keys must belong to the same hash slot (partition). Hazelcast has a Distributed Execution Service, which is a special implementation of java.util. concurrent.ExecutorService that allows one to distribute computation tasks written in Java among several physical machines. Depending on the use case, the tasks can be routed to cluster nodes in a few different ways: randomly, based on address, or based on key ownership. Hazelcast also supports efficient bulk updates of map data with an abstraction called EntryProcessor. EntryProcessor can be executed on all keys, specific keys supplied by the user, or on keys that matchspecific criteria.