免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1088 | 回复: 0
打印 上一主题 下一主题

Keepalived+nginx实现高可用和负载均衡 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-12-20 09:48 |只看该作者 |倒序浏览

keepalived+nginx实现 HA与负载均衡中keepalived负责实现HA功能,控制VIP(虚拟网络地址)转移功能,nginx实现对realserver七层负载均衡功能,nginx提供代理服务和cache功能,DNS服务可以负责前段VIP的负载均衡。

keepalived的配置
192.168.200.1 keepalived配置
! Configuration File for keepalived

global_defs {
notification_email {
xxx@xxx.com
}
notification_email_from xxx@xxx.com
smtp_server 127.0.0.1
smtp_connect_timeout 30
router_id LVS_TEST_YDQ
}

vrrp_instance VI_1 {
state MASTER
interface eth0
virtual_router_id 61
priority 150
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
192.168.200.101/24 dev eth0 label eth0:0
}
}

vrrp_instance VI_2 {
state BACKUP
interface eth0
virtual_router_id 62
priority 100
advert_int 1
authentication {
auth_type PASS
auth_pass 2222
}
virtual_ipaddress {
192.168.200.102/24 dev eth0 label eth0:1
}
}


vrrp_instance VI_3 {
state BACKUP
interface eth0
virtual_router_id 63
priority 50
advert_int 1
authentication {
auth_type PASS
auth_pass 3333
}
virtual_ipaddress {
192.168.200.103/24 dev eth0 label eth0:1
}
}

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP