Hello,

Does the memcached protocol support multiple commands in a single TCP
packet?  The protocol doc (http://code.sixapart.com/svn/memcached/
trunk/server/doc/protocol.txt) says this is possible with UDP, but I
have a case where TCP packets contain multiple commands.  For example
(some data changed to protect the innocent):

2009-10-06 10:31:56.330709 IP 10.0.0.5.46883 > 10.0.0.1.11211: tcp 117
        0x0000:  4500 009d fbe2 4000 3f06 fdd0 0a3c 19cb
        0x0010:  0a3c 1365 b723 2bcb d4e3 5662 f357 1936
        0x0020:  5018 6000 6018 0000 6765 7420 4142 4242
        0x0030:  4242 4242 4242 4242 4242 4242 4242 4242
        0x0040:  4242 430d 0a64 656c 6574 6520 7a7a 7a7a
        0x0050:  7a7a 7a7a 7a7a 7a7a 7a7a 7a7a 7a7a 7a7a
        0x0060:  7a7a7 7a7 7a7a 7a7a 7a7a 7a7a 7a7a 7a7a
        0x0070:  0d0a 6465 6c65 7465 206f 6f6f 6f6f 6f6f
        0x0080:  6f6f 6f6f 6f6f 6f6f 6f6f 6f6f 6f6f 6f6f
        0x0090:  6f6f 6f6f 6f6f 6f6f 6f6f 6f0d 0a
2009-10-06 10:31:56.330722 IP 10.0.0.1.11211 > 10.0.0.5.46883: tcp 5
        0x0000:  4500 002d 31e9 4000 4006 c73a 0a3c 1365
        0x0010:  0a3c 19cb 2bcb b723 f357 1936 d4e3 56d7
        0x0020:  5018 5ffe 41c7 0000 454e 440d 0a
2009-10-06 10:31:56.330726 IP 10.0.0.1.11211 > 10.0.0.5.46883: tcp 11
        0x0000:  4500 0033 31ea 4000 4006 c733 0a3c 1365
        0x0010:  0a3c 19cb 2bcb b723 f357 193b d4e3 56d7
        0x0020:  5018 5ffe 41cd 0000 4e4f 545f 464f 554e
        0x0030:  440d 0a
2009-10-06 10:31:56.330737 IP 10.0.0.1.11211 > 10.0.0.5.46883: tcp 11
        0x0000:  4500 0033 31eb 4000 4006 c732 0a3c 1365
        0x0010:  0a3c 19cb 2bcb b723 f357 1946 d4e3 56d7
        0x0020:  5018 5ffe 41cd 0000 4e4f 545f 464f 554e
        0x0030:  440d 0a

The first packet contains a get and two deletes to which the server
response in the three subsequent packets.  Is this normal memcached
protocol behavior?  memcached seems to handle it (hence the three
server responses), but the protocol doc doesn't explicitly mention
this ability for TCP.

Thanks,

Daniel

Reply via email to