# Research and Design of LVS Cluster Technology in Agricultural Environment Information Acquisition System

Guogang Zhao, Haiye Yu, Lianjun Yu, Guowei Wang, Yuanyuan Sui, Lei Zhang

<figure><img src="image_1.png" /></figure>

## To cite this version:

Guogang Zhao, Haiye Yu, Lianjun Yu, Guowei Wang, Yuanyuan Sui, et al., Research and Design of LVS Cluster Technology in Agricultural Environment Information Acquisition System. 9th International Conference on Computer and Computing Technologies in Agriculture (CCTA), Sep 2015, Beijing, China. pp.178-184, 10.1007/978-3-319-48354-2_19. hal-01614190

HAL Id: hal-01614190

https://inria.hal.science/hal-01614190

Submitted on 10 Oct 2017

HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Research and Design of LVS Cluster Technology in
Agricultural Environment Information Acquisition
System

Guogang Zhao<sup>1,2,a</sup>, Haiye Yu<sup>1,2,b,*</sup>, Yu Lianjun<sup>4,c</sup>, Guowei Wang<sup>1,2,3,d</sup>,
Yuanyuan Sui<sup>1,2,e</sup>, Lei Zhang<sup>1,2,f</sup>

<sup>1</sup>College of Biological and Agricultural Engineering, Jilin University, Changchun 130022, China;

<sup>2</sup>Key Laboratory of Bionic Engineering, Ministry of Education, Changchun 130022, China;

<sup>3</sup>School of Information Technology, Jilin Agricultural University, Changchun 130118, China;

<sup>4</sup>Changchun City Academy of Agricultural Sciences, Changchun 130111, China

<sup>a</sup>zhaoguogang2000@qq.com, <sup>b</sup>haiye@jlu.edu.cn, <sup>c</sup>120142901@qq.com,

<sup>d</sup>41422306@qq.com, <sup>e</sup>suiyuan0115@126.com, <sup>f</sup>z_lei@jlu.edu.cn

**Abstract.** With the development of agricultural informatization, agricultural environment information acquisition platform needs to collect more and more data. And with the increase of the number of data acquisition terminal, a large number of concurrent data traffic is generated on the server. This will lead to the phenomenon of excessive load which directly affects the validity of the data. Therefore, based on LVS technology, this paper designed a solution for the agricultural environment information acquisition platform. Through the experiment we know that the LVS technology can guarantee the validity of the data acquisition, which lays the foundation for the development of precision agriculture.

**Keywords:** Agricultural Information, IOT, Data Acquisition, LVS, Precision Agriculture

# 1 Introduction

The IOT is through the sensor technology, the acquisition of a variety of sensor information, through the network to connect with each other, information exchange and communication[1,2]. The application of the same thing in precision agriculture, making precision agriculture has been rapid development[3-5]. By the traditional manual collection of environmental information, and gradually turned to the IOT technology to gather information, Improve the degree of information. Accurate and effective crop environment information data, in the greenhouse plant cultivation, can effectively ensure that the crop is in the best growth state, to ensure the yield and quality of agricultural products[6-10].

With the popularity of the Internet, the IOT has been from the traditional mode of small scale, slowly into the Internet era. Agricultural environmental information collection mode based on the IOT is also a small range of environmental information collection, development into a large range, multi regional environmental information
collection[11-13]. Agricultural environmental information acquisition system needs to deal with the network connection number of times also into explosive growth, if the network connection can not be processed in time, will lead to a decline in the quality of the system, especially in the greenhouse of agricultural facilities, if it can't effectively ensure the normal and stable operation of greenhouse, the loss will be unable to estimate. Based on LVS technology, the load balance of the agricultural environment information acquisition system is realized, and the service quality of the system is ensured, which lays the foundation for the development of precision agriculture.

## 2 System structure

The system structure as shown in Figure 1, based on LVS technology to construct the agricultural environment information acquisition system can according to each cluster server load, will come from the network terminal request reasonable allocation to each server implementation, can effectively solve the problem of high load of multi terminal and Fayin. To ensure the validity of the data terminal.
<figure><img src="image_3.png" /><figcaption>Fig. 1. System structure</figcaption></figure>

## 3 Key technologies

### 3.1 Load balancing

Load balancing (Balance Load): load balancing is a dynamic balancing technology in the network. Through the analysis of the data packets in the network, the server can handle the task in a reasonable dynamic distribution. Can ensure the network structure
does not change, directly increase the network bandwidth and server, effectively improve the ability of processing data in the network, make the network flexibility and availability significantly improve the stability of the service operation[14,15].

## 3.2 Cluster profile

Cluster is usually the abbreviation of a system. This system is composed of many computers, as a whole, and provides services to the outside. At the same time, it can increase, modify or delete nodes in the cluster. Compared with the traditional single server, the cluster has the advantages of high stability, fast calculation speed and easy management[16,17].

## 3.3 LVS

LVS full name is Virtual Server Linux, which is sponsored by China's Linux programmer, Dr. Zhang Wensong (who is responsible for the development of the core software) and the free software project, which is based on Linux system. LVS is a cluster based on load balancing technology. In the LVS, there must be a master server, and more than 2 true Real-server. Master server according to the scheduling algorithm to control the server Real-server, Real- is responsible for providing services. The client only needs to communicate with an IP address provided by the cluster. The cluster is just a single server, and the structure of the cluster is not an invisible to the client[18].

Server Real- can provide a variety of common services such as FTP, DNS, Telnet, SMTP, etc. Master control server is responsible for the control of server Real-. When the client sends a service request to the LVS, the server is specified by a server Real- to receive a request from the client and respond to its request, for the client to communicate with a fixed IP.

## 3.4 Keepalived

Keepalived is a software that works like a switch. It can detect the status of the server. When the server appears to restart, the keepalived will remove the server from the existing system. When the server is back to normal, it will resume to the system.

# 4 LVS implementation
### 4.1 LVS working mode

LVS has three working modes, VS/NAT, VS/TUN, VS/DR. This paper chooses VS/TUN mode. The mode of the client to send the data packets, a two package, add a new destination IP address, and send it to the destination IP address corresponding to the real-server, it will be the results of the packet processing, directly returned to the client. The mode can effectively reduce the load of the pressure[19].

### 4.2 Firewall

In the network firewall usually refers to separate the internal network and external network and isolation, when two network for communication, according to certain rules, the communication of data conditional options, allowing data can freely in and out of the network, are not allowed to data, declined to its into the network, the maximum guarantee the safety of the network server. Linux operating system, also with a firewall, according to the different IP address and port to a certain degree of restriction. Because the system servers are used in the internal network, so close the Linux firewall can directly. The command:

service iptables stop

### 4.3 Yum

Yum (Yellow dog Updater, Modified), in Linux can from the specified server to download and install the RPM package, compared with traditional way of RPM installation, can automatic processing the RPM package dependencies, installed a can all depend on the package. The command :

yum -y install ipvsadm*

### 4.4 Configure load balancing controller, the command :

ifconfig eth0:1 202.198.16.188 netmast 255.255.255.255 up
ipvsadm -A -t 202.198.16.188:80 -s wrr -p 20
ipvsadm -a -t 202.198.16.188:80 -r 202.198.16.180:8080 -i -w 1
ipvsadm -a -t 202.198.16.188:80 -r 202.198.16.181:8080 -i -w 1

## 4.5 Real-Server, the command :

modinfo tun      # test tun in Linux
modprobe tun     #load tun
ifconfig tunl0 202.198.16.188 netmask 255.255.255.255
broadcast 202.198.16.188      #add tunl0
ifconfig tunl0 up   #start tunl0
route add -host 202.198.16.188 dev tunl0
echo "2" >/proc/sys/net/ipv4/conf/tunl0/arp_announce
echo "1" >/proc/sys/net/ipv4/conf/tunl0/arp_IGNORE
echo "1" >/proc/sys/net/ipv4/conf/all/arp_IGNORE
echo "2" >/proc/sys/net/ipv4/conf/all/arp_announce

## 5 TEST

The design goal of this paper is to realize the high load balance of agricultural environment information acquisition system. In the experiment, the client terminal is used to carry out concurrent access, and the data is sent to the server 500000, and the test data are as table 1.

<table><caption>Table 1. Test data results</caption><thead><tr><th rowspan="2"></th><th colspan="3">Common mode</th><th colspan="3">LVS mode</th></tr><tr><th>Valid data</th><th>Missing data</th><th>Loss rate‰</th><th>Valid data</th><th>Missing data</th><th>Loss rate‰</th></tr></thead><tbody><tr><td>1</td><td>495234</td><td>4766</td><td>9.53</td><td>498548</td><td>1452</td><td>2.90</td></tr><tr><td>2</td><td>494656</td><td>5344</td><td>10.68</td><td>498731</td><td>1269</td><td>2.53</td></tr><tr><td>3</td><td>494531</td><td>5469</td><td>10.93</td><td>497913</td><td>2087</td><td>4.17</td></tr><tr><td>4</td><td>492967</td><td>7033</td><td>14.06</td><td>498355</td><td>1645</td><td>3.29</td></tr><tr><td>5</td><td>494789</td><td>5211</td><td>10.42</td><td>498367</td><td>1633</td><td>3.26</td></tr></tbody></table>
<table><tr><td>6</td><td>494159</td><td>5841</td><td>11.68</td><td>498212</td><td>1788</td><td>3.57</td></tr><tr><td>Average</td><td>494389</td><td>5610</td><td>11.22</td><td>498354</td><td>1645</td><td>3.29</td></tr></table>

The test results show that the agricultural environment information acquisition system based on LVS technology can effectively improve the service capability, and improve the service quality, which lays the foundation for the development of precision agriculture.

## 6 Conclusions

With the development of precision agriculture, the wide application of the IOT technology, the agricultural environment information acquisition system needs to provide uninterrupted service for 7X24 hours. In this paper, the load balance of the agricultural environment information acquisition system is realized by using LVS technology, and the stable operation of the data acquisition system is effectively guaranteed.

## Acknowledgment

Funds for this research was provided by National 863 subjects (2012AA10A506-4, 2013AA103005-04), Jilin province science and technology development projects(20110217), China Postdoctoral Science Foundation the 54th surface funded(2013M541308), Jilin University Young Teachers Innovation Project (450060491471).

## References

1. HU Yong-Li, SUN Yan-Feng, YIN Bao-Cai. Information Sensing and Interaction Technology in Internet of Things[J]. Chinese Journal of Computers, 2012,36(6):1147-1163

2. LIU Qiang, CUI Li, CHEN Hai-ming. Key Technologies and Applications of Internet of Things[J]. Computer Science, 2010,37(6):1-4,10

3. YU Lei, LU Yang, ZHU Xiao-ling. Research advances on technology of Internet of things in medical domain[J]. Application Research of Computers, 2012,29(1):1-7

4. MA Xin, HUANG Quan-yi, SHU Xue-ming et al. Study on the Applications of Internet of Things in the Field of Public Safety[J]. China Safety Science Journal, 2010,20(7):170-176

5. Li Feng, Li Shuning. Study on the Development of Smart Libray Based on Internet of Things Technology[J]. Library and Information Service, 2013,3(5):66-70

6. Li Daoliang. Internet of Things and Wisdom Agriculture[J]. Agricultural Engineering, 2012,2(1):1-7
7. Zhu Huixia, Wang Fulin, Suo Ruixia. The Application of the Internet of Things in China Modern Agriculture[J]. Chinese Agricultural Science Bulletin, 2011,27(02):310-314

8. He Yong, Nie Pengcheng, Liu Fei. Advancement and Trend of Internet of Things in Agriculture and Sensing Instrument[J]. Transactions of the Chinese Society for Agricultural Machinery, 2013, 44(10):216-226

9. Yan Xiaojun, Wang Weirui, Liang Jianping. Application mode construction of internet of things (IOT) for facility agriculture in Beijing[J]. Transactions of the CSAE, 2012, 28(4): 149-154. (in Chinese with English abstract)

10. Liu Donghong, Zhou Jianwei, Mo Lingfei. Applications of Internet of Things in Food and Agri-food Areas[J]. Transactions of the Chinese Society for Agricultural Machinery, 2012,43(1):146-152 -

11. Liu Guanglin, Li Yongkui. Research on Differential GPS System of Agricultural Machinery Based on 3G[J]. Journal of Agricultural Mechanization Research, 2012.11:202-205

12. Sheng Ping, Guo Yangyang, Li Pingping. Intelligent Measurement and Control System of Facility Agriculture Base on Zigbee and 3G[J]. Transactions of the Chinese Society for Agricultural Machinery, 2012,43(12):229-233

13. Yang Chunyong, Niu Lei. Design and Implementation of ZigBee based Environmental Monitoring System for Facility Agriculture[J]. Journal of South- Central University for Nationalities(Nat. Sci. Edition) 2012,31(1):88-92

14. Zhou Yinglian, Liu Fu. Research on Load Balancing of Web-server System[J]. Computer&Digital Engineering, 2010,38(4):11-14,35

15. CHUBei-bei,LIUXiao-nan,LIUTie-ming. Load Balancing of System Level Application Systems[J]. Journal of Information Engineering University,2002,3(4):48-50

16. WANG Zhi-xiao, JIANG Xiu-zhu, ZHANG Chen. Application of cluster in Internet web server[J]. Computer Engineering and Design, 2004,25(3):472-474

17. DUAN Guo-Yun. Application of Cluster Technology to the Hospital Informationization System Integration[J]. Computer Systems & Applications, 2012,21(2):38-41

18. ZHENG Ling-xiang,LIUJun-yao,CHENHui-huang. Performance Evaluation and Implementation Analysis on LinuxVirtual Server[J]. Journal of Xiamen University(Natural Science), 2002,41(6):727-730