Dynamic DNS for load balancing - Distributed ... - Semantic Scholar

3 downloads 12400 Views 252KB Size Report
Dynamic DNS for Load Balancing (DDLB), embedded in. DNS (Domain Name Service) servers. By applying our algorithm into a simulation model with real data ...
Dynamic DNS for Load Balancing

Chi-Chung Cheung

Man-Ching Yuen

Angus C H Yip

Department of Computer Engineering and Information Technology, City University of Hong Kong [email protected]

[email protected]

Abstract In this paper, we propose a new algorithm, called Dynamic DNS for Load Balancing (DDLB), embedded in DNS (Domain Name Service) servers. By applying our algorithm into a simulation model with real data and comparing its performance with the original round-robin DNS setting, we found that around 40% of the incoming requests had shorter service time and almost no incoming requests got longer service time. We have also applied DDLB into a real system and we found that the improvement was up to 58% in the peak period. Our proposed algorithm not only works very well in a real system, but also has simple implementation such that the existing configuration can be easily modified to apply.

1. Introduction To maintain the efficiency and reliability of Internet services over distributed systems, there are two existing approaches: establish mirror sites on different location or use a Domain Name Service (DNS) server to resolve the hostname into service provider machines (SPMs). The former approach is usually implemented on download sites. It allows users to choose the nearest server to complete their requests in the shortest time but it has no intelligence in the system for load balancing and it is not user transparent. The latter one is used in general distributed systems because of its comparative load balancing and user transparency characteristics. Under this approach, when a client requests a service from a SPM, the DNS server resolves the hostname with one IP address from its SPM available list in the DNS hostname table. The policy is usually the round-robin algorithm or following a fixed shortlist for simplicity. This approach provides load sharing for Internet services but not for load balancing. Recently, load balancing has been widely discussed [1 − 5] but most of them concentrated on either the

[email protected]

methodology to implement load balancing algorithms in the Internet services [1, 2, 3, 4] or some complicated load balancing algorithms [5]. They seldom address on simple load balancing algorithms or the real implementation for Internet services. In this paper, we propose a simple dynamic load balancing algorithm called Dynamic DNS for Load Balancing (DDLB) embedded in DNS servers for Internet services. The idea is simple: when a client requests a service from the SPMs, the DNS server searches a relatively fast machine to serve the request and the decision is based on the current loading of the SPMs. We tested our algorithm in simulation with real data and found that 39% of the incoming requests need shorter service time and only 2% of the incoming requests need longer ones. We have also implemented our proposed algorithm in a real system: the proxy system of Lingnan University. We found that the average service time was reduced and the improvement was up to 58% in peak period. The organization of this paper is as follow: Section 2 describes the new proposed algorithm, Dynamic DNS for Load Balancing (DDLB). Section 3 discusses the implementation issues of DDLB. Section 4 introduces the proxy system of Lingnan University and the method of data collection. Section 5 presents the performance of DDLB and compares its performance with the round-robin algorithm, the most popular DNS setting for Internet services. Finally, we conclude our works and discuss the future works in Section 6.

2. Dynamic DNS for Load Balancing (DDLB) Every DNS server has a SPM available list. When a client requests a service, a DNS server resolves the hostname and replies the IP address of a machine from the list. The choice of the IP address follows the round-robin algorithm in BIND 8 (Berkeley Internet Nam Domain version 8) or the sequence of a fixed and assigned SPM available list in BIND 9. Our proposed algorithm is to modify the SPM available list by monitoring the current loading of SPMs to achieve dynamic load balancing. The

Proceedings of the 23 rd International Conference on Distributed Computing Systems Workshops (ICDCSW’03) 0-7695-1921-0/03 $17.00 © 2003 IEEE

advantages of this approach are not only the simple implementation (it will be addressed in the next section), but more important is that we do not need to modify the original architecture of DNS servers such that any existing DNS servers can be easily modified to apply our proposed algorithm. To monitor the current loading of the SPMs, we measure the average service time of each request in SPMs, which can be obtained by using Simple Network Management Protocol (SNMP). The detail of the implementation will be shown in the next section. Consider there are N active SPMs and T is the threshold of the average request service time. A flag Fi is assigned to ith SPM and the flag labels the state of the SPM. There are two states: SLOW and FAST. Initially all flags are assigned to be FAST. At the beginning of each measurement period, say t, we measure the average service time per request (ASTi, i = 1, 2, … , N) of each SPM and we modify the SPM available list at the end of the measurement period. If the average service time per request of a SPM is larger than T, we assign the status of the flag of the SPM to SLOW; otherwise, the status is assigned to FAST. After checking all flags, we put the SPMs with FAST flags to the SPM available list. All SPMs with SLOW flags will not serve new incoming requests in the next measurement period. Note that, at the end of each measurement period, we need to find out which machine is slow (i.e. its average service time per request is longer than the pre-defined threshold value) and reduce its workload by redirecting all incoming requests to other SPMs in the next measurement period.

3. Implementation Issues There are three implementation issues to handle. The first issue is to get the statistics from the DNS server. It can be accomplished by developing a daemon program written by C with SNMP (Simple Network Management Protocol) extended library. The daemon program is a data collector, which sends a SNMP GET command to a SPM and the SPM will reply its corresponding statistic data to the data collector. We use SNMP because of its simplicity and popularity. Note that the data collector can be executed periodically by using the scheduling commands on the DNS server. The second issue is to modify the SPM available list in a DNS server. We develop a C program which gets the statistic data from the data collector and generates a new SPM available list after executing our proposed algorithm. When the new list is available, it modifies the file which stores the SPM available list and sends a signal to ask DNS daemon to reload its configuration. The third issue is to determine the value of the threshold T. It is computationally impossible to determine the value of T because it is too difficult to develop a mathematical model for Internet services. For

simplicity, we get statistical data from a real system, and obtain the optimum threshold value by applying our algorithm in a simulation model with the real data. We find that the optimum threshold value works very well with our proposed algorithm in the simulation model and also the real system.

4. System Environment The system to investigate the performance of our proposed algorithm is the proxy system of Lingnan University. The system architecture is shown in Figure 1 and the configuration is listed in Table 1. There are 8 heterogeneous proxy servers to establish the hierarchical proxy architecture. The 5 front proxy servers (proxy 01 to proxy 05) share their cache contents and directly serve clients while the 3 back proxy servers (proxy1 to proxy3) provide large Internet cached contents to the 5 front proxy servers. Since only the 5 front proxy servers involve the loading of the system, we collect their performance statistics only and they will be considered in the SPM available list. To get the performance statistics, we collected the data from 9:00 a.m. to 2:00 a.m. each day and the measurement period was 5 minutes (i.e. t = 5 minutes). The first set of data (say set A) was collected from 20th November 2000 to 26 th November 2000, which was used for simulation, and the second set of data (say set B) was collected from 27th November 2000 to 3rd December 2000, which was used to investigate the performance of our proposed algorithm in the real system. In the first measurement period, we used the existing round-robin algorithm for DNS server while our proposed algorithm was used in the second measurement period. We choose these two weeks because the user demands in these two weeks were quite similar.

5. Performance Comparisons Figure 2 shows the simulation results of DDLB in the system with the real data from set A with different values of T. We find that there exists an optimal value of T, 115 ms. When T increases before reaching the optimal value, the total service time reduced (i.e. the difference between the old total service time and the new total service time) increases too and this implies the overall performance is improved by eliminating “slow” machines from the SPM available list. When T increases after reaching the optimal value, the improvement is lower than the optimal value because some “fast” machines are wrongly eliminated from the list. Also from the simulation, we found that 39% of the incoming requests have improved and only 2% of the incoming requests have longer service time than before. Figure 3 shows the improvement on the percentage of service time of 1435 data samples in the evaluation

Proceedings of the 23 rd International Conference on Distributed Computing Systems Workshops (ICDCSW’03) 0-7695-1921-0/03 $17.00 © 2003 IEEE

model. We found that large portions of samples have up to 40% improvement and the maximum improvement is 180%. We applied our proposed algorithm in the real system in the second week. After collecting the statistics, we found that the total number of the incoming requests in the second week was 5.53% larger than that in the first week but the total service time had effectively reduced by 7.83%. Moreover, the most significant improvement was found in the peak period. The peak period in each day is between 8:00 p.m. to 8:30 p.m. We noticed that the service time during the peak period in the first week is 179.32 ms and, after applying DDLB, the service time during the peak period in the second week was reduced to 75.80 ms, and thus the improvement was up to 57.73%. It is because, in non-peak period, the effect of eliminating “slow” machines from the SPM available list is not significant since the SPMs are powerful enough to handle all requests efficiently. However, when the loading is high, the service time can be significantly reduced by considering “fast” machines only.

6. Conclusions and Future Works This paper presented a new algorithm, called Dynamic DNS for Load Balancing (DDLB) embedded in DNS (Domain Name Service) servers. In both the simulation model and the real system, we found that our proposed algorithm had better performance than the original roundrobin DNS setting and the improvement was up to 57.73%. In the future, we will investigate how to apply artificial intelligent methods, such as fuzzy logic and neural networks, to determine the values of the threshold for different systems or build a more complicated model to determine which machine is fast or not.

[3] A. Bestavros, M. Crovella, J. Liu, and D. Martin, “Distributed Packet Rewriting and its Application to Scalable Web Server Architectures”, Proceedings of 6 th IEEE International Conference on Network Protocols, Austin, TX, page 290 – 297, October 1998. [4] H. Bryhni, E. Klovning, and O. Kure, “A Comparison of Load Balancing Techniques for Scalable Web Servers”, IEEE Network, vol. 14, page 58 – 64, July / August 2000. [5] B. A. Shirazi, A. R. Hurson, and K. M. Kavi, Scheduling and Load Balancing in Parallel and Distributed Systems, IEEE Computer Society Press, 1995.

Proxy 01

Send request

Proxy1

Proxy2

Proxy3

Proxy 02

Proxy 03

Proxy 04

Resolve server name

Proxy 05

DNS server

DDLB

Figure 1. System architecture

7. Acknowledgement We thank Mr. C. F. So for his assistance. We also thank Ms. Marie Yu for her proof-reading.

8. References [1] D. Andresen, T. Yang, V. Holmedahl, and O. H. Ibarra, “SWEB: Towards a Scalable World Wide Server on Multicomputers”, Proceedings of IEEE Parallel Processing Symposium, page 850 –856, 1996. [2] L. Aversa, A. Bestavros, “Load Balancing a Cluster of Web Servers Using Distributed Packet Rewriting”, Proceedings of IEEE Performance, Computing, and Communications Conference, page 24 – 29, 2000.

Proceedings of the 23 rd International Conference on Distributed Computing Systems Workshops (ICDCSW’03) 0-7695-1921-0/03 $17.00 © 2003 IEEE

Table 1. System configuration (G: grade, S: server, W: Workstation)

Proxy 2

IBM Netfinity S 5500 NCC

12G

W 21G

Proxy 3

IBM Netfinity S 5500

Proxy 01

Domain W 12G

Proxy 02 Proxy 03 Proxy 04 Proxy 05

Laser Tron

W

Dell Optiplex W GX110

12G

9G

P-III FreeBSD 512MB 500 × 3.4 2 1GB

P-III

FreeBSD 4.11

9500 9000 100

P-III FreeBSD 512MB 450 × 3.4 2

105

110

115

120

125

130

135

140

Threshold T / ms

512MB P-III

FreeBSD 3.4

Figure 2. Total service time reduced vs. threshold T

512MB

FreeBSD 3.4

250

P-II

8G

256MB P-III

FreeBSD 4.11

W 16G

512MB P-III

FreeBSD 3.4

Domain W 12G

512MB P-III

FreeBSD 3.4

PC

Total service time reduced

Proxy 1

Hardware Description Operating Hard System Type G disk Memory CPU

No. of measured records

Machine Name

14000 To 13500 tal 13000 Im pr 12500 ov ed 12000 Se 11500 rvi ce 11000 Ti 10500 me 10000

200

150

100

50

0 10%

40%

70%

100%

130%

160%

Percentage of Service Time Improvement

Figure 3. The distribution of the percentage improvement

Proceedings of the 23 rd International Conference on Distributed Computing Systems Workshops (ICDCSW’03) 0-7695-1921-0/03 $17.00 © 2003 IEEE