Aug 152012
 

Need to play with PHP extension for redis for a while, and after reading several articles on the web, I decided to with PHPRedis instead of Predis because of performance.

My goal is build up a webservice to proxy requests to backend redis servers, the web server is actually a proxy handling all routing related issues, so that clients don’t have to worry about hashing, sharding, etc. So I do prefer something pretty fast, though I don’t know how fast I need.

I dig out an article of how to build up PHPRedis extension, but need to get redis.ini from github to so that build won’t fail. However, if you are lazy you can just put “extension=redis.so” to redis.ini by yourself, anyway, all up to you. Determine name of tarball and directory in spec file is some sort of tricky, as it seems things changed every version. I was using nicolasff-phpredis-2.2.1-66-g89bdaf2.tar.gz and nicolasff-phpredis-89bdaf2, note that they are not identical though have some common parts.

I’ve deployed the extension to one of my test box, and will do some tests later on.