Test of Linux load Balancing software LVS

Source: Internet
Author: User

First, start the LVS Cluster service

LVS load balance management and use there are two ways, one is to ipvsadm command line footsteps and Ldirectord monitoring mode, one is to Piranha tools for management and use. The following are described separately.

1, the use of ipvsadm command line footsteps and Ldirectord monitoring mode management LVS

After everything is configured, follow the steps below to start the LVS Cluster service.

First, start the services for each real server node:

[Root@localhost ~]#/etc/init.d/lvsrs start

Start LVS of Realserver

Then, start the Ldirectord service in Director server:

[Root@localhost ~]#/etc/init.d/ldirectord start

Starting Ldirectord [OK]

View the Ldirectord output log information at this time as follows:

LDIRECTORD|2561] Invoking Ldirectord invoked as:/usr/sbin/ldirectord start

LDIRECTORD|2561] Starting Linux Director v1.186 as Daemon

LDIRECTORD|2563] Added Virtual server:192.168.60.200:80

LDIRECTORD|2563] Added fallback server:127.0.0.1:80 (192.168.60.200:80) (Weight set to 1)

LDIRECTORD|2563] Added Real server:192.168.60.132:80 (192.168.60.200:80) (Weight set to 1)

LDIRECTORD|2563] Deleted fallback server:127.0.0.1:80 (192.168.60.200:80)

LDIRECTORD|2563] Added Real server:192.168.60.144:80 (192.168.60.200:80) (Weight set to 1)

As you can see from the log, Ldirectord first loaded the 80 port of a virtual IP, then loaded two real server nodes 80 ports and 80 ports on Director server native, and set the weights of real server two nodes to 1, Because all two nodes are available, the Director server Native 80 port is removed from the LVS routing table.

Next, start the LVSDR main service in Director server:

[Root@xa_web1 ~]#/ETC/INIT.D/LVSDR start

Start LVS of Directorserver

IP Virtual Server version 1.2.0 (size=4096)

Prot Localaddress:port Scheduler Flags

-> remoteaddress:port Forward Weight activeconn inactconn

TCP 192.168.60.200:http RR Persistent 600

-> 192.168.60.132:http Route 1 3 22

-> 192.168.60.144:http Route 1 9 22

So far, the LVS load Balancing cluster system has started to run.

2, the use of Piranha tools to manage LVS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.