开发者

percona nosql vs other nosql

开发者 https://www.devze.com 2023-04-06 04:03 出处:网络
I am evaluating nosql stores for storing key/value pairs (for a part of application), and came across percona which offers native key/value within mysql world. It seems a good solution as it allows th

I am evaluating nosql stores for storing key/value pairs (for a part of application), and came across percona which offers native key/value within mysql world. It seems a good solution as it allows the storage to remain at a single place (since rest of the functionality exist in mysql and would开发者_JS百科 continue to as-is). Are there any other advantages over other key/value store such as cassandra? What are the disadvantages?


You're referring to the HandlerSocket interface, which bypasses the SQL query layer and allows you to fetch and store rows in a single InnoDB table by primary key. The idea is that avoiding the overhead of SQL allows applications to run a much higher rate of QPS.

HandlerSocket shows promise, but so far what we've found (I work for Percona) is that the bottleneck is the hastily-written client interfaces. That is, the client API for PHP, Ruby, etc. in their current state of implementation have such overhead that HandlerSocket is no faster than writing simple SQL statements for INSERT and SELECT. InnoDB is optimized for primary key access already, since the tables are really stored as clustered indexes by primary key.

Future development on writing optimized code for the HandlerSocket client libraries should improve this over time. If you want to help this process along, get involved in the open-source projects to develop those client libraries.

Another drawback of HandlerSocket is that AFAIK, it doesn't support in-place incrementing of values, which is an optimization some other key/value stores offer. With HandlerSocket, you'd have to fetch the value, read it, increment it, then post it back to the database. This introduces a race condition, so you'd have to lock the row somehow.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号