Linux负载均衡专题(个人心得和笔记按照下面的步骤就能建立可用的集群)

来源:互联网 发布:网络综合布线实训报告 编辑:程序博客网 时间:2024/05/09 15:59

http://www.askwan.com/post/28/

haproxy+keepalived

 

Linux企业集群

http://book.51cto.com/art/200806/76015.htm#

 

第一步:rsync同步web数据(测试通过并且自己加入了ssh的RSA key验证)

http://www.linuxsir.org/main/?q=node/256   rsync 服务器架设方法 v0.1b (正在修订中)

 

第二步:安装heartbeat并且可以故障切换(正在学习中..)

centos 5.2

yum install -y heartbeat heartbeat-devel heartbeat-ldirectord heartbeat-gui piranha

 

第三步:配置heartbeat

因为是rpm安装所以默认/etc/ha.d/中没有包含ha.cf,authkeys,haresources这三个文件必须拷贝过来

rpm查询cat /etc/ha.d/README.config

You need three configuration files to make heartbeat happy,
and they all go in this directory.

They are:
        ha.cf           Main configuration file
        haresources     Resource configuration file
        authkeys        Authentication information

These first two may be readable by everyone, but the authkeys file
must not be.

The good news is that sample versions of these files may be found in
the documentation directory (providing you installed the documentation).

If you installed heartbeat using rpm packages then
this command will show you where they are on your system:
                rpm -q heartbeat -d

If you installed heartbeat using Debian packages then
the documentation should be located in /usr/share/doc/heartbeat

然后利用cp把三个文件拷贝到/etc/ha.d/中

第四步:具体安装

http://linux.chinaunix.net/bbs/viewthread.php?tid=1051263

heartbeat2.x的测试终结篇,针对使用heartbeat的新手

注意:例如我们想做httpd的双机热备份的话,首先要把httpd的启动脚本从init中删除

chkconfig --del httpd

chkconfig --level 345 httpd off

删除完成以后修改haresources

HA2 192.168.0.40 httpd

注意这里生成完成了还是不能用必须用/usr/lib/heartbeat/haresources2cib.py haresources重新弄cib.xml和cib.xml.sig

 

主题:heartbeat V2在CentOS4.6上简要安装、配置笔记

http://www.javaeye.com/topic/191076

heartbeat2.1.4 实现监控应用服务(mysql)具体步骤

http://www.china-lg.com/blog/index.php?play=show&id=553

Linux 上的高可用中间件,第 1 部分: heartbeat 与 Apache Web 服务器

http://www.ibm.com/developerworks/cn/linux/l-halinux/index.html

LVS+Heartbeat+Ldirectord在RHEL5上

http://blog.chinaunix.net/u2/82873/showart_1405630.html

基于LVS的互联网应用

http://unix.ctocio.com.cn/196/8689196_5.shtml

基于LVS的Linux负载均衡技术实现

 http://net.it168.com/a2008/0731/199/000000199163.shtml

ipvsadm Man

http://linux.die.net/man/8/ipvsadm

 利用LVS+Keepalived 实现高性能高可用负载均衡服务器

http://www.linuxtone.org/thread-1077-1-1.html

Linux Virtual Server负载均衡 ipvsadm使用方法

http://www.lslnet.com/linux/docs/linux-7916.htm

使用LVS(Linux Virtual Server)在Linux上搭建负载均衡的集群服务

http://www.clusting.com/cluster/load_balancing/LVS_1.html

请教LVS三种工作模式和算法、session保持的问题!!!

有几个关LVS问题,小弟想请教一下:
1、
在配置LVS时,小弟想用DR模式。我想请问一下如果确定使用此模式,或是改用NAT 或是TUN模式时,该通过ipvsadm的哪个命令参数指定,ipvsadm -A -t $VIP:80 -s rr 变化rr 这个参数指定的。
2、LVS的十种轮询算法,该如何通过配置文件或是命令指定。

3、在配置LVS不知道该如何解决session保持的问题,因为有些电子商务网站需要始终保持同一个连接,连接到同一个realserver.

-m NAT
-i TUN
算法:
-s 指定
session保持:-p

---这全在手册中,或者ipvsadm -h都可以查到

多谢指点已经明白,小弟还有一问,请指点,,,

关于网站后台数据库或资料同步的问题,小弟想到如下办法:前提在没有做共享磁盘的前提下,如果数据库想要同步的话,可能要配置oracle热备,如果是mysql就可配置主从,等等,关于网站其它文件,如图片之类的,小弟想到rsync 或是在上传时同步上传。如果是做了共享磁盘,如果/date目录吧。那么几台realserver可以挂载此目录到本机了,网站的数据,还数据库都可以放在此目录了。。但问题是多个realserve要是同时写一个文件时,该如果是好呢?不知是否支持并行写入,小弟觉得关于集群配置磁盘共享这块,也就是多个realserver数据同步的问题不太好解决,也是小弟最大凝问之处,很想有机会搭建SAN,或是NAS,好好试验一下,如果搭建NAS,,使用linux的NFS就可以吧。而且也有一些集群文件系统GFS之类,等等。。。一直不太明确后端数据存储的一致性问题。

 

 

http://www.diybl.com/course/6_system/linux/Linuxjs/200868/123619.html

在RHEL5中用piranha架设squid的lvs集群

 

http://www.yatan.com/group/topic.php?tid=21513

在RHEL4系统中配置LVS负载均衡群集

http://www.linuxbyte.net.cn/article/rhel/2008-08-10/843.html

RHEL-LVS 实验(1)VS-NAT

http://www.linuxtopia.org/online_books/rhel5/rhel5_clustering_guide/rhel5_cluster_s2-lvs-routing-CSO.html

rhel 5 cluseter

 

http://blog.80s.net.cn/?p=476

lvs安装以及配置

 

http://tech.ddvip.com/2008-11/122768078295163_3.html

 

redhatAS4.2 安装集群LVS

 

http://bbs.bbsgood.com/post_45_129231_1.html

虚拟机中的lvs负载均衡

 

原创粉丝点击