<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>系统运维 &#187; 负载均衡</title>
	<atom:link href="http://www.osyunwei.com/archives/category/framework/load-balancing/feed" rel="self" type="application/rss+xml" />
	<link>https://www.osyunwei.com</link>
	<description>国产化OS/AnolisOS/openEuler/RHEL/CentOS/Rocky Linux/Debian/Ubuntu Linux FreeBSD 服务器教程 &#124; Windows Server 2003/2008/2012/2016/2019/2022/2025服务器教程</description>
	<lastBuildDate>Sun, 10 May 2026 14:53:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Keepalived配置vip实现故障转移</title>
		<link>https://www.osyunwei.com/archives/13874.html</link>
		<comments>https://www.osyunwei.com/archives/13874.html#comments</comments>
		<pubDate>Fri, 16 Jun 2023 06:54:16 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Keepalived]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=13874</guid>
		<description><![CDATA[服务器：CentOS-7.x ip：192.168.21.100、192.168.21.101、192.168.21.128 vip（虚拟ip）：192.168.21.102 实现目的： 1、三台服务器运行正常的情况下，vip（虚拟ip）：192.168.21.102绑定在192.168.21.100上 2、192.168.21.100宕机，vip（虚拟ip）：192.168.21.102随机飘逸到192.168.21.101或者192.168.21.128其中的一台上面 3、192.168.21.100、192.168.21.101宕机，vip（虚拟ip）：192.168.21.102会飘逸到192.168.21.128上面 4、192.168.21.100、192.168.21.128宕机，vip（虚拟ip）：192.168.21.102会飘逸到192.168.21.101上面 5、192.168.21.100恢复，vip（虚拟ip）：192.168.21.102又会飘逸到192.168.21.100上面 1、下载安装包 https://www.keepalived.org/software/keepalived-2.2.8.tar.gz 上传keepalived-2.2.8.tar.gz到/data/soft目录 2、安装依赖包 sudo yum install openssl-devel popt-devel libnl3-devel libnfnetlink-devel kernel-devel gcc 3、编译安装keepalived sudo mkdir -p /data/server/keepalived #创建安装目录 cd /data/soft sudo tar zxvf keepalived-2.2.8.tar.gz cd keepalived-2.2.8 sudo ./configure --prefix=/data/server/keepalived #配置，必须看到以下提示，说明配置正确，才能继续安装 Use IPVS Framework : Yes Use VRRP Framework : Yes sudo make #编译 sudo make [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/13874.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/13874.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nginx+Keepalived实现Web服务器负载均衡</title>
		<link>https://www.osyunwei.com/archives/7566.html</link>
		<comments>https://www.osyunwei.com/archives/7566.html#comments</comments>
		<pubDate>Wed, 02 Apr 2014 07:39:00 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[Keepalived]]></category>
		<category><![CDATA[负载均衡]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=7566</guid>
		<description><![CDATA[说明： 操作系统：CentOS 5.X 64位 Web服务器：192.168.21.127、192.168.21.128 站点：bbs.osyunwei.com和sns.osyunwei.com部署在两台Web服务器上 实现目的： 增加两台服务器（主主模式），通过Nginx+Keepalived实现Web服务器负载均衡 架构规划： 负载均衡服务器：192.168.21.129、192.168.21.130 虚拟服务器（VIP）：192.168.21.252、192.168.21.253 部署完成之后： 1、VIP：192.168.21.253指向192.168.21.129；VIP：192.168.21.252指向192.168.21.130； 2、当192.168.21.129宕机时，VIP：192.168.21.253漂移到192.168.21.130上； 3、当192.168.21.130宕机时，VIP：192.168.21.252漂移到192.168.21.129上； 这样的主主模式好处是，两台服务器在提供服务的同时，又互为对方的备份服务器。 具体操作： 第一部分：在两台Nginx服务器上分别操作 一、关闭SElinux、配置防火墙 1、vi /etc/selinux/config #SELINUX=enforcing #注释掉 #SELINUXTYPE=targeted #注释掉 SELINUX=disabled #增加 :wq!  #保存退出 setenforce 0 #使配置立即生效 2、vi /etc/sysconfig/iptables  #编辑 -A RH-Firewall-1-INPUT -d 224.0.0.18 -j ACCEPT  #允许组播地址通信 -A RH-Firewall-1-INPUT -p    vrrp    -j ACCEPT  #允许VRRP（虚拟路由器冗余协）通信 -A RH-Firewall-1-INPUT -m state --state NEW [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/7566.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/7566.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>HAProxy+Keepalived实现Web服务器负载均衡</title>
		<link>https://www.osyunwei.com/archives/7512.html</link>
		<comments>https://www.osyunwei.com/archives/7512.html#comments</comments>
		<pubDate>Mon, 31 Mar 2014 05:52:33 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[HAProxy]]></category>
		<category><![CDATA[Keepalived]]></category>
		<category><![CDATA[负载均衡]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=7512</guid>
		<description><![CDATA[说明： 操作系统：CentOS 5.X 64位 Web服务器：192.168.21.127、192.168.21.128 站点：bbs.osyunwei.com和sns.osyunwei.com部署在两台Web服务器上 实现目的： 增加两台服务器（主主模式），通过HAProxy+Keepalived实现Web服务器负载均衡 架构规划： HAProxy服务器：192.168.21.129、192.168.21.130 虚拟服务器（VIP）：192.168.21.253、192.168.21.254 部署完成之后： 1、VIP：192.168.21.253指向192.168.21.129；VIP：192.168.21.254指向192.168.21.130； 2、当192.168.21.129宕机时，VIP：192.168.21.253漂移到192.168.21.130上； 3、当192.168.21.130宕机时，VIP：192.168.21.254漂移到192.168.21.129上； 这样的主主模式好处是，两台服务器在提供服务的同时，又互为对方的备份服务器。 具体操作： 第一部分：在两台HAProxy服务器上分别操作 一、关闭SElinux、配置防火墙 1、vi /etc/selinux/config #SELINUX=enforcing #注释掉 #SELINUXTYPE=targeted #注释掉 SELINUX=disabled #增加 :wq!  #保存退出 setenforce 0 #使配置立即生效 2、vi /etc/sysconfig/iptables  #编辑 -A RH-Firewall-1-INPUT -d 224.0.0.18 -j ACCEPT  #允许组播地址通信 -A RH-Firewall-1-INPUT -p    vrrp    -j ACCEPT  #允许VRRP（虚拟路由器冗余协）通信 -A RH-Firewall-1-INPUT -m state --state NEW [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/7512.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/7512.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LVS+Keepalived实现MySQL从库读操作负载均衡</title>
		<link>https://www.osyunwei.com/archives/7464.html</link>
		<comments>https://www.osyunwei.com/archives/7464.html#comments</comments>
		<pubDate>Fri, 21 Mar 2014 09:58:25 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[LVS]]></category>
		<category><![CDATA[Keepalived]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[负载均衡]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=7464</guid>
		<description><![CDATA[说明： 操作系统：CentOS 5.X 64位 MySQL主服务器：192.168.21.126 MySQL从服务器：192.168.21.127，192.168.21.128 MySQL主从同步的数据库为：osyunweidb 实现目的： 增加两台服务器（主备），通过LVS+Keepalived实现MySQL从库读操作负载均衡 架构规划： 操作系统：CentOS 5.X 64位 LVS主服务器：192.168.21.129 LVS备服务器：192.168.21.130 LVS虚拟服务器（VIP）：192.168.21.254 部署完成之后，通过VIP：192.168.21.254，根据LVS调度算法来访问后端真实的MySQL从服务器，实现负载均衡。 具体操作： 第一部分：分别在两台MySQL从服务器上操作 一、关闭SELINUX vi /etc/selinux/config #SELINUX=enforcing #注释掉 #SELINUXTYPE=targeted #注释掉 SELINUX=disabled #增加 :wq!  #保存退出 setenforce 0 #使配置立即生效 二、配置防火墙，开启3306端口 vi /etc/sysconfig/iptables  #编辑 -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT  #允许3306端口通过防火墙 :wq! #保存退出 /etc/init.d/iptables [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/7464.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/7464.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>使用Nginx反向代理和proxy_cache缓存搭建CDN服务器加快Web访问速度</title>
		<link>https://www.osyunwei.com/archives/2084.html</link>
		<comments>https://www.osyunwei.com/archives/2084.html#comments</comments>
		<pubDate>Thu, 09 Feb 2012 01:17:05 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[CDN]]></category>
		<category><![CDATA[proxy_cache]]></category>
		<category><![CDATA[反向代理]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=2084</guid>
		<description><![CDATA[碰到问题： 移动用户访问web服务器www.osyunwei.com很慢 解决办法： 1、在移动机房放置一台nginx反向代理服务器 2、通过域名DNS智能解析，所有移动用户访问www.osyunwei.com时解析到nginx反向代理服务器 3、nginx反向代理服务器与web服务器之间采用专线连接 系统运维  www.osyunwei.com  温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链接 说明： 1、web服务器 线路：电信 IP：192.168.21.129 域名：www.osyunwei.com 2、nginx反向代理服务器 线路：移动 系统：CentOS 6.2 IP：192.168.21.164 vi /etc/hosts   #编辑，在文件最后添加下面一行 192.168.21.129          www.osyunwei.com 3、客户端 线路：移动 系统：Windows 7 IP:192.168.21.130 C:\Windows\System32\drivers\etc\hosts   #用记事本打开，在文件最后添加下面一行 192.168.21.164          www.osyunwei.com ###################以下操作在nginx反向代理服务器上配置################### 1、关闭SELinux vi /etc/selinux/config #SELINUX=enforcing     #注释掉 #SELINUXTYPE=targeted  #注释掉 SELINUX=disabled  #增加 :wq  保存，关闭。 shutdown -r now重启系统 2、开启防火墙80端口 vi /etc/sysconfig/iptables 添加下面的内容 -A INPUT -m [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/2084.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/2084.html/feed</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>利用Squid反向代理搭建CDN缓存服务器加快Web访问速度</title>
		<link>https://www.osyunwei.com/archives/1165.html</link>
		<comments>https://www.osyunwei.com/archives/1165.html#comments</comments>
		<pubDate>Sat, 26 Nov 2011 15:12:36 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[CDN]]></category>
		<category><![CDATA[cdn缓存服务器]]></category>
		<category><![CDATA[squid]]></category>
		<category><![CDATA[squid反向代理]]></category>

		<guid isPermaLink="false">http://w66416.s75.chinaccnet.cn/?p=1165</guid>
		<description><![CDATA[案例： Web服务器：域名www.abc.com IP：192.168.21.129 电信单线路接入 访问用户：电信宽带用户、移动宽带用户 出现问题：电信用户打开www.abc.com正常，移动用户打开www.abc.com很慢，甚至打不开 解决方案：在移动机房放置一台CDN代理服务器，通过智能DNS解析，让电信用户直接访问Web服务器、让移动用户访问CDN代理服务器，解决移动用户访问Web服务器慢的问题 具体操作： CDN代理服务器： 系统：CentOS 5.5 主机名：cdn.abc.com IP:192.168.21.160 安装Squid软件，配置反向代理搭建CDN缓存服务器 安装前准备： 1、关闭SELinux    vi /etc/selinux/config    #SELINUX=enforcing     #注释掉    #SELINUXTYPE=targeted  #注释掉    SELINUX=disabled  #增加    :wq  保存，关闭。    shutdown -r now重启系统 2、开启防火墙80端口（后面配置squid的端口为80）    vi /etc/sysconfig/iptables    添加下面的内容    -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/1165.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/1165.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
