Why is Redis becoming such a popular key-value data store? Here is a look at the many reasons it’s succeeding.
- Basic Strengths of Redis
- Built for Speed & Languages
- The Crowd Says Yes
- In-Memory Processing for Media
- Leaderboard Delivery
- Redis-Ready Cloud Servers
Basic Strengths of Redis
Redis is a data structure server. As a key-value data store, Redis is similar to Memcached, although it has two major advantages over that option: support of additional datatypes and persistence.
Those two features may not immediately appear “major,” but they really do set this ecosystem apart. Persistence allows you to treat Redis as a legitimate database rather than an unstable and temporary cache. If you reboot, Memcached information is lost; but Redis data remains.
The ability to work with different types of data is what really makes Redis an especially powerful tool. A key value could be just a string as is used with Memcached. However, you will also be able to handle hashes, sets (unranked group of all different values), sorted sets (ranked group of all different values), and lists (ranked groups that could include repetition).
All of the data is stored in RAM, so the speed of this system is phenomenal, often performing even better than Memcached. The times when it makes sense to use this tool are situations in which you want to have all of the data in memory.
Redis is great when you want a scalable cloud hosting server that can be accessed by various servers, programs, and tasks, notes Carl Zulauf on Stack Overflow. “As just an inter-process communication mechanism it is tough to beat,” he says. “The fact that you can communicate cross-platform, cross-server, or cross-application just as easily makes it a pretty great choice for many many use cases.” It’s a a strong choice for caching too because it is so fast.
Built for Speed & Languages
To work as quickly as it does, Redis uses a dataset that is in-memory. In order to maintain the data, you can save it to disk occasionally or attach all commands to a log. In fact, you don’t always want persistence, so you can turn it off if you’re using it to temporarily cache. “Redis also supports trivial-to-setup master-slave asynchronous replication, with very fast non-blocking first synchronization, auto-reconnection with partial resynchronization on net split,” explains the Redis website.
The coding language used for Redis is ANSI C. It works with Linux, BSD, and OS X. Most of the testing occurs in Linux and OS X environments, and the primary developers recommend Linux. For Windows, Microsoft has built a Redis port.
The Crowd Says Yes
Redis keeps becoming more prominent as more developers are tapping into the power of the open source project as a key-value data store to process information in real-time.
Infrastructure-as-a-service companies (that would be companies like us, Atlantic.Net) are seeing spikes in use of Redis. Often the businesses are getting rid of Memcached and upgrading, perhaps.
Redis also looks impressive when you look at how much its position against other market leaders has improved. DB-Engines now (at press time) actually ranks it as the #1 most popular key-value store and tenth most popular database. Compare that #10 position to the following database rankings:
- Elasticseach: #12
- Memcahed: #22
- MariaDB: #23
All the more impressive, Redis has moved up three slots from the #13 position in just twelve months.
In-Memory Processing of Media
Many organizations are using Redis to give fast responses in memory, explains Mark Boyd of The New Stack. “This is akin to providing a real-time sandbox for ‘hot data,’” he says, “data endpoints that are in flux as they go through loops of read-write processing before being finalized.”
Contentful, which runs an API for content management, includes Redis in its stack. Contentful is a CMS that works on any platform to push content to those users through APIs. They have some big media sites using them, such as Playboy.
Specifically, Contently uses Redis while content is being edited, so that the task can be performed in real-time. During that time, Redis is the datastore. Once editing is complete, the content is saved to a more permanent data store, Elasticsearch, and on to their cloud server.
Since gaming occurs by necessity in real-time, Redis is being used to deliver leaderboards in many games. The same is true of some up-voting or down-voting of posts or comments on blogs or message boards.
Scopely CTO Ankur Bulsara says his company uses Redis. Some of its largest games get as many as 50,000 requests per second.
“We use DynamoDB a lot as a primary datastore, then Redis for things like task or current features or to power a real-time events system,” he says. “We use some Memcached, but increasingly we are looking at Redis for our caching solution.”
Redis-Ready Cloud Servers
Are you thinking about deploying Redis as your key-value data store? At Atlantic.Net, we offer cost-effective SSD cloud hosting server backed by 100% enterprise SSD storage.