• No results found

A Dynamic Load Balancing Algorithm For Web Applications

N/A
N/A
Protected

Academic year: 2021

Share "A Dynamic Load Balancing Algorithm For Web Applications"

Copied!
5
0
0

Loading.... (view fulltext now)

Full text

(1)

A Dynamic Load Balancing Algorithm For Web Applications

1

Sameena Naaz,

2

Mohamed Meftah Alrayes and

3

M. Afshar Alam

Department of Computer Science, Jamia Hamdard, Hamdard University New Delhi, India

1

[email protected],

2

[email protected] and

3

[email protected]

ABSTRACT

Rapid growth of internet use has resulted in network traffic congestion problem. Network load balancing is a one method to eliminate traffic congestion in the network as well as to improve the scalability and availability of Internet server programs, such as Web servers, proxy servers, DNS servers and FTP servers It actually distributes Web traffic among these different servers and also helps to increase the performance of the server by regulating the traffic to conform to the service rate. There are many algorithms being used for network load balancing such as round robin and random. A new dynamic load balancing algorithm has been proposed in this paper. This algorithm is concerned with distributing the incoming requests between the servers in fair and dynamic way. LBQ (Load Balancing Queue) is a parameter that is used to decide how many jobs will be stored in the network load balancer to be distributed in the next stage and LBD (Load Distributed) is the parameter that is used to decide how many jobs will be distributed among the servers at every stage., so that no server has more load than other. The performance of each server depends on the capability to serve the requests when ever the request is coming from the clients.

KEYWORDS

Load balancing, load balancing queue, load distribution, server utilization.

1. INTRODUCTION

As Internet connectivity becomes a commodity, large enterprises increasingly want high levels of performance and reliability guarantees for their performance sensitive traffic (such as voice, multimedia, online financial trading or Electronic Commerce). Increasingly, new applications are being deployed on the Internet; some new applications such as peer-to-peer (P2P) file sharing and online gaming are becoming popular. With the evolution of Internet traffic, both in terms of number and type of applications a current challenge facing many network administrators is how to make their TCP/IP applications scalable and keep them available for users. In today's marketplace, it is very important that web applications, telnet servers and batch file transfers are up and running at full capacity. Accurate classification of Internet traffic is important in many areas such as network design, network management, and network security. One key challenge in this area is to adapt to the dynamic nature of Internet traffic, the improvements will not be enough to solve the problem because transmission speeds are expected to grow faster [1]. Consequently, architectural advances are needed to scale the

performance to the required speeds. Historically, as the traffic increases, and as applications are going more and more complex, system administrators encounter a common bottleneck and a single server simply can't handle the load. An obvious way to solve this issue is to use multiple hosts to serve the same content [2]. Communication services such as web server-farms, database systems and grid computing clusters, routinely employ multi- server systems to provide a range of services to their customers. There are situations where some sites are heavily loaded and others are lightly loaded or idle. This results in poor overall system performance [3]. Therefore an important issue in such systems is to determine the server to which an incoming request should be routed to in order to optimize a given performance criterion. Load balancing is used in such multi-server systems in order to keep the server utilization as high as possible. Many load balancing mechanisms have been developed, and many approaches for classifying these methods also were introduced. Network load balancing forms the bridge between multiple units handling the same service and incoming request streams. It offers ease of administration and improved load distribution as well as high availability and failure recovery options.

Load balancing of servers can be implemented in different ways. There are various algorithms used to distribute the load among the available servers. These include random allocation, round robin allocation and weighted round robin allocation [4].

2. DESCRIPTION OF ALGORITHM

A new algorithm for network load balancing has been proposed in this paper. This algorithm is based on how to distribute the traffic among the servers in fair way regardless of the network traffic, and how much the servers can serve in unit time. The proposed algorithm is concerned with checking the traffic, aggregating it and distributing the requested jobs between the servers by the network load balancer. The proposed algorithm is divided into three parts.

A. Traffic Arrival

The processes are the job or services which the server has to serve. The frequency at which the traffic arrives as well as the size of the traffic (i.e. number of requests) is not fixed. The incoming traffic is attached with the processes. It has been assumed that all the traffic has the same attribute and so all the processes also have the same attribute.

B. Distribution of Traffic

All the jobs (i.e. traffic) are passed to network load balancer for distribution to different servers, but not all the jobs will be immediately assigned to the servers. In some situation there are

(2)

some jobs that are stored in the network load balancer and will be distributed to the servers later. In this algorithm there are two parameters that play important role in distribution of jobs. These parameters are:

LBQ (Load Balancing Queue)

The LBQ is the parameter that is used to decide how many jobs will be stored in the network load balancer to be distributed in the next stage. The value of LBQ is calculated through the formula:

LBQ = (LBQ+NUMBER OF JOBS) %NUMBER OF SERVERS.

LBD (Load Distributed)

The LBD is the parameter that is used to decide how many jobs will be distributed among the servers at every stage. The value of LBD is calculated through the formula:

LBD = (LBQ+NUMBER OF JOBS) /NUMBER OF SERVERS.

C. Traffic Served

After the calculation of LBD and LBQ the traffic amount that is calculated from LBD is distributed among the servers. Each server will serve the requested traffic according to the number of jobs it can serve per unit of time. After this time the remainder jobs will be sent back to the network load balancer and will be added to the LBQ. By the end of the serve the number of stages is incremented by 1 and the number of serve for each server is incremented by 1. The formula for calculating the utilization is:

Utilization of server= number of serves /number of stages.

Fig 1. Block diagram of the proposed algorithm

3. STEPS OF THE ALGORITHM

The different steps involved in the algorithm are:

Step1: Enter the number of processes, arrival time of each process and the number of jobs for each process.

Step 2: Specify the number of servers and the number of jobs they can serve per unit time. Initialize LBQ = 0, LBD = 0 and clock = 0.

Step3. Repeat steps 4 to 6 till clock is less than 1000. Step4. If clock = arrival time

(i) LBQ = (LBQ + Number of Jobs) %Number of Servers. (ii) LBD = (LBQ + Number of Jobs) /Number of Servers. (iii) Distribute the LBD values among the servers. After one unit of time the remaining job at the servers is sent back to the LBQ. Else go to step 5.

Step5. Check LBQ and distribute the available jobs to the servers.

Step6. Serve for each server = Serve for each server + 1. No. of stages = No. of stages + 1.

Step7. Utilization of server= number of serves /number of stages.

4. FLOWCHART OF PROPOSED ALGORITHM

The flowchart for the dynamic load balancing algorithm has been shown in fig. 2

Fig 2. Flow chart for the proposed algorithm 5. EXPERIMENTAL EVALUATION

In t his project C#.net 2005 has been used for implementing the proposed algorithm. The algorithm has been checked for a number of inputs and results of five of them are shown here. Different values of the parameters have been taken to see the effect of each parameter on the algorithm

Experiment 1

In this experiment the utilization of each server has been investigated by fixing the number of the jobs that each server can serve per unit of time and changing the number of jobs of each process. We considered the arrival time for each process as given in table 1 with a time difference of 10 units

(3)

Table1: Arrival Time of processes

We noted that as the number of jobs increases the utilization of each server also increases proportionally. Because Server 3 can serve maximum number of the jobs per unit time so server 3 has best utilization.

The number of jobs that can be served by each server per unit time is given in table 2.

Table2: Number of jobs served by each server

Table 3 shows the results of the experiment as utilization of different servers with changing load. The same result is also

shown in the graphical form in Fig. 3. Fig.3:.The relation between utilization of each server and number of jobs

Table3. Utilization of different servers as the number of jobs Varies

Experiment 2

In this experiment we investigated the utilization of each server when the processes are arriving at a constant time difference of one unit as shown in table 4

Table4: Arrival Time of processes

Fig 4: The relation between utilization of each server and number of jobs

The number of jobs that can be served by each server per unit

time is given in table 5. Experiment 3

In this experiment we have considered that all the servers are at par and hence can serve equal number of jobs per unit of time. We have taken this value to be equal to 2 jobs per unit time and have also taken the arrival times of different processes as 10, 11 and 12 respectively Again we note that the utilization increases with the increase in the number of jobs. In this experiment, as all the servers can serve same number of jobs per unit time so they all have same utilization.

Table5: Number of jobs served by each server

We again note that the utilization increases in proportion to the number of jobs served. Because Server 3 can serve maximum number of the jobs per unit time so server 3 has best utilization

(4)

Fig 5: The relation between utilization of each server and number of jobs

Experiment 4

In this experiment we investigated the utilization of each server by fixing the number of jobs for each process and changing the number of the jobs that each serve can serve per unit time. We consider the arrival time for each process and the number of jobs in each process as follows

Arrival time for process 1 =10 Arrival time for process 2=11 Arrival time for process 3=12 Number of jobs in process 1=52

Number of jobs in process 2=209 Number of jobs in process 3=159

We noted that the utilization is again proportionally increasing with the increase in the number of jobs.

Fig 6: The relation between utilization of each server and no. of jobs each server can serve.

Table 6: Relationship between the number of jobs that a server can serve per unit time and the utilization.

Experiment 5

In this experiment we investigated the number of stages in which the load balancer in able to complete the total distribution and execution of processes when the number of jobs for each process is fixed and the serving capacity of each server changes. The arrival time of the processes were considered as follows

Arrival time for process 1 =10 Arrival time for process 2=11

Arrival time for process 3=12 Number of jobs in process 1=52 Number of jobs in process 2=209 Number of jobs in process 3=159

We noted that the relation between the number of jobs each server can serve per unit time and the number of stages is inversely proportional

Fig. 7: The relation between number of jobs each server can serve per unit time and number of stages

(5)

Continued from Page No. 176

Table 7: Results obtained from experiment number 5. No No of jobs can be serve

per unit of time For each server Stages 1 2 70 2 3 47 3 4 35 4 5 28 5 6 24 6 7 20 7 8 18 8 9 16 9 10 14 10 11 13 6. CONCLUSION

In this paper we have discussed a new algorithm of load balancing. Preliminary results show that this algorithm has the potential to significantly improve fairness of load balancing between the servers when ever the traffic is coming. The capacity of the server is of major importance in the serving of traffic request. The fairness is very important to increase the performance of the system as well as it gives out all the clients request in shortest time and help the system to be scalable.

7.0 REFERENCES

[1]. K. G. Coffman ,A. M. Odlyzko: Internet growth: Is there a “Moore’s Law” for data Traffic ,AT&T Labs – Research, Revised version, June 4, 2001.

[2]. Eitan Altman, Urtzi Ayesta and Balakrishna Prabhu, “Load Balancing in Processor Sharing Systems” Proceedings of the 3rd International Conference on Performance Evaluation Methodologies and Tools, October 20-24, 2008, Athens, Greece.

[3]. M. Livny and M. Melman, “Load balancing in homogeneous broadcast distributed systems,” in Proc. Conj Performance, ACM, 1982, pp.47-55.

[4]. http://content.websitegear.com/article/ load_balance_types. htm

References

Related documents

Class K Shares of the Fund are available only to (i) employer-sponsored retirement plans (not including SEP IRAs, SIMPLE IRAs and SARSEPs) (“Employer-Sponsored Retirement Plans”),

Trigonometric ratio for certain shapes and questions on polygons to determine the fenced in the appropriate formula for primary school students must contact the find the perimeter

Undergraduate students participating in the Sea Education Association's SEA Semester program will join professional oceanographers aboard a scientific research vessel this

The research suggests that Mars is not a terrestrial planet like Earth, which grew to its full size over 50 to 100 million years via collisions with other small bodies in the

Vorbeck Materials of Jessup, Md., with the help of an NSF Small Business Innovation Research grant, is at the forefront of efforts to bring graphene technology to the

NSF-supported research team, led by Nathan Putman of Oregon State University, used data from more than 56 years of catches in salmon fisheries to identify the salmon's

The National Science Foundation (NSF) is an independent federal agency that supports fundamental research and education across all fields of science and engineering.

Take another problem evaluate fatigue following exercises the uc davis office shuffle two functions are the development of wrinkle to infinity each of limits must exist or..