Keys larger that 250

Aaron Stone aaron at serendipity.cx
Mon Dec 17 19:22:22 UTC 2007


Let's please remove the "documentation picture" because I have more than a
thousand words to replace it already ;-)

http://code.sixapart.com/svn/memcached/branches/binary/server/doc/binary-protocol-plan-v2.txt

There are now two bytes for the key length. There are several other bytes
reserved. A number of fields were rearranged to ensure that 16 bit numbers
were aligned on half-word boundaries.

Aaron


On Mon, Dec 17, 2007, Brian Aker <brian at tangent.org> said:

> Hi Tim!
> 
> This came up during the hackathon. I suggested that two bytes be  
> reserved instead of one in the binary protocol so that it could  
> support this. It would still require recompiling the server though.
> 
> Cheers,
> 	-Brian
> 
> On Dec 13, 2007, at 3:35 PM, Tim Bunce wrote:
> 
>> My 'natural' keys are generally 400 to 900 bytes.
>>
>> I'd like to avoid having to pay the price of either
>> a) creating a good digest (MD5) each time, or
>> b) using a poor digest and including a copy of the full key inside the
>> value (so it can be checked when fetched).
>>
>> I was surprised that memcached doesn't offer a command like option to
>> support larger key sizes.
>>
>> The image of the binary protocol[1] shows "keylen 3".  Does than mean
>> three bytes will be used to store the keylen in the binary protocol?
>>
>> Tim.
>>
>> [1] http://code.sixapart.com/svn/memcached/trunk/server/doc/binary-protocol-plan.jpg
> 
> --
> _______________________________________________________
> Brian "Krow" Aker, brian at tangent.org
> Seattle, Washington
> http://krow.net/                     <-- Me
> http://tangent.org/                <-- Software
> http://exploitseattle.com/    <-- Fun
> _______________________________________________________
> You can't grep a dead tree.
> 
> 
> 

-- 





More information about the memcached mailing list