[CalendarServer-users] Multiple Memcached servers

Rob Archibald rob at robarchibald.com
Sat Feb 18 19:18:54 PST 2017

One of the benefits of Memcached is that it allows you to spread caching
load across multiple servers. From looking at the config file for Calendar
Server, it looked initially to me that it would support multiple Memcached
servers, but now I guess I'm not so sure.  This is how php handles
multi-server configuration:



    "", //web1

    "", //web2

   "", //web3



I did a quick search of the code and I think I've found the connection
method for memcache. I found this in txdav/who/cache.py so let me know if
I've gone to the wrong place. It looks like it is only able to handle one
server (hightlighted below). Am I missing some secret method to allow for
multi-server memcached? 


def _getMemcacheClient(self, refresh=False):


        Get the memcache client instance to use for caching.


        @param refresh: whether or not to create a new memcache client

        @type refresh: L{bool}


        @return: the client to use

        @rtype: L{memcacheclient.Client}


        if refresh or not hasattr(self, "memcacheClient"):


            if config.Memcached.Pools.Default.MemcacheSocket:

                client_addr =


                client_addr = "{}:{}".format(




            self.memcacheClient = ClientFactory.getClient([client_addr],
debug=0, pickleProtocol=2)

        return self.memcacheClient


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-users/attachments/20170218/1ed1f2b1/attachment.html>

More information about the calendarserver-users mailing list