How to maintain cache update on different memcached servers?

howard chen howachen at gmail.com
Tue Oct 31 16:34:19 UTC 2006


On 11/1/06, Jehiah Czebotar <jehiah at gmail.com> wrote:
> > so, correct me if i am wrong...
> >
> > 1. on each memcached server, i start the memcached deamon as they are
> > separetely server, they don't know each other, e.g.
> > ./memcached -d -m 2048 -l 10.0.0.40 -p 11211
> >
> > 2. during connection from client, add all the servers...
> > e.g.
> >
> > $memcache = new Memcache;
> > $memcache->addServer('memcache_host', 11211);
> > $memcache->addServer('memcache_host2', 11211);
> >
> > 3. the memcached objects will be stored evenly on all these server,
> > and i can get it using Memcache::get , without specifying the server
> > host
> >
>
> correct: that is exactly it.
>
> (just make sure the memory you are configuring memcached to use (2048)
> is not larger than the actuall free RAM on your machines)
>
> --
> Jehiah
>

well, i have 2 questions.

1. how do memcached know which server currently hold the data? need to
query all servers?

2. fetching data from network might be slower than local drive, and
cause addiitional overhead to your bandwidth?


More information about the memcached mailing list