On Thu, 2008-02-28 at 14:36 +0100, Roy Lyseng wrote: > Hi, > > I have a question around the protocol support in memcached: > > Is there any (good) reason for registering one port per protocol in > memcached? We have the text protocol, the binary protocol, and yet other > protocols are in the coming. Would it be better to listen on a single > port per IP protocol (TCP or UDP) and dispatch subprotocol requests > internally? We could e.g. let the first byte in a packet determine the > subprotocol (text protocol reserves all lower-case ASCII letters...) and > then dispatch the socket to the proper subprotocol handler. > > I am afraid of the myriad of options that will be needed to configure a > memcached server. It would be great if we only need one option per IP > protocol. Besides, it will make it easier for us if we decide to > register official IANA ports for memcached. > > Roy
+1 for keeping things on the same port because we have a magic byte to differentiate protocols and to know when our server doesn't understand the client's version, too! +1/2 on the IANA point. I think that the most important issue is that we don't appear to be setting ourselves up to request one port number per protocol _version_. The text and binary protocols aren't so much different versions as they are different protocols entirely. Aaron
