Zeus的集群配置

Zeus的集群配置
source:[url]http://www.31896.net/thread-8339-1-1.html[/url]
Zeus Web Server功能比较强大地方之一是直接支持负载均衡,并且对后端服务器有检测监控功能,在这点上,虽然nginx也支持负载均衡,可是不具备对后端服务器的检测监测功能,而高端的流量控制设备, 比如硬件负载均衡设备F5 BIGIP,Radware等在这方面更是发挥到极致,但是价格昂贵,大企业用的多,一般中小企业应用也用不着,而zeus webserver根据官方权威测试,用ZWS搭建集群,可以支持几万并发访问量,对于中小企业级互联网应用绰绰有余,而且能节省不少成本,何乐而不为!
       废话不说了,下面介绍本人利用Zeus Web Server 搭建负载均衡的一点经验,仅供参考!
      Zws集群系统,有管理主机administrator host和后端真实主机realserver组成,相互之间通过TCP/IP协议通讯,当然,管理主机也可以作为RealServer来使用,通过ZWS提供的RR轮训算法,将客户端请求均衡的分发到后端服务器,而且利用HA搭配ZWS就可以搭建高可用web服务器集群方案,如下图示

       Zeus在我用过所有web服务器中,各种配置都是最人性化的,这点,大概就是商业产品和非商业产品之间一个重要区别吧。
进入管理主机节点的“Cluster Configuration”页面,就可以开始进行傻瓜式集群配置工作了。
       在这以前,到其他真实主机安装好ZWS,然后运行$ZEUSHOME/web/bin/registerwithadminserver脚本,到管理主机节点进行注册,这样管理主机节点才可以监控这台主机状况。

命令
  • [root@askwan bin]# .$ZEUSHOME/web/bin/registerwithadminserver


代码
  • This program registers this back-end web server with an
  • Administration Server (Zeus User Interface)
  • You will need to know the hostname and port of your
  • administration server, together with the password used
  • to access the User Interface.
  • Note: this program will (re)start your web server . this machine.
  • Administration Server Hostname: admin.askwan.com
  • Administration Server Port     [9090]:
  • Administration Server Password: 此处输入管理主机节点管理密码
  • This Web Server has now been successfully registered with the
  • specified Zeus Administration Server.
  • It will now be visible in the Administration Server
  • User Interface (on the Machines Configuration page)
  • as askwan:9080.
  • Registration with admin.askwan.com:9090 was successful.
  • Now restarting this server...
  • basename: too few arguments
  • Try `basename --help' for more information.
  • Zeus Web Server stopped
  • Zeus Web Server - (C) 1995 - 2004 Zeus Technology Limited
  • Version 4.3, Build date: Jun 13 2004 18:37:34
  • Process permissions set to nobody:nobody
  • INFO:sendfile: Linux sendfile driver
  • INFO:2nd level shared-memory SSL cache enabled
  • INFO:Zeus Web Server started
  • INFO:Version 4.3, Build date: Jun 13 2004 18:37:34   #p#分页标题#e#
  • INFO:Zeus Web Server running
  • Zeus Web Server restarted.


注册完毕后,在管理主机节点配置,“Adding a Web Server to the Cluster”

Machine name 填写真实主机名称
Port 默认9080

然后依次添加其他
配置页面以图形方式现实集群中机器的状态,如下图,左边两台主机正常,右边主机表示不正常,请求也就不会转发到这台主机。

流量监控则可以详细比较后端服务器流量变化


无论如何,本人还是觉得zws对于中小企业级web应用来说,是一个不错的选择!

你可能感兴趣的:(职场,休闲)