简介:
balance是一款负载均衡软件,通过对指定IP-Port列表的轮循, 实现对资源的更合理高效利用.
官方网站:http://www.inlab.de/balance.html
1. 下载:
到官网上下载最最新版, 目前是3.54.
wget -c http://www.inlab.de/balance-3.54.tar.gz
2.安装:
先解压下载包, 然后进入根目录, 执行安装命令, 安装命令见balance-3.54根目录下的readme文件.
tar zxvfp balance-3.54.tar.gz
cd balance-3.54
make
make install
这时有可能报错, 告诉你/usr/sbin/../man/man1这个目录找不到, 那么咱就自己手动建一下该目录, 为什么要建呢? 可
以参考balance-3.54根目录下的Makefile文件中的这段代码:
BINDIR=/usr/sbin
MANDIR=${BINDIR}/../man/man1
再重新make install 一下就OK了. 在命令行下敲balance回车, 就看到了漂漂的LOGO(在Javaeye下看着比较丑):
[root@localhost ~]# balance
_ _
| |__ __ _| | __ _ _ __ ___ ___
| '_ \ / _` | |/ _` | '_ \ / __/ _ \
| |_) | (_| | | (_| | | | | (_| __/
|_.__/ \__,_|_|\__,_|_| |_|\___\___|
this is balance 3.54
Copyright (c) 2000-2009,2010
by Inlab Software GmbH, Gruenwald, Germany.
All rights reserved.
3.用法:
参见balance-3.54根目录下的balance.pdf, 有详细的说明(不过都是英文的^_^), 也可以敲balance看命令提示:
usage:
balance [-b addr] [-B addr] [-t sec] [-T sec] [-adfpHM] \
port [h1[:p1[:maxc1]] [!%] [ ... hN[:pN[:maxcN]]]]
balance [-b addr] -i [-d] port
balance [-b addr] -c cmd [-d] port
-a enable channel autodisable option
-b host bind to specific address on listen
-B host bind to specific address for outgoing connections
-c cmd execute specified interactive command
-d debugging on
-f stay in foregound
-i interactive control
-H failover even if Hash Type is used
-M use MMAP instead of SHM for IPC
-p packetdump
-t sec specify connect timeout in seconds (default=5)
-T sec timeout (seconds) for select (0 => never) (default=0)
! separates channelgroups (declaring previous to be Round Robin)
% as !, but declaring previous group to be a Hash Type
examples:
balance smtp mailhost1:smtp mailhost2:25 mailhost3
balance -i smtp
balance -b 2001:DB8::1 80 10.1.1.1 10.1.1.2
balance -b 2001:DB8::1 80
4.应用场景:
应用处理分流:bonding驱动截获本机发送的ARP消息应答,并把源硬件地址改写为bond中某个slave的唯一硬件地址,从而使得不同的终端使用不同的硬件地址进行通信。这样就实现了负载均衡。当其中的一个slave 失败,就会由其他的slave来接管.
加密机授权: 如果管理员总是要给新来的开发同事添加IP授权, 无论是用客户端软件,还是跑机房, 都是很烦琐的事情, 如果起一个balance服务,就爽歪歪了:
[root@localhost ~]# balance 12345 192.168.6.12 8
这样只要新来的开发人员把加密服务的IP设成该机器的IP, 并使用端口12345, 就相当于连到目标加密机(即192.168.6.12)的IP了, 一次性搞定.
就这么随便写写吧, 欢迎探讨^_^.
分享到:
相关推荐
balance 使用说明 ,英文版本 很容易看懂哦
UCI机器学习知识库中的balance scale数据集
Laravel开发-balance Laravel余额
Oracle Load Balance解@老熊
life balance 用于个人管理,GTD方法
population balance model
palm上超级优秀的个人时间&生活管理软件,life balance的汉化版。 包括完整的中文帮助。 适用于palm os操作系统。
life balance palm gtd
The PePLink Balance series provides link aggregation and load balancing across up to seven WAN connections.
The Peplink balance series provides link aggregation and load balancing across up to seven Wan connections.
还为负载均衡的实施而烦恼吗?还为负责的配置而烦恼吗?balance为你轻松实现负载均衡。
New-Balance商标侵权案例分析.pdf
最新peplink英文使用者手冊.For Model 20/30/210/310/380/580/710/1350 描述清楚,易學易用.
3D Balance Ball平衡球项目,C#语言编写,很简单的应用,适合初学者玩玩
顶级刊物TNN上的最新论文分享,关于数据降维方面的文献。 [TNN2014]Scatter Balance_An Angle-Based Supervised Dimensionality Reduction
BALANCE CAR BASED ON STM32
用于处理VOF模拟水箱底部泵循环,处理泵出液体经...//this code is use for balance the mass rate between the outlet(velocity-inlet boundary in VOF model) and inlet(mass-flow inlet boundary in the VOF model);
用::安装点安装可选步骤创建虚拟环境用法输入数据格式复制包含的“ input.txt”文件编辑给定参数等号(“ =”)右侧的条目。 其中包含一个“ input.jpg”文件,以显示程序期望输入的格式。 请保留输入的顺序和格式...
PROJECTED BALANCE SHEET(表格模板、XLS格式).xls