Comparing Redis OSS and Memcached

Select the in-memory data store that meets your needs.

Choosing between Redis OSS and Memcached

Redis OSS and Memcached are popular, open-source, in-memory data stores. Although they are both easy to use and offer high performance, there are important differences to consider when choosing an engine. Memcached is designed for simplicity while Redis OSS offers a rich set of features that make it effective for a wide range of use cases. Understand your requirements and what each engine offers to decide which solution better meets your needs.

Sub-millisecond latency

Both Redis OSS and Memcached support sub-millisecond response times. By storing data in-memory they can read data more quickly than disk based databases.

Developer ease of use

Both Redis OSS and Memcached are syntactically easy to use and require a minimal amount of code to integrate into your application.

Data partitioning

Both Redis OSS and Memcached allow you to distribute your data among multiple nodes. This allows you to scale out to better handle more data when demand grows.

Support for a broad set of programming languages

Both Redis OSS and Memcached have many open-source clients available for developers. Supported languages include Java, Python, PHP, C, C++, C#, JavaScript, Node.js, Ruby, Go and many others.

Advanced data structures

In addition to strings, Redis OSS supports lists, sets, sorted sets, hashes, bit arrays, and hyperloglogs. Applications can use these more advanced data structures to support a variety of use cases. For example, you can use Redis OSS sorted sets to easily implement a game leaderboard that keeps a list of players sorted by their rank.

Multithreaded architecture

Since Memcached is multithreaded, it can make use of multiple processing cores. This means that you can handle more operations by scaling up compute capacity.

Snapshots

With Redis OSS, you can keep your data on disk with a point in time snapshot which can be used for archiving or recovery.

Replication

Redis OSS lets you create multiple replicas of a primary. This allows you to scale database reads and to have highly available clusters.

Transactions

Redis OSS supports transactions which let you execute a group of commands as an isolated and atomic operation.

Pub/Sub

Redis OSS supports Pub/Sub messaging with pattern matching which you can use for high performance chat rooms, real-time comment streams, social media feeds, and server intercommunication.

Lua scripting

Redis OSS allows you to execute transactional Lua scripts. Scripts can help you boost performance and simplify your application.

Geospatial support

Redis OSS has purpose-built commands for working with real-time geospatial data at scale. You can perform operations like finding the distance between two elements (for example people or places) and finding all elements within a given distance of a point.

Amazon ElastiCache

Amazon ElastiCache offers fully managed Redis OSS and Memcached offering the following benefits:

  • No longer need to perform management tasks such as hardware provisioning, software patching, setup, configuration, and failure recovery. This allows you to focus on high value application development.
  • Have access to monitoring metrics associated with your nodes, enabling you to diagnose and react to issues quickly.
  • Can take advantage of cost-efficient and resizable hardware capacity.

Additonally, ElastiCache features an enhanced engine which improves on the reliability and efficiency of Redis OSS while remaining compatibility so your applications work seamlessly without changes. ElastiCache also features Online Cluster Resizing, supports encryption, and is HIPAA eligible and PCI DSS compliant.

ElastiCache for Memcached features Auto Discovery which helps developers save time and effort by simplifying the way an application connects to a cluster.

Read the more detailed comparison between the two engines for further information about differences between the two products.

Start using Amazon ElastiCache with AWS Free Tier in three easy steps:
Step 1 - Sign up for an Amazon Web Services account

Sign up

Get access to the Amazon ElastiCache Free Tier.
Learn Amazon Elasticache for Redis

Learn with simple tutorials

Explore how to create an  ElastiCache cluster.
Get Started with ElastiCache for Redis

Start building

Begin building with help from the user guide.
Ready to get started with Amazon ElastiCache?
Sign up for the Amazon ElastiCache free tier
Have more questions?
Contact us