https://coreos.com/etcd/docs/latest/auth_api.html auth …
分类存档:服务器软件及配置
haproxy 实现http隧道代理
什么是http隧道代理?(自己搜吧) haproxy的经典逻辑是:每个请求都分配给所配置的后端(backend …
haproxy 健康检查与域名解析
配置:
1 2 3 4 5 6 7 8 9 10 |
resolvers mydns nameserver svr1 172.16.162.194:53 backend http_backend mode http acl acl_baidu req.hdr(host) -i www.baidu.com acl acl_beebank req.hdr(host) -i www.beebank.com use-server svr_baidu if acl_baidu use-server svr_beebank if acl_beebank server svr_baidu www.baidu.com:80 check fall 100 rise 1 resolvers mydns resolve-prefer ipv4 server svr_beebank www.beebank.com:80 check fall 100 rise 1 resolvers mydns resolve-prefer ipv4 |
其中: check 说明要开启健康检 …
HTTP代理相关资料
HTTP 代理原理及实现(一)https://imququ.com/post/web-proxy.html H …
haproxy 配置基础
mode health 该模式用于健康检查,tcp层面的,只返回OK,如下: stats 通过http页面查看 …
Etcd初步
源码: https://github.com/coreos/etcd 说明: master分支可能还不稳定,使 …
php-redis benchmark
脚本:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
<?php $pid = posix_getpid(); $host = '10.10.11.123'; $port = '6379'; $auth = 'thepassword'; $total = $slow = $fail = 0; $arr = array(); $t_start = microtime(1); for($i = 0; $i < $argv[1]; $i++) { $total++; $time_start = microtime(1); $r = new Redis(); $r->connect($host, $port, 1); $r->auth($auth); $r->select(3); $key = "test_${pid}_$i"; $val = "data_$i"; $r->set($key, $val); $v = $r->get($key); if ($v !== $val) { $fail++;continue; } $r->del($key); $time_end = microtime(1); $time_use = 1000 * ($time_end - $time_start); if ($time_use < 3) { @$arr["<3"]++; } else if ($time_use < 10) { @$arr["<10"]++; } else if ($time_use < 14) { @$arr["<14"]++; } else if ($time_use < 20) { @$arr["<20"]++; } else if ($time_use < 50) { @$arr["<50"]++; } else if ($time_use > 100) { @$arr[">100"]++; } } $t_end = microtime(1); echo "total: $total\t"; echo "fail: $fail\n"; echo "time use: ". (($t_end - $t_start) * 100) ."ms\n"; ksort($arr); printf("%4s: %6s %s(%%)\n", "ms", "count", "percent"); foreach($arr as $k=>$v) { printf("%4s: %6d %.2f%%\n", $k, $v, $v/$total*100); } |
阿里云的1G标准的re …
git diff(merge) with beyond compare
在mac上,beyond compare默认没有安装命令行,需要通过如下方式安装命令行: 其中,命令行有两个命 …
openldap 备份与导入
ldap有几个slap* 命令,与ldap* 命令不同的是,前者直接操作库文件,不涉及密码问题。 导出: [c …
Openldap/ldap 双向同步/复制/Mastsr/slave
资料: http://www.cnblogs.com/moonson/archive/2008/11/20/1 …