{"id":1397,"date":"2012-08-15T13:31:59","date_gmt":"2012-08-15T20:31:59","guid":{"rendered":"http:\/\/xiehang.com\/blog\/?p=1397"},"modified":"2012-08-15T13:31:59","modified_gmt":"2012-08-15T20:31:59","slug":"phpredis","status":"publish","type":"post","link":"https:\/\/xiehang.com\/blog\/2012\/08\/15\/phpredis\/","title":{"rendered":"PHPRedis"},"content":{"rendered":"

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

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.<\/p>\n

I dig out an article of how to build up PHPRedis extension<\/a>, 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.<\/p>\n

I’ve deployed the extension to one of my test box, and will do some tests later on.<\/p>\n","protected":false},"excerpt":{"rendered":"

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 […]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[72,364,365,363,366],"_links":{"self":[{"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/posts\/1397"}],"collection":[{"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/comments?post=1397"}],"version-history":[{"count":2,"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/posts\/1397\/revisions"}],"predecessor-version":[{"id":1399,"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/posts\/1397\/revisions\/1399"}],"wp:attachment":[{"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/media?parent=1397"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/categories?post=1397"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/tags?post=1397"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}