Uh, you don't need to write your own client to do that, you only need to
write a wrapper class that on set() iterates over all servers and does a
set. It's not exactly rocket science... :-)

However, why on earth would you *want* to write something to all memcached
servers in your cluster? It's insane, and it completely defeats the purpose
of memcached in the first place.


/Henrik

On Wed, Jul 1, 2009 at 11:31, Xaxo <[email protected]> wrote:

>
> On Jun 30, 8:53 pm, Tzury Bar Yochay <[email protected]> wrote:
> > Hi,
> >
> > I got the following servers layout.
> >
> > Couple of servers, with a load-balancer in the front, On each server I
> > have my own server application and  mySql with replication.
> >
> > I want to use memcached as the mechanism to share the clients sessions
> > between the servers.
> >
> > I want to make sure that whatever I cache on one machine would be
> > cached on the other as well.
> >
> > How can I do that in memcached?
> >
> > thanks for your time and advise.
>
> You need to either write your own memcached client or use one of the
> memcached proxies out there. Each memcached instance can only do get/
> set/replace => no cluster functions at all (one memcached server
> doesn't know about others), managing more than one instance/server is
> a matter of the client that you use. So you either need a client that
> writes to all servers in your pool simultaneously or you need a proxy,
> which does the same.
>
> Momchil

Reply via email to