DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Related

  • Popular Tools Supporting YAML Data Format
  • The Importance of Persistent Storage in Kubernetes- OpenEBS
  • Maintaining ML Model Accuracy With Automated Drift Detection
  • Kata Containers: From Kubernetes Pods to Secure VMs

Trending

  • Unlocking Data with Language: Real-World Applications of Text-to-SQL Interfaces
  • Building Custom Tools With Model Context Protocol
  • The Human Side of Logs: What Unstructured Data Is Trying to Tell You
  • Build Your First AI Model in Python: A Beginner's Guide (1 of 3)
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. Hazelcast vs ElastiCache (Memcached)

Hazelcast vs ElastiCache (Memcached)

This article compares Hazelcast to the Amazon Web Services ElastiCache Memcached Engine. Cost, Features, Node Management, Fault Tolerance, Monitoring, and Performance are all evaluated.

By 
Terry Walters user avatar
Terry Walters
·
Sep. 16, 16 · Opinion
Likes (11)
Comment
Save
Tweet
Share
9.9K Views

Join the DZone community and get the full member experience.

Join For Free

Overview

This article compares Hazelcast to the Amazon Web Services ElastiCache Memcached Engine. Cost, Features, Node Management, Fault Tolerance, Monitoring, and Performance are all evaluated.

Hazelcast

In a Hazelcast grid, data is evenly distributed among the nodes or as we call them “members” of a computer cluster, allowing for horizontal scaling both in terms of available storage space and processing power. Backups are also distributed in a similar fashion to other members, based on configuration, thereby protecting against single member failure.

Through collaboration with our customers, we’ve seen organizations scale with Hazelcast clusters from a single server to above 100 members, processing billions of transactions and organizations with dozens of clusters totaling over 1,000 members.

Each Hazelcast Server Member is connected to one another and shares relevant replication information (see Figure 1.)

Figure 1.

ElastiCache

Memcached cache clusters are comprised of from 1 to 20 nodes. Scaling a Memcached cache cluster out and in is as easy as adding or removing nodes from the cache cluster. If you need more than 20 nodes in a Memcached cluster, or more than 50 nodes total in a region, please fill out the ElastiCache Limit Increase Request form at http://aws.amazon.com/contact-us/elasticache-node-limit-request/.

Each ElastiCache Memcached Node is independent to one another and shares nothing (see Figure 2.)

Figure 2.

Cost

ElastiCache is not a flat fee –instead the larger the EC2 instance, the more it costs to use. For example, the following illustration has the costs for ElastiCache:

Then compare to the cost of the same EC2 instances:

You can see there is nearly a dollar per hour difference for the current generation 8XL ($3.64 vs $2.66) which equals about $8550 per year!

In terms of what do you get from Hazelcast, a node or member of open source is free; however, Hazelcast Enterprise is a flat fee per node so it doesn’t matter what size the node is you are not penalized for running larger instances.

Features

Memcached

It is well established as one of the oldest open source solutions in the caching market. Memcached is not an in-memory data grid (IMDG) instead; it is a simple key/value store that does not offer distributed compute or advanced serialization mechanisms. The server does not care what your data looks like. Items are made up of a key, an expiration time, optional flags, and raw data. It does not understand data structures; you must upload data that is pre-serialized. Some commands (incr/decr) may operate on the underlying data, but in a simple manner.

Hazelcast

Hazelcast is an in-memory data grid (IMDG). It is more of a computing platform than a simple key/value store. Here is an abbreviated list of just the open source Hazelcast features:

AtomicLongListQueuesSetUser Defined Services
AtomicReferenceLockSemaphoneTopic/ReliableTopicAggregators
CountDownLatchMapReplicated MapEntryProcessorContinuous Query
IdGeneratorMultiMapRingBufferExecutorServiceMapReduce
Hibernate 2nd LevelJCacheJCloudsAWS DiscoveryDocker

The complete feature list is well beyond the scope of this document, and can be found at the following link: https://hazelcast.com/products/

Scaling and Node Management

Given that ElasticBeanStalk is free, you only incur the cost of any underlying resources such as each EC2 instance. ElasticBeanStalk allows you to define scaling metrics and heart beats like in a Load Balancer for determining when and what to do when such metrics are observed. Adding or removing nodes based on http request is a rudimentary task using ElasticBeanStalk and since Hazelcast does not manage VM’s, it is a great match.

Node Management

Since neither Memcached nor Hazelcast perform node management, this is a comparison of ElastiCache versus ElasticBeanStalk Amazon Web Services. The following illustration applies to both solutions since they end up with the same physical topology (see Figure 3.)

Figure 3.

The primary differences are:

  • ElastiCache incurs costs versus ElasticBeanStalk which is completely free.
  • Memcached clients must keep an active list of all servers versus Hazelcast clients which utilize discovery and only need to connect to a single server since all servers know one another.
  • Scaling up is the same between ElastiCache Memcached and ElasticBeanStalk Hazelcast.
  • Scaling down will incur data loss for all ElastiCache Memcached clusters versus Hazelcast can safely scale down by using cluster quorum. The easiest method is to remove a node in more time than the migration events thus eliminating the possibility of data loss.

Scaling

Prior to using ElastiCache you must already know the size of your cluster and if it exceeds 20 nodes you must request permission. This is not the case with Hazelcast and the only limitation out of the box is the number of shards which defaults to 271 thus you could theoretically cluster up to 271 nodes without changing the default settings. In both cases, a certification process is warranted.

Certification

Hazelcast offers both a certification process (Solution Architect is included with each license) as well as additional training: https://hazelcast.com/university/hazelcast-complete-certification-training-program/

Amazon does not offer a certification process; however, they offer a certification training: https://aws.amazon.com/certification/faqs/

Fault Tolerance

ElastiCache

According to the ElastiCache best practices document (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/BestPractices.html#FaultTolerance.Memcached) in order to mitigate the impact of a node failure, you need to spread your cached data over more nodes. Because Memcached does not support replication, a node failure will always result in some data loss from your cluster.

Hazelcast

The default configuration of Hazelcast employs a single backup and thus does not suffer data loss upon a node failure (http://docs.hazelcast.org/docs/3.6/manual/html-single/index.html#hazelcast-overview).

Monitoring

Hazelcast Management Center

The Hazelcast Management Center is a robust tool offering high and low level monitoring, event alarms, distributed object browsing, and an interactive console that allows the user to perform a wide range of tasks (http://docs.hazelcast.org/docs/3.6/manual/html-single/#administering-management-center).

ElastiCache CloudWatch

ElastiCache Cloud Watch is a non-interactive tool that allows the user to view important metrics with respect to the Memcached Cluster.

Conclusion

Proper use of in-memory caching can result in an application that performs better and costs less at scale. While Amazon ElastiCache greatly simplifies the process of deploying an in-memory cache in the cloud, it comes at great cost and lacks fault tolerance. Hazelcast provides far more features, performance, and monitoring and when paired with ElasticBeanStalk—Hazelcast is the clear winner.

Hazelcast Memcached Docker (software) Amazon Web Services Open source Data (computing) Data loss

Published at DZone with permission of Terry Walters. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Popular Tools Supporting YAML Data Format
  • The Importance of Persistent Storage in Kubernetes- OpenEBS
  • Maintaining ML Model Accuracy With Automated Drift Detection
  • Kata Containers: From Kubernetes Pods to Secure VMs

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!