- 论坛徽章:
- 0
|
php调用memcache的数据
代码如下:
<?php
for($i=0;$i<100;$i++){
$memcache = new Memcache;
$memcache->connect(mq.q.com, 8002) or die ("Could not connect");
$tmp_object = new stdClass;
$tmp_object->str_attr = 'test';
$tmp_object->int_attr = 123;
$memcache->set('phptest555', $tmp_object, false, 10) or die ("Failed to save data at the server");
$get_result = $memcache->get('phptest555');
var_dump($get_result);
}
?>
其中mq.q.com在DNS中只解析了10.75.1.10 / 10.76.1.10 两个地址
把这个脚本放在10.75.1网中跑一下,就全部去读写10.75.1.网段了,相反放在10.76网段中,又全去读写10.76去了
就是读不到对方网段中,其中DNS没问题,使用其他参数取域名的IP地址,都是两个IP地址一半的机会
简直见鬼了
请问memcache的高手们见过这么奇怪的问题吗? |
|