There's a bit of hype around: HandlerSocket

It seems like faster, nosql access to MySQL data is becoming more desirable. Percona Server is now shipping with HandlerSocket built in.

My question is, what production use-cases make sense to bypasses the libmysqld layer of MySQL to utilize the HandlerSocket plug-in? Are you deploying it into production?

  • Since I'm not 100% sure about the context of this question, can you give some more context? I suppose this is like asking someone if they reddit; when their response is "what's that" then the answer is "you don't know, so shush".
    – jcolebrand
    Commented Jun 17, 2011 at 19:47
  • Sorry I took me a while to answer this. I had to stop laughing first !!! Commented Jun 17, 2011 at 20:23
  • @jcolebrand and @Rolando - I'm trying to assess if people are deploying HandlerSocket into production and why. Simple question, or so I thought. lolz
    – randomx
    Commented Jun 17, 2011 at 23:03
  • Believe me, I was not laughing at your questionm. This is indeed a worthwhile question. There is not a lot of documentation online or in books on this. I imagined that HANDLER would have gone away by now. It made it all the way to Percona ??? That's what made me laugh. +1 for resurrecting this issue in the eyes of the DBA.SE !!! Commented Jun 18, 2011 at 23:45

1 Answer 1


I find it interesting that Percona says that HandlerSocket is not that popular. In fact, it has bugs when writing operations interferes with open HANDLER structures.

What I also find appalling is that the concept of the HandlerSocket (known back then as HANDLER goes way back to MySQL 4.0.3 for both MyISAM and InnoDB. There were only provisions for reading at that time.

The basic usage of HANDLER is also in the book MySQL Reference Manual : Documentation From the Source, Section 6.4.2 Pages 512,513 (I have the book right here next to me)

Question remains : What purpose does the HandlerSocket serve ???

Imagine Facebook engineers trying to read a value in a MyISAM table (Facebook hates MyISAM, BTW) that is heavily trafficked. We all know that MyISAM performs a full table lock for any DML or SELECT performed. What you wanted to do is adjust a single column in a specfic row in that table (via SQL) but you need to know that data right now before SELECT queries lock it down. Do you want to wade through the humongous number of DB Connections hitting the one table you need just to change a single value? You could bypass these waiting SELECTs with no locking using the HANDLER syntax. You can do the same to InnoDB tables and bypass MVCC (MultiVersioning Concurrecy Control) and row-level locks as well.

Only in a high-traffic, high-read environment would you need to takes such a risk, especially if finding out data RIGHT NOW was the highest priority.

If you really want to know what production environments actually use it, I would write Percona directly in the blogs begging for that answer. Since I have never seen coding examples with the HANDLER (today HandlerSocket) do things other than reading, it would only serve the purposes of big MySQL installations like Facebook.


When you look at the syntax for opening tables, opening indexes and traversing rows, it resembles some programming languages I coded in back in the late 1980's.

I am referring to the languages DBase, Clipper, FoxPro and Visual FoxPro. DBase was the grandfather of all these products. Now, before you start laughing and falling out of your chair, DBASE STILL EXISTS AND SO DOES VISUAL FOXPRO !!! I personally know one person that still codes in FoxPro and Visual FoxPro !!! OK, now you can fall out of your chair, crying in the fetal position. Still don't believe me ??? How about some sample code ???

Enough ranting on old data handling programming languages that resembles hierglyphics !!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.