Hi,

I have following configuration:

Client: php53u-pecl-memcache-3.0.8-1.ius.el6.4.z.x86_64
Server: memcached-1.4.4-3.el6.x86_64

There are 6 clients (client1 through to client6, and 3 memcache servers 
server1 through to server3)

All 6 clients are fronted by a single load-balancer and serve same site. 

On client1, client2 and client3 I have..,

$servers[] = array('hostname'=>'192.168.1.120', 'port'=>11211);
$servers[] = array('hostname'=>'192.168.1.121', 'port'=>11211);
$servers[] = array('hostname'=>'192.168.1.122', 'port'=>11211);

$memcache = new Memcache;

foreach ($servers as $memserver){
        echo $memserver['hostname'] ;
        $memcache->addServer($memserver['hostname'], $memserver['port'] ) 
or die ("Could not connect");
}

On clinet3, client4 and client5 I have...Note that server1, server2 and 
server3 resolves to 192.168.1.120, 192.168.1.121 and 192.168.1.122 
respectively via /etc/hosts file

$servers[] = array('hostname'=>'server1', 'port'=>11211);
$servers[] = array('hostname'=>'server2', 'port'=>11211);
$servers[] = array('hostname'=>'server3', 'port'=>11211);

$memcache = new Memcache;

foreach ($servers as $memserver){
        echo $memserver['hostname'] ;
        $memcache->addServer($memserver['hostname'], $memserver['port'] ) 
or die ("Could not connect");
}

Issue: When I try to get a key via $memcache->get function; client1,client2 
and client3 are fine but client4,client5 and client6 cannot get the value.

The key/value  is actually on server1. If I go to that server directly from 
any of the clients  I can get the key.

I did a tcp dump and noticed that on client4,5 and 6 , it always goes to 
.122 (server3), whereas on client1,2 and 3 it goes to .120(server1) where 
the key is present.

How can I resolve this ? I have to use hostnames on client4,5 and 6 and IPs 
on the other clients.

Thanks

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"memcached" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to