# How does Aerospike compare to memcache?

**URL:** <https://discuss.aerospike.com/t/how-does-aerospike-compare-to-memcache/314>\
**Category:** How Developers Are Using Aerospike\
**Created:** [August 18, 2014, 5:18pm UTC](https://discuss.aerospike.com/t/how-does-aerospike-compare-to-memcache/314 "2014-08-18T17:18:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![oldforum](https://avatars.discourse-cdn.com/v4/letter/o/13edae/32.png) [@oldforum](https://discuss.aerospike.com/u/oldforum)\
**Post date:** [August 18, 2014, 5:18pm UTC](https://discuss.aerospike.com/t/how-does-aerospike-compare-to-memcache/314/1 "2014-08-18T17:18:00Z")

</div>

by peter » Wed Jul 02, 2014 8:41 am

Aerospike is comparable to memcache, but a bit slower because Aerospike does clustering work. On a single node system, it should be approximately the same. On a two (or more) node cluster it will be a bit slower for writes since it does 2 copy writes for every write.

So why use Aerospike? – The clustering gives you enormous capacity with almost the same throughput and latency of memcache.

---

<div class="post-metadata">

**Author:** ![oldforum](https://avatars.discourse-cdn.com/v4/letter/o/13edae/32.png) [@oldforum](https://discuss.aerospike.com/u/oldforum)\
**Post date:** [August 18, 2014, 5:18pm UTC](https://discuss.aerospike.com/t/how-does-aerospike-compare-to-memcache/314/2 "2014-08-18T17:18:12Z")

</div>

by bbulkow » Thu Jul 31, 2014 2:23 pm

Aerospike can actually be faster than Memcache in some environments.

Aerospike is multithreaded, and uses an efficient binary protocol. Even on a single server system, Aerospike may have improved performance. Aerospike can also be configured with only one copy of the data, which will make the system more comparable to MemCache in performance.

Aerospike provides many of the same features as Memcache, such as append, as CAS. However, Aerospike supports transparent clustering, in-database types (for transparent multi-language access), persistence, etc etc.

---

<div class="post-metadata">

**Author:** ![mpatnode](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@mpatnode](https://discuss.aerospike.com/u/mpatnode)\
**Post date:** [May 5, 2015, 9:09pm UTC](https://discuss.aerospike.com/t/how-does-aerospike-compare-to-memcache/314/3 "2015-05-05T21:09:46Z")

</div>

I assume we’d also be able to search and flush keys by wildcard, which memcache doesn’t allow…

---

<div class="post-metadata">

**Author:** ![bbulkow](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@bbulkow](https://discuss.aerospike.com/u/bbulkow)\
**Post date:** [May 9, 2015, 12:49am UTC](https://discuss.aerospike.com/t/how-does-aerospike-compare-to-memcache/314/4 "2015-05-09T00:49:29Z")

</div>

Sort of. Aerospike has some functionality to do in-database maintenance.

You can scan all keys, and delete the ones you’d like to delete.

You can build a “scan udf”, which will do that scan in-databases.

You can build an index on a bin (column), and query or delete that

You can drop a set (which is like a table)

But, as Aerospike is a KVS that shards based on the digest of the key (a consistent hash), you can’t do a range lookup, or wildcard lookup, on a key.

Hopefully that helps…
