January 15, 2019 | Written by: IBM Research Editorial Staff
Categorized: Cloud Computing
Share this post:
Wikipedia uses memcache for faster search results.
The last time you looked up a name on LinkedIn, booked an apartment through Airbnb or searched for a hashtag on Twitter, did you notice that as you typed, the websites were already suggesting answers?
This is possible because they use what is known as memcache. Memcache speeds up dynamic databases used by websites such as the aforementioned and others including Reddit, Facebook, Instagram and Wikipedia, by caching data in DRAM. This eliminates the need to access the database itself, providing instant results.
Since memcache was first launched in 2003, developers have relied on DRAM to cache their data. Today, according to stackshare.io, more than 700 applications rely on the technology. In fact, most of today’s cloud providers also offer managed memcache services.
But we knew DRAM wasn’t the best solution for memcaching, particularly since it’s volatile, meaning when it loses power it loses the data. DRAM is also expensive. In 2017, the technology had a 47 percent increase in price-per-bit, the largest increase since 1988. In addition, only a relatively low amount can be installed into a single server, which further increases operating costs.
Data Store for Memcache
To modernize memcaching, for the past year our team of researchers at IBM Research-Zurich has developed a managed memcache service using non-volatile memory (NVM) in the IBM Cloud called Data Store for Memcache.
Data Store for Memcache replaces DRAM with NVM storage using the same memcache API. The result offers orders of magnitude higher capacity, at a lower cost, while maintaining performance.
When compared to DRAM, users can expect roughly 20x lower costs when using Flash and 4.5x lower hardware costs when using 3DXP, without sacrificing performance. In addition, Data Store for Memcache offers higher cloud caching capacity scalability.
To demonstrate the benefits, we benchmarked the performance of Data Store for Memcache against Amazon’s AWS Elasticache, which is based on DRAM, using the free versions for both, and running a client within the same availability region (dal10 for Data Store for Memcache, and us-east2 for Elasticache).
We evaluated performance using memaslap, a standard benchmark for memcache performance, and the results are impressive. Data Store for Memcache is 33 percent faster on average (across all concurrent request data points). For full disclosure, the specific performance improvement is dependent on many factors, such a load on servers and clients, and it only reflects the performance of the free version of AWS Elasticache.
Memcached DDos attacks
Last year, memcaching received a lot of negative attention after hackers used the memcached protocol, coming from UDP port 11211, to amplify a distributed denial of service attack (DDos). To prevent this from happening on the Data Store for Memcache we implemented authentication and authorization measures that secure it against DDos and other similar attacks. We also employ encryption in transit and avoid UDP all together, which adds an additional layer of security since the default memcache protocol is typically run in a trusted network without any authentication method.
Data Store for Memcache is available now in the public catalogue within the IBM Cloud as an Experimental service with a free lite plan with one gigabyte of cloud storage capacity for 30 days. It incorporates IAM authentication and authorization, and all data is encrypted at rest and over the wire. While available globally, the servers are located in the US South Region, which could impact performance based on the location of the user.
Comparing free instances of IBM Data Store for Memcache and AWS Elasticache
IBM Data Store for Memcache will be presented at the 17th USENIX Conference on File and Storage Technologies, February 25-28 in Boston. The paper will be soon made available here.