Feed on
Posts
Comments

來紀錄一下好了,其實這兩年前,我自己就試過了,當時在弄 web 系統 Load Balancing,因為找不到更好的方法,所以使用 Round Robin DNS Load Balancing 技術來達到這功能,可是當然這不是很準確的做到 load balance,只是能解決暫時性的問題,真正要做到 Load Balancing 可能要靠硬體的技術了。
我自己是在 FreeBSD 系統上面實做的,當然弄 Load Balancing 一定要在網卡上面綁定多重ip,Linux 作法跟 FreeBSD 不大相同
#
# Linux 作法
#
ifconfig eth0:0 inet xxx.xxx.xxx.xx(1~9) netmask 255.255.255.0 broadcast xxx.xxx.xxx.255
#
# FreeBSD 作法
#
# /etc/rc.conf - add a new IP address to the NIC
# 在 rc.conf 加入底下 entry
ifconfig_rl0_alias0="192.168.0.57 netmask 0xffffffff"
#
# 指令
#
ifconfig rl0 alias [...]

Read Full Post »