• No results found

A Scheme for Implementing Load Balancing of Web Server

N/A
N/A
Protected

Academic year: 2021

Share "A Scheme for Implementing Load Balancing of Web Server"

Copied!
7
0
0

Loading.... (view fulltext now)

Full text

(1)

Journal of Information & Computational Science 7: 3 (2010) 759–765 Available at http://www.joics.com

A Scheme for Implementing Load Balancing of

Web Server

Jianwu Wu∗

School of Politics and Law and Public Administration, Hubei University, Wuhan 430062, China

Abstract

This paper analyzes the existing shortcomings of the current load balancing scheme of web serveran improved scheme of load balancing is proposed and putted into practice, the new scheme uses Java-based mobile agent systems to implement the load balancing of web server. The performance of this load balancing scheme is evaluated from two points of view: the whole response time and the file size. The results show that the scheme is an effective method to reduce the load or solve the problems caused by the continuously increasing load of web server.

Keywords: Monitor System; Mobile Agent System; Load Balancing; Web Server

1 Introduction

With the rapid development of internet and the rapid increase in the number of internet users, online information on various sites and information servers also emerge in endlessly. The through-put of many popular sites and important sites are increasing and the number of concurrent users are continuously increasing, the load of web server is more and more serious and lead to overload operation. This situation has accumulated to a certain extent, which will seriously affects the overall performance of web sites and can not provide users with timely, stable and accurate web services [1]. Therefore, it is very important to ensure that the load balancing of each web server. Load monitoring is an effective way to achieve load balancing.

Load monitoring system examines operating condition of web server systems, when a web server is overload, the system optimization is urgently started [2]. On the one hand, it restricts the number of users accessing web server and the data traffic of entering web server; on the another hand , it diverts the overload part of the web server into the other web server of the system to restore the load balancing of web server.

This paper presents a load monitoring system based Java mobile agents for web server. The sys-tem solves the the existing shortcomings of the current load monitoring syssys-tem based client/server mode, it is more effective for load monitoring of web server.

Corresponding author.

Email address: [email protected] (Jianwu Wu).

1548–7741/ Copyright c⃝ 2010 Binary Information Press

(2)

2 Load Balancing Scheme Based on Client/Server Model

The client/server model is a centralized load monitoring model .Using this model, load monitoring service program must be installed on each web server[3], the program is used to measure the load on each web server, load monitoring client program must be installed on a separate host. After the client program sends a request to the load monitoring service program on each web server, the service program returns the load information to the load monitor client. Throughout the process of communication, the client and the server must remain network connections.

The load monitoring system based on client/server model has the following shortcomings: (1) The implementation codes described the load monitoring service on the server is statically

bounded with the codes described the process of requesting load monitoring service in the client-side[4]. Once the monitoring strategy itself needs to be improved, it would be a labo-rious work for web system to replace all the code, that is, the client/server model can not dynamically change the monitoring strategies.

(2) The message exchange between the server and the client occupies a large number of network bandwidth , when the network load is heavy, the operation of load monitoring would increase the busy level of the network[5]. At the same time, the server and the client must remain the network connections, which makes that the web server can not respond flexibly to the change in the environment .

3 Load Balancing Scheme Based on Mobile Agent Model

Mobile agent is a new type of distributed computing model. In this mode , data can also be processed when the network connection is not reliable, this is the advantages which the traditional distributed mechanism does not have , the model has also the advantages of better robustness of the network and equipment, great flexibility and good upgrade-ability and extensibility[6].

3.1 Mobile Agent System Based on Java

Java-based mobile agent systems (JMA) is a software entity which can migrate freely between each node in the network[7]. Fig. 1 shows the structural model of JMA . When JMA migrates from the source node to the destination node, it transfers itself status information and code to the destination node. Here, state information refers to the property values of the task that will soon be implemented , the code refers to the Java class code which the JMA requires . It may implement the data resource sharing by a communication model between JMA. After the task ends, JMA can return the node where created it , JMA can also self-destruct at the current node where the task ends.

Distinguish from the client/server model of section 2, it is not necessary for JMA to send a request to the other systems beforehand and then wait for a response.Through migrating freely between the nodes in the network, it collects data and uses resources, thus, the execution efficiency is greatly improved. Only when the JMA need to migrate between nodes is a network connection established.

(3)

J. Wu /Journal of Information & Computational Science 7: 3 (2010) 759–765 761

network

host A host B

Java virtual machine Java virtual machine security layer security layer mobile agent server mobile agent server

JMA JMA

JMA JMA

Fig. 1: Structural model of JMA

(1) Reducing the network load: A large number of interaction between the various systems increases network traffic in a distributed system environment, while only small amounts of data is needed to transfer by using mobile agent technology .

(2) Encapsulating protocol: When the data are exchanged in a distributed system, each host has its own network protocol, the protocol will encode outgoing data and explain incoming data[8]. In order to meet the requirement of the efficiency and safety, the protocol is often needed to improve, but upgrading the code which implement the protocol is almost impossible or very difficult, so it will have a legacy protocol. The mobile agent can directly move to the remote host to establish a data transmission channel based on private procedures.

(3) Reducing the network delay time: There is more or less delay time for the cross-network real-time processing system[9], while the mobile agent can directly implement the task that manager requirements by migrating itself.

3.2 The System Diagram

Fig. 2 shows the block diagram of whole load monitoring system. It can be seen that the whole system is composed of the web server being monitored and load monitoring server. Each server contains a mobile agent server(MAS). MAS is the important component of load monitoring systemand it is available execution environment on the host as well as the important management functions of the mobile agent system .

(4)

762 J. Wu /Journal of Information & Computational Science 7: 3 (2010) 759–765

users with graphical user interface (GUI) and collects the load information of various web server

to display to the user. ˈ

load monitoring server MAS

MA

web server 1 MAS log file

web server 2 MAS log file

web server n MAS log file

……

SA SA

SA send load information

-- create master mobile agent -- create slave mobile agent -- collect load information

-- provide GUI --receive slave mobile agent --server load monitoring --return load information --migrate slave mobile agent SA

Fig.2: Web server’s block diagram of load monitoring system based on JMA

3.3 The Java Class Used in the System

The whole load monitoring system achieves the following three Java classes:

(1) View class: The MA provides the GUI function to users by view class and displays the web server’s load information collected from SA to the user.

(2) Migration routes class : The migration routes class contains the address of web server being monitored . Once the MA created the SA, then the SA migrates to the next web server according to the address provided by migration routes class . When the target web server breaks down, the migration routes class also provides the function of the SA migrating to other web server.

(5)

J. Wu /Journal of Information & Computational Science 7: 3 (2010) 759–765 763

M A S A

create p eriodicly

m i gra tion

load m onitorin g

sen d load info rm a tion m igra tion rou tes

m onito rin g c lass

view clas s

addre ss inform ation

disp lay lo ad inform ation

˗ ˗ ˗ ˗ ˗ ˗ ˖ ˈ ˈ

Fig. 3: The application of Java classes in the load monitoring system

4 The System Performance Evaluation

We first introduce the parameters of reflecting the load monitoring system before introducing the performance standard of it. The load generally refers to the number of the tasks which have not yet completed or the usage rate of resource assigned to an object in a moment[10], it can be determined by the following parameters: (1) the number of tasks running in the queue, that is, the number of the load on a node; (2) the time percentage of CPU idle time; (3) the ratio of available memory; (4) the average load within recently time t; (5) the average transmission rate of network communication. In order to more accurately reflect the load, it often needed to collect more parameters, however, this method is often invalid for performance improvement because of increased overhead. For example, we perform boolean operation AND or OR for the two of six parameters , the average response time is longer than using a single parameter.

4.1 Total Response Time Evaluation

One of the important standard measuring the performance of load monitoring system of web server is the total system response time. The total response time of the load monitoring system depends primarily on the following aspects: load monitoring server and web server’s CPU speed and memory capacity, network bandwidth and message type of web system, etc. The total response time of the load monitoring system presented in this paper can be approximately expressed as:

𝐾𝜏 = 𝑡𝑚+ 𝑡𝑎+ 𝑡𝑑.

In which 𝑡𝑚 is the execution time of the load monitoring operation on the load monitoring

server, 𝑡𝑎 is the time consumed by the JMA completing the specific monitoring task in a web

server, 𝑡𝑑 is the network delay time.

Fig. 4(a) shows the time consumed by the traditional client/server model implementing load monitoring system, Fig. 4(b) shows the time consumed by the JMA implementing load monitoring system. In which 𝑡𝑚1is the delay time of load monitoring server to the web server, 𝑡1𝑚is the delay

(6)

SA sends to MA only increase very little network traffic (comparing to the network traffic which the SA itself increase during migration), therefore, the part of the delay time may be ignored in the response time evaluation.

ˈ 1 m t 2m

t

2 m

t

load monitoring server

web server 1 web server 2 web server N 1 m

t

1m t 1 mn

t

1 nm

t

(a)

load monitoring server

web server 1 web server 2 web server N 1 nm t (b) 12 t ˈ ˖ ˈ ˈ ˈ # ˖ ˈ ˖ ˈ ˈ

Fig. 4: The required time for implementing the load monitoring system in two ways

For the web system containing N web servers, using client/server model to implement load monitoring is needed to create N times request, however, using the JMA model to implement load monitoring is only needed to create a time request, so the time consumed by the load monitoring server itself is respectively:

𝑇𝑚𝑐= 𝑁 ⋅ 𝑡𝑚.

𝑇𝑚𝑗 = 𝑡𝑚.

In addition, assuming that the delay time of data transmission between each node is the same (namely, assuming 𝑡𝑚1=𝑡𝑚2=𝑡𝑚𝑛=⋅ ⋅ ⋅=𝑡12=𝑡23=⋅ ⋅ ⋅=t ), then the total network delay time of using

of client/server model is 𝑇𝑑 = 2𝑁 ⋅ 𝑡, however, the total network delay time of JMA model is

(𝑁 + 1) ⋅ 𝑡, then 𝑇𝜏 in two situations is respectively:

𝑇𝜏𝑐= 2𝑁 ⋅ 𝑡 + 𝑁 ⋅ 𝑡𝑚+ 𝑁 ⋅ 𝑡𝑎.

𝑇𝜏𝑗 = (𝑁 + 1) ⋅ 𝑡 + 𝑡𝑚+ 𝑁 ⋅ 𝑡𝑎.

It can be seen, when the number of web sites being monitored is increased, the total response time of web server’s load monitoring system using JMA model is significantly lower than using the traditional client/server model.

4.2 The Monitoring File Size

(7)

J. Wu /Journal of Information & Computational Science 7: 3 (2010) 759–765 765 the whole load monitoring process only loads is 15.1KB; after the monitoring mission is finished, it just destroys the class code whose size is 15.1KB. Therefore, the efficient of the web server’s load monitoring system based on JMA is far more higher than the load monitoring system of client/server model. When the SA migrates to the first web server, it is needed to load all the code whose size is 15.1KB. Every time the SA migrates, it simply transfers the SA program whose size is 5.5KB, thus , the network traffic is greatly reduced.

5 Conclusion

Load balancing is the key part of the load monitoring system of web server, the use of process migration mechanisms can improve the dynamics of load balancing and the throughput. The web server’s load monitoring system based on Java has solved the defects in the load monitoring system of client/server model. Through the use of JMA, the flexibility and reconfigurability of load monitoring is improved and it has better environment adaptability and practical and research value. Next, we will make further research on the safety of the whole load monitoring systemwhich mainly deals with the authentication of mobile agent’s legitimacy , protecting the data carried by the mobile agent , anonymous signature issues , preventing certain malicious attack and illegal modifying of the MAS and so on.

References

[1] X. Zhang, Research on load balancing of the web server, Journal of University of Electronic Science and Technology of China, May 2005

[2] Y. Cheng, The study and realization of server monitor system, Journal of Huazhong University of Science and Technology, November 2005

[3] Z. Q. Li, A load monitoring system of PC cluster, Microcomputer and Its Applications, August 2003

[4] R. Y. Fei, Monitoring system of enterprise ethernet based on C/S, Journal of Beijing University of Technology, June 2004

[5] X. Qin, Load balancing support for I/O-intensive parallel jobs in a cluster of workstations[C], Proceedings of IEEE International Conference on Cluster Computing, Hong Kong, 2006, pp. 100-107

[6] C. C. Hui, Improved strategies for dynamic load balancing[J], IEEE Concurrency, 2004, pp. 58-67 [7] H. Y. Huang, Solution to problem of malicious agents of Java based mobile agent systems,

Com-puter Engineering and Design, March 2004

[8] T. Hu, Research and design on security architecture of mobile agent system based on Java, Journal of Najing University of Posts and Telecommunications , March 2005

[9] Z. Y. LiuHu, Effective dynamic load balancing method, Journal of Software, December 2005, pp. 564-569

References

Related documents

- Preschool access statewide has not increased substantially and will not without a major state-level policy change. While preschool demonstration programs in Packard

El interés por este tema surgió en trabajos previos, donde pudimos observar que la jerarquía de la Iglesia jugó un rol protagónico en esa discusión y que principios de onda

Important to made the canadian immigration policy the united kingdom of immigrants and if an economic integration of canadians have suffered the states.. Probe the immigration

That is, the sDscam protein diversity is generated in a similar fashion of clustered Pcdhs – promoter choice of alternate isoforms from a gene cluster, rather than by

A defined method of construction Business reporting does not affect stock prices in the same manner as earnings announcements and similar financial information because

Planned launches may be delayed or not occur as a result of adverse regulatory decisions or other factors.. 2016: Key planned

The plasma total ( Fig. 1b ) ghrelin levels of the diabetic rats increased signi¢cantly (total ghrelin, P 6 0.01; active ghrelin, P 6 0.05), compared with those of the control rats.

13 Bencomo Barrios (1997).. pay outstanding international debts—culminating in the 1902 blockade and bombardment of Venezuelan ports by Great Britain and Germany—pushed the elite to