博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Using Half-NAT Mode Load Balancer In Solaris 11
阅读量:6417 次
发布时间:2019-06-23

本文共 4357 字,大约阅读时间需要 14 分钟。

Integrated Load Balancer (ILB),a feature of Oracle Solaris,provides Layer 3 and Layer 4 load-balancing capabilities for Oracle Solaris installed on SPARC and x86 based systems.

The key features of ILB include:

1.Support for stateless Direct Server Return (DSR) and Network Address Translation (NAT) modes of operation for IPv4 and IPv6.
2.Allows ILB administration through a command-line interface (CLI).
3.Provides server monitoring capabilities through health checks.

This article just show you how to create Half-NAT Load-Balancing mode with zones.The following figure shows the implementation of ILB using the Half-NAT topology.

I created three Zones with four VNICs on global zone (node01),the 192.168.1.0 subnet's default gateway is 192.168.1.1.The 192.168.0.11 is a gateway of both tomcat servers.

Half-NAT Load-Balancing.

I have finished to create VNICs、zones and installation zones,the following figtures show the configuration about them.

VNICs information:

ILB Zone:

Server1 Zone:

Server2 Zone:

Node01 (Global Zone)

If you want to communite with each zones from  global zone,you must use route command with –p option to add a persistent route,here follows my instance:

Network Configuration

ilb  zone:

server1 zone:

server2 zone:

Installing tomcat in each of tomcat servers:

After installation,you can access tomcat by the web browser from global zone or non-global zone!

Configure Load Balancing

ILB has two portions, the kernel and the userland. The kernel portion is automatically installed as a part of the Oracle Solaris 11 installation. But to get the userland portion of ILB, the user has to manually install the ilb present at service/network/load-balancer/ilb package.After installation,you can use ilbadm command to configure it.

1.Enable ilb service:

Installing ilb package on ilb zone:

Before you enable ilb servie,make sure that the system's Role Based Access Control(RBAC) attribute files have following entries(if the entries are not there, add them manually):

Enable the appropriate forwarding service either IPv4 or IPv6 or both of them.

2.Configuration:

I need to tell the outside world that packets destined for VIP:192.168.1.12, should be sent to vnic0.Do following steps:

Now,you can use above VIP to access tomcat from outside.

You can use following scripts to check which server was served?Save   to the /var/tomcat6/webapps/examples/jsp/snp directory in each of tomcat servers.

Health Checks

ILB provides the following optional types of server health checks for the user to select from:

1.Built-in ping probes
2.Built-in TCP probes
3.Built-inUDP probes
4.User-supplied tests that can run as health checks

By default,ILB does not perform any health checks. You can specify health checks for each server group when creating a load-balancing rule. You can configure only one health check per load-balancing rule. As long as a virtual service is enabled, the health checks on the server group that is associated with the enabled virtual service start automatically and repeat periodically.The health checks stop as soon as the virtual service is disabled. The previous health check states are not preserved when the virtual service is re-enabled.

When you specify a TCP,UDP, or custom test probe for running a health check, ILB sends a ping probe, by default, to determine if the server is reachable before it sends the specified TCP,
UDP, or custom test probe to the server. The ping probe is a method of monitoring server health. If the ping probe fails, the corresponding server is disabled with the health check status
of unreachable. If the ping probe succeeds, but the TCP,UDP, or custom test probe fails, the server is disabled with the health check status of dead.

I created two health check:hc1 and hc2.I specify a TCP to hc1 and custom test probe for hc2.

After create a health check, you need to add it to your load balancing rule. Unfortunately, ilbadm doesn't have a command to modify an existing load balancing rule, so you have to delete it and create it again:

When you refresh your browser,you will be directed to server2.So your server1 get into dead status . You can also see the status as dead using ilbadm show-hc-result command:

That's all for NAT-Half mode load balance in solaris 11,for more information about it from .

Next,i'll show you how to create ILB High-Availability in solaris 11,please wait…………..

转载地址:http://tpsra.baihongyu.com/

你可能感兴趣的文章
JAVA做验证码图片(转自CSDN)
查看>>
Delphi TServerSocket,TClientSocket实现传送文件代码
查看>>
JS无聊之作
查看>>
Mac上搭建ELK
查看>>
443 Chapter7.Planning for High Availability in the Enterprise
查看>>
框架和语言的作用
查看>>
unidac连接ORACLE免装客户端驱动
查看>>
Cygwin + OpenSSH FOR Windows的安装配置
查看>>
咏南中间件支持手机客户端
查看>>
fastscript增加三方控件之二
查看>>
Windows Vista RTM 你准备好了么?
查看>>
Tensorflow Serving 模型部署和服务
查看>>
Java Web开发详解——XML+DTD+XML Schema+XSLT+Servlet 3.0+JSP 2.2深入剖析与实例应用
查看>>
topcoder srm 680 div1 -3
查看>>
具体数学第二版第四章习题(1)
查看>>
高效前端优化工具--Fiddler入门教程
查看>>
【翻译】我钟爱的HTML5和CSS3在线工具
查看>>
Java多线程学习(吐血超详细总结)
查看>>
css3 变形
查看>>
Win7 64bit 安装Mysql5 出错 无法启动服务。
查看>>