Redis is an in-memory data structure store known for speed and often used as a cache. Both Redis and Aerospike are open source, however, when applications need persistence or when applications must scale but servers have maxed out of RAM, developers should consider Aerospike, a distributed key-value store that is just as fast or faster than Redis, but scales more simply and with the economics of flash/SSDs.
“Aerospike filled a gap for KAYAK that other caching and database technologies couldn’t deliver on. ..we needed a solution that was reliable and could scale .. Aerospike enabled us to achieve multi-key gets in less than 3 milliseconds, deploy with ease and scale with very low jitter.”
– Ko Baryiames, SVP Technology, KAYAK
A benchmark comparing key-value store performance of Aerospike running “out of the box” and Redis with application level sharding – on Amazon Web Services (AWS) – showed that Aerospike is faster than Redis for certain workloads. Follow the benchmark steps and see for yourself.
What is the difference between Aerospike and Redis?
|Language||Written in C, cross platform||Written in C, optimized for Linux|
|Open Source NoSQL||Data Structure Store with rich APIs||Distributed Database, Key-Value Store with simple indexes and complex data types|
|In-Memory NoSQL||Tuned for RAM||Tuned for RAM and SSDs|
|Cores||Multiple instances can be bound to multiple cores. Risk of losing replicated data if master and slave are on the same node.||A single instance can take advantage of multiple cores. No risk of losing replicated data; rack-awareness support can be used to ensure that replicas are distributed on different nodes.|
|Persistence||Data can be persisted using snapshots and Append Only Files (AOF). When using AOF, the whole log must be reapplied at restart.||Data can be persisted in pure RAM with asynchronous writes to HDD. Data can also be persisted with SSDs, using a proprietary log structured file system. Fast Restart capability in the Enterprise Edition enables Aerospike server to be restarted without rebuilding the index from storage.|
|Clustering||In beta; point-point (n-1)2 TCP connections.||Auto-clustering using multicast heartbeats.
Mesh (unicast) mode can be used if multicast is not available.
|Sharding||Application level sharding, or with Jedis. Increasing the number of shards may result in downtime.||Auto-sharding, Auto-rebalancing|
|Replication||Manual configuration of master-slave.
A node is only a master or a slave, requiring more machines to be managed.
Asynchronous replication may lose data if node goes down.
|Auto-assignment of master-slave.
Simpler operations – same machine can be master for some partitions and slave for others, requiring fewer machines to be managed.
Synchronous replication ensures that data is never lost.
|Cross data center Replication||No||Yes|
|APIs||Application must know which node has the data and which node to send request to. (Clustering, in beta, removes the need for this.)
Rich set of data structures and operations. No nested data structures.
|Application does need not know where to send the data. Cluster aware client automatically sends data directly to the node with the data.
Key value operations on integer, string, list, map, blobs. List and map data structures can be nested.
UDFs, distributed queries, aggregations.
|# Keys||232 keys||2160 keys|
|Use Cases||Popularly used as an LRU cache.||Can be used as a cache with auto-expiration.Front edge operational database used as session store, user profile store, id-mapping, dynamic web portals, fraud detection, Real-Time Bidding (RTB) etc. Good for apps that require the speed of RAM and scale of flash (SSDs).|
“We were looking for a solution that gave us three things; One: cost-effectiveness. Two: concurrent reads and writes, which can scale up with added hardware. Three: performance that was very good 95% to 99% of the time…We also evaluated Couchbase, Redis, Terracotta BigMemory Max, Amazon Memcache and Amazon DynamoDB, as well as Aerospike… None of the other systems that we evaluated prior to Aerospike were fully viable options for us… Ultimately, we selected the Aerospike in-memory NoSQL database because it delivered the highest performance and enabled the lowest cost of deployment. It’s a fantastic product.”
– Snapdeal VP Engineering, Amitabh Misra
“The two problems that Aerospike helps us solve are speed and scale. We were looking for a technology, and we actually did prototypes with .. Redis, Riak and what we were looking for is low latency in the sense that you always have sub-millisecond lookups….30 billion ad requests translates to something like 400K TPS, that’s the average number. During peak time this number may double. That’s when we benchmarked a lot of these technologies and Aerospike kicks butt here.”
– Prakash Chandra, head of Engineering, eBay Advertising
Forensiq is able to continuously score over 500 million users, mobile devices and IP addresses to accurately detect potential fraud within 5 milliseconds, bringing quality and transparency to online advertising. “With Aerospike we’ve found a solid database offering that is built for unrivaled performance and true scaling.”
– Matt Vella, CTO, Forensiq
Read Lynn Langit’s benchmark showing Aerospike faster than Redis. Lynn is a AWS Community Hero, Google Cloud Developer Expert, Microsoft MVP (SQL Server), MongoDB Master and ACM Distinguished speaker.
Read why Yashi selected Aerospike over Redis, watch the hasgeek session on “Alternatives to Redis while not compromising speed” and check stackoverflow.
eGloo evaluated Memcached, MongoDB, and Redis for a fast NoSQL key-value store before discovering Aerospike. In his blog post, CEO and co-founder George Cooper examines technologies eGloo is utilizing to develop self-programming and self-assembling information systems at Internet scale.