何谓代理?所谓的代理一般分为两种,即正向代理和反向代理。正向代理可以实现让不同的主机通过代理服务器使用同一个地址和Internet上的其他主机通信,通常在一个局域网内只有一个公网IP时都需要用到正向代理,而反向代理则实现的是将来自不同主机的请求发送给后端的其他服务器..
分类:
其他好文 时间:
2015-06-06 15:09:07
阅读次数:
172
#include#include#includetypedef int Status ;typedef int ElemType;#define OK 1#define ERROR 0#define LISTSIZE 10#define ADDSIZE 2typedef struct { El...
分类:
其他好文 时间:
2015-06-05 21:03:00
阅读次数:
101
#includeint merge(int unsortedarr[],int lb,int rb,int len,int sortedarr[]){ int i=lb,j=rb,k=0; while(i<rb&&j<=len) { if(unsortedarr[i]...
分类:
其他好文 时间:
2015-06-03 19:22:27
阅读次数:
107
一、LVS简介LVS是LinuxVirtualServer的简写,意即Linux虚拟服务器,是一个虚拟的服务器集群系统。本项目在1998年5月由章文嵩博士成立,是中国国内最早出现的自由软件项目之一。负载均衡集群(LoadBalancing,简称为LB)从工作在协议层来划分为TCP和应用层;TCP协议层是根据请求..
分类:
系统相关 时间:
2015-06-03 13:54:53
阅读次数:
314
安装haproxy apt-get install haproxy 安装、配置rsyslog apt-get install rsyslog vi /etc/rsyslog.d/haproxy.conf 加入以下内容: $ModLoad imudp $UDPServerRun 514 local0.* /var/log/haproxy.log 保存, 重启...
分类:
其他好文 时间:
2015-06-02 15:39:33
阅读次数:
235
redis的管道(Pipelining)操作是一种异步的访问模式,一次发送多个指令,不同步等待其返回结果。这样可以取得非常好的执行效率。这就是管道,调用方法如下:来源:http://blog.csdn.net/freebird_lb/article/details/7778919redis是一个cs...
分类:
其他好文 时间:
2015-06-02 10:58:42
阅读次数:
134
一、环境系统:CentOS6.4x64最小化安装ha-keep-m:192.168.3.15ha-keep-s:192.168.3.22httpd-16:192.168.3.16httpd-17:192.168.3.17VIP:192.168.3.28二、在ha-keep-m和ha-keep-s上安装haproxy[root@ha-keep-s~]#rpm-ivhhttp://download.fedoraproject.org/pub/epel/6/x86_64/epe..
分类:
其他好文 时间:
2015-06-01 20:51:55
阅读次数:
159
#haproxy+keepalived+rabbitmq集群192.168.6.128haproxy+keepalived192.168.6.129haproxy+keepalived192.168.6.130rabbitmq192.168.6.131rabbitmq192.168.6.132vip1、erlang安装:wgethttp://www.erlang.org/download/otp_src_R15B01.tar.gztarzxvfotp_src_R15B01.tar.gzcdotp_..
分类:
其他好文 时间:
2015-06-01 20:38:51
阅读次数:
135
本文参考http://freeloda.blog.51cto.com/2033581/1294094一、环境系统:CentOS6.4x64最小化安装haproxy:192.168.3.15httpd-16:192.168.3.16httpd-17:192.168.3.17二、配置测试用的httpd服务在httpd-16和httpd-17配置httpd服务#在httpd-16上操作
[root@httpd-16~]#yuminstallht..
分类:
其他好文 时间:
2015-06-01 14:57:33
阅读次数:
194
int LA=14;
int LB=15;
int RA=16;
int RB=17;
int EN1=3;
int EN2=5;
const int LS=2;
const int RS=6;
void setup()
{
pinMode(LA,OUTPUT);
pinMode(LB,OUTPUT);
pinMode(RA,OUTPUT);
pi...
分类:
其他好文 时间:
2015-05-30 12:19:08
阅读次数:
102