Recently, I tried to access memcached server on local and remote setup in a Python application. I am sharing my experience with two of most popular clients.
Python-memcached
- The first choice was a pure Python solution to access memcached, that is python-memcached. It is a simple to install, understand and use solution.
- It do not offer many customization setting, at least on its README 🙂
- Very less or non-existent, useful documentation
- Fails consistently for a high frequency request to memcached server. Failures are for simultaneous read on a file xxx. I could not find an easy fix for this problem.
- I do not suggest using it for a highly scalable application.
Pylibmc
- Bare minimum Python wrapper to C/C++ API to memcached
- Installation was simple similar to Python-memcached
- Offers many useful options during connection setup (such as non-blocking requests, TCP no-delay disable)
- Shows no problem in demanding and highly scalable application
- Shows better performance than Python-memcached
My verdict: Pylibmc is a clear winner 🙂
Exactly the question I was wondering, thanks !
LikeLike
Thanks that helps … I had to decide on which one to pick !
LikeLike