PHP API Unix Socket Connect
nneul at umr.edu
Mon Oct 16 03:14:36 UTC 2006
I would expect a relatively small increase in performance, though that
isn't the main intent of the unix socket support.
The intent of the unix socket support is to be able to use unix level
permission controls on the memcached itself. Using the unix level
sockets allows installing memcached in an untrusted multi-user
environment without having to give up all your security and cache
In my case, I'm using it to allow three separate web services instances
running on one box securely each have their own independent cache that
the others cannot access.
Nathan Neulinger EMail: nneul at umr.edu
University of Missouri - Rolla Phone: (573) 341-6679
UMR Information Technology Fax: (573) 341-4216
> -----Original Message-----
> From: memcached-bounces at lists.danga.com
> [mailto:memcached-bounces at lists.danga.com] On Behalf Of Tsz Ming WONG
> Sent: Sunday, October 15, 2006 10:09 PM
> To: Mikael Johansson
> Cc: Memcached Listserve
> Subject: Re: PHP API Unix Socket Connect
> On 10/16/06, Mikael Johansson <mikael at synd.info> wrote:
> The CVS version of pecl/memcache now supports unix
> domain sockets, you
> can checkout and build a copy as
> cvs -d :pserver:cvsread at cvs.php.net:/repository
> checkout pecl/memcache
> cd pecl/memcache
> make install
> Connect to the server like
> $memcache = new Memcache();
> $memcache->addServer('unix:///var/run/memcached/memcached.sock', 0);
> Please note that the port number must be set to 0
> (otherwise it defaults
> to 11211.) The socket must also be writable by the user
> your script run
> as, for example the webserver user.
> Craig Wood wrote:
> > Has anyone seen, used or heard of the unix socket
> connection being used
> > successfully with PECL's PHP memcache API or any
> other PHP memcache API ?
> will there be any performance boost in using the unix socket?
> any benchmark result?
> Best Regards,
> Tsz Ming
More information about the memcached