Memcached: All content tagged as Memcached in NoSQL databases and polyglot persistence
Tuesday, 13 March 2012
The Benefits of the MySQL Memcached Plugin
Mario Beck:
But the memcached plugin to MySQL is a replacement or addition to the SQL interface to MySQL. So instead of using SQL queries in your application to persist or retrieve data from MySQL you can use the memcached interface. And what are the benefits?
- Much higher performance (nb: reduced latency, higher throughput) Easier scalability via sharding Simpler application coding
Plus Baron Schwartz’s cogent addition:
I think a huge benefit you’re discussing, but not naming separately, is consistently. With memcached, you have two copies of the data, and the man with two watches never knows what time it is. With a memcached interface to MySQL, you have only one copy — and it is consistent. This is a huge win.
Original title and link: The Benefits of the MySQL Memcached Plugin (©myNoSQL)
via: http://mablomy.blogspot.com/2012/03/why-should-i-consider-memcached-plugin.html
Monday, 12 March 2012
Is Memcached a Dinosaur in Comparison to Redis?
Interesting comments on StackOverflow:
So, honestly - Is memcache really that old dinousaur that is a bad choice from a performance perspective when compared to this newcomer called Redis?
Here’s mine: feature-wise Redis has already overpasssed Memcached in almost all aspects. Redis 3.0 will bring Redis Cluster a distributed implementation of a subset of Redis standalone—check this for an detailed explanation of Redis Cluster. Production-wise though, Memcached will not be replaced so easy as so many services rely on it for quite some time.
Original title and link: Is Memcached a Dinosaur in Comparison to Redis? (©myNoSQL)
via: http://stackoverflow.com/questions/2873249/is-memcached-a-dinosaur-in-comparison-to-redis
Monday, 27 February 2012
Cache Warm-Up: Redis vs Memcached vs Microsoft AppFabric
The traffic of our football news syndicating website (Kick News) has been steadily growing a lot since it launched. When we redeveloped it a couple of years ago, we used an in-process cache, by creating an IQueryable extension method that uses an md5 hash of the underlying SQL query as the key. This worked reasonably well, but has it’s obvious problems, such as the caches needing to be refilled when the app pool recycles or when the server is restarted. On our busy site, this means we had to wait until the caches are full before we serve any requests or it would overload our database server, which is unacceptable. Before the site gets any busier we’re going to move to an out-of-process cache and the are 3 main options we’ve considered are Redis, Memcached and Windows Server AppFabric
From these 3 solutions, only Redis will help address the cache warm-up issue.
Original title and link: Cache Warm-Up: Redis vs Memcached vs Microsoft AppFabric (©myNoSQL)
via: http://www.ichi.co.uk/post/18280190946/microsoft-appfabric-vs-redis-windows-port
Monday, 6 February 2012
99designs: Powered by Amazon RDS, Redis, MongoDB, and Memcached
While the authoritative storage is Amazon RDS, 99designs is using Redis, MongoDB, and Memcached for transient data:
We log errors and statistics to capped collections in MongoDB, providing us with more insight into our system’s performance. Redis captures per-user information about which features are enabled at any given time; it supports our development stragegy around dark launches, soft launches and incremental feature rollouts.
It’s also worth noting the nice things they say about using Amazon RDS:
An RDS instance configured to use multiple availability zones provides master-master replication, providing crucial redundancy for our DB layer. This feature has already saved our bacon multiple times: the fail over has been smooth enough that by the time we realised anything was wrong, another master was correctly serving requests. Its rolling backups provide a means of disaster recovery. We load-balance reads across multiple slaves as a means of maintaining performance as the load on our database increases.
Original title and link: 99designs: Powered by Amazon RDS, Redis, MongoDB, and Memcached (©myNoSQL)
via: http://99designs.com/tech-blog/blog/2012/01/30/infrastructure-at-99designs/
Monday, 30 January 2012
History of Couch Projects
Just in case you thought someone made up the whole thing about the status of CouchDB being confusing:

Found in Koji Kawamura‘s Introduction of CouchDB JP slides .
On the other hand I’m still trying to figure out if things in CouchDB land were more confusing than the various Hadoop versions out there. If you compare the two genealogy trees you’ll notice a reversed pattern.
Original title and link: History of Couch Projects (©myNoSQL)
Wednesday, 4 January 2012
Memcached as a Service for Cloud Foundry
After giving its source code a look-over, I noticed that the important component is missing - Memcached. Memcached is the de facto standard free & open source, high-performance, distributed memory object caching system, as you know. The other PaaS also supports Memcached (ex. Google App Engine, Heroku, Amazon Web Service, and so on) in various way. I believe that a lot of PaaS users want to use Memcahced, therefore, I decided to implement Memcached as a Service for Cloud Foundry.
The Java world isn’t so big into Memcached. But that’s not a good excuse for not having support for Memcahed in Cloud Foundry.
Original title and link: Memcached as a Service for Cloud Foundry (©myNoSQL)
via: http://tozw.blogspot.com/2012/01/memcached-as-service-for-cloud-foundry.html
Tuesday, 3 January 2012
Nmap Scripts for Riak, Redis, Memcached
If you take a look at the topic of security in the NoSQL context, you’ll notice that things are far from being perfect. So, any contributions in this area are welcome. Patrik Karlsoon added a couple of network exploration Nmap scripts for Riak, Redis, and Memcached. And while these will not help much with security they might proove useful for managing your NoSQL deployments:
-
Added the script riak-http-info that lists version and statistics information from the Basho Riak distributed database.
-
Added the script memcached-info that lists version and statistics information from the distributed memory object caching service memcached
-
Added the script redis-info that lists version and statistic information gathered from the Redis network key-value store.
-
Added the redis library and the script redis-brute that performs brute force password guessing against the Redis network key-value store.
Original title and link: Nmap Scripts for Riak, Redis, Memcached (©myNoSQL)
Wednesday, 14 December 2011
MySQL MEMORY as Poor Man’s Memcached Replacement
Q: Copy MySQL to RAM as a poor man’s memcached replacement?
A: Use the the MEMORY storage engine on a read only slave to do your reads from, is exactly what you really want and a sane setup. Forget “dumping it to disk” (?!) or other strange things.
You can even put the slave as another instance on your existing server if you can’t afford to setup a dedicated slave, but properly tuning the MySQL parameters for mostly read workloads will bring a significant performance enhancement too!
Jiminy
Original title and link: MySQL MEMORY as Poor Man’s Memcached Replacement (©myNoSQL)
Tuesday, 6 December 2011
Membase Cluster on EC2 or Amazon ElastiCache?
While there are some advatanges for using a Membase cluster on EC2 instead of an ephemeral Memcached-based service like Amazon ElastiCache, one question remains: self-managed vs managed? Answering it is essential to undertand the final OPEX.
Advantages of using a Membase cluster instead of ElastiCache:
- persistent vs ephemeral data
- backup & restore
- SASL authentication
- using reserved instances
- cluster elasticity with automatic rebalancing and no need to cache warming
When calculating the OPEX for each of these solutions, one would need to account for:
- licensing fees [1]
- monitoring, maintenance, repairs
- salary and wages
In terms of service fees here is a quick comparison:

-
Membase has both a Community and Enterprise editions ↩
Original title and link: Membase Cluster on EC2 or Amazon ElastiCache? (©myNoSQL)
via: http://forecastcloudy.net/2011/12/06/membase-cluster-instead-of-elasticache-in-5-minutes/
Sunday, 4 December 2011
Memcached Stats Explained
Von Sebastian explains all 38 of them.

Original title and link: Memcached Stats Explained (©myNoSQL)
via: http://www.pal-blog.de/entwicklung/memcached/2011/memcached-statistics-stats-command.html
Wednesday, 30 November 2011
DataSift Using MySQL, HBase, Memcached to Deal With Twitter Firehose
A new great article from Todd Hoff dissecting the DataSift architecture:

In terms of data store, DataSift architecture includes:
- MySQL (Percona server) on SSD drives
- HBase cluster (currently, ~30 hadoop nodes, 400TB of storage)
- Memcached (cache)
- Redis (still used for some internal queues, but probably going to be dismissed soon)
Leave whatever you were doing and go read it now.
Original title and link: DataSift Using MySQL, HBase, Memcached to Deal With Twitter Firehose (©myNoSQL)
Tuesday, 29 November 2011
Memcached Internals: Memory Allocation, Eviction Policy, Consistent Hashing
Earlier today when writing about a benchmark of MongoDB, Redis, Memcached-based Rails caches, I’ve refered to eviction policies and their possible impact on the cache performance. But as I wasn’t sure about how Memcached works in a couple of areas, I did a bit of research and found a tweet from Tim de Pater pointing to 2 great articles about Memcached.
Joshua Thijssen’s post covers 4 topics: Memcached operations Big-O, LRU eviction policy, memory allocation, consistent hashing.
Now, in order to combat this “malloc()” problem, memcache does its own memory management by default (you can let memcache use the standard malloc() function, but that would not be advisable). Memcache’s memory manager will allocate the maximum amount of memory from the operating system that you have set (for instance, 64Mb, but probably more) through one malloc() call. From that point on, it will use its own memory manager system called the slab allocator.
Then this post describes in great detail how Memcached eviction policy works:
The other day I was chatting with a colleague about Memcached. Eviction policy came up, and I casually mentioned that Memcache isn’t strictly LRU. But a quick Bing search said Memcache is LRU, like this Wikipedia entry. Hmm, I was 99.9% sure Memcache is not LRU, something to do with how it manages memory, but maybe I was wrong all these years. After reading through some Danga mailing lists and documentation, the answer is, Memcached is LRU per slab class, but not globally LRU.

Original title and link: Memcached Internals: Memory Allocation, Eviction Policy, Consistent Hashing (©myNoSQL)
Most Popular Articles
- Translate SQL to MongoDB MapReduce
- Tutorial: Getting Started With Cassandra
- CouchDB vs MongoDB: An attempt for a More Informed Comparison
- Cassandra @ Twitter: An Interview with Ryan King
- A Couple of Nice GUI Tools for MongoDB
- NoSQL benchmarks and performance evaluations
- Ehcache: Distributed Cache or NoSQL Store?
- Document Databases Compared: CouchDB, MongoDB, RavenDB
- Quick Review of Existing Graph Databases
- NoSQL Data Modeling