PHP memcached extension
Russell Garrett
russ at last.fm
Tue Sep 6 06:12:22 PDT 2005
On 6 Sep 2005, at 13:18, Antony Dovgal wrote:
> Not precisely true.
>
> See this pseudo-code:
> <?php
>
> $first_server = new Memcache(...);
> $second_server = new Memcache(...);
> $third_server = new Memcache(...);
> $fourth_server = new Memcache(...);
>
> ?>
>
> Nothing prevents you from using as much servers as you want in the
> same time.
>
> I'm a strong believer that it's better to write couple of lines in
> PHP and have 100% flexible API then to hardcode some logics into
> the extension and have to work around it every time to get the
> desired behaviour.
This is what we do at the moment, but the main issue with this is
that there's no failover. In order to implement proper failover you'd
need to detect when a server has died and record that fact in shared
memory (which PHP doesn't have reliably, which is why we're using
memcached in the first place), so you don't have to attempt to
connect to a dead server every time. This is a big pain.
We don't do proper failover at present (if one of our web nodes dies,
our site is unusable), which is why we were looking to use the mcache
extension to implement it.
Russ Garrett
russ at last.fm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20050906/d773ee6f/attachment.htm
More information about the memcached
mailing list