Faculty of Computer Science & Information Technology ADAPTIVE SYSTEM STATE BASED LOAD BALANCING FOR WEB APPLICATION SERVER CLUSTER OF HETEROGENEOUS PERFORMANCE NODES Chin Mei Lu Master of Computer Science 2013
ADAPTIVE SYSTEM STATE BASED LOAD BALANCING FOR WEB APPLICATION SERVER CLUSTER OF HETEROGENEOUS PERFORMANCE NODES CHIN MEI LU A thesis submitted in fulfillment of the requirements for the degree of Master of Science (Computer Science) Faculty of Computer Science and Information Technology UNIVERSITI MALAYSIA SARAWAK 2013
Declaration No portion of the work referred to in this report has been submitted in support of an application for another degree or qualification of this or any other university or institution of higher learning.. CHIN MEI LU 10th Sept 2013 i
Acknowledgments I would like to express my appreciation to my family for their unconditional support, encouragement and understanding. My second word of gratefulness goes to my supervisor, Assoc. Prof. Dr Tan Chong Eng and Encik Mohamad Imran Bandan, who patiently and excellently guided me through this progress especially when I was having the hard time with the research studies. Without the financial support from Fundamental Research Grant Scheme (FRGS), I might not able to go through the entire process. Therefore, I would like to indicate acknowledgement to Universiti Malaysia Sarawak and Kementerian Pengajian Tinggi Malaysia (UNIMAS) for their kindly support. ii
List of Publications Chin, M. L.; Tan, C. E., Bandan, Mohd Imran (2010). Load Balancing Architectures for Web Application Services, Proceedings of Young ICT Researchers Colloquium, Kuching, Sarawak, Malaysia, May 12-13, 2010. Chin, M. L.; Tan, C. E., Bandan, Mohd Imran (2010). Efficient Load Balancing for Bursty Demand in Web based Application Services via Domain Name Services, Proceedings of 8 th Asia-Pacific Symposium on Information and Telecommunication Technologies (APSITT 2010), Kuching, Sarawak, Malaysia, June 15-18 th, 2010. Chin, M. L.; Tan, C. E., Bandan, Mohd Imran (2010). DNS Oriented Load Balancing for Web based Applications, Proceedings of 3 rd International Conference on Science & Technology: Applications in Industry and Education (ICSTIE 2010), Penang, Malaysia, July 15-17 th, 2010. Chin, M. L.; Tan, C. E., Bandan, Mohd Imran (2012). Efficient DNS based Load Balancing for Bursty Web Application Traffic, Proceedings of International Conference on Advanced Computing, Engineering & Technology (ICACET 2012), pp. 41-43, Kuala Lumpur, Malaysia, October 22-23 rd, 2012 iii
Abstract This research is to propose a new efficient DNS-based load balancing algorithms that can solve a sudden increase of demand for service requests when they are applied to a local Domain Name Service (DNS) server for Web based applications and selected services. It is difficult to predict such a sudden increase in traffic and service requests which is mainly due to an unbalanced distribution of workload and the unavailability of sufficient physical computing resources by the service providers. If the load balancing algorithm can accommodate computing resources of different performance level, then computing resources from various places can be temporarily placed in the server cluster to address the sudden increase in demand during peak traffic period. The proposed algorithm allows an increase in efficient load distribution among multiple Web application servers because each node may require a different level of system resources and processing power and it has the ability to adapt with the current system in a rapidly changing dynamic load environment particularly during the seasonal high traffic demand period. Finally, from the analyzed and evaluated performance results it can be deduced that the proposed ASS (Adaptive System State) DNS-based algorithms managed to improve the overall performance in term of execution time by 78.87%. This result is obtained after compared to the SPS, PI, COM, RR and lbmnaned algorithms under server cluster scenarios 1 to 6 (Table 4.3) which consists of servers with wide range of performance differences. iv
Abstrak Kajian ini adalah mencadangkan satu algoritma pengimbangan beban baru berasaskan DNS yang cekap untuk mengimbangi beban bagi digunakan pada pelayan Sistem Nama Domain tempatan untuk aplikasi berasaskan web dan perkhidmatan untuk menyelesaikan peningkatan mendadak permintaan terhadap perkhidmatan. Peningkatan mendadak dalam permintaan lalu lintas dan perkhidmatan adalah sukar untuk diramal. Ini adalah disebabkan oleh pengagihan beban kerja yang tidak seimbang dan ketiadaan sumber pengkomputeran fizikal yang cukup oleh pembekal perkhidmatan. Jika algoritma pengimbangan beban boleh menampung sumber pengkomputeran bagi tahap prestasi yang berbeza, maka sumber pengkomputeran dari pelbagai tempat dapat digunakan di dalam kelompok pelayan buat sementara waktu untuk menangani peningkatan mendadak dalam permintaan semasa tempoh trafik puncak. Algoritma yang dicadangkan itu membolehkan peningkatan kecekapan pengagihan beban di kalangan pelbagai pelayan aplikasi Web kerana setiap nod memerlukan tahap sumber sistem dan kuasa pemprosesan yang berbeza dan mempunyai keupayaan menyesuaikan diri dengan beban dari sistem persekitaran semasa yang berubah dengan pesat dan dinamik terutamanya semasa tempoh permintaan trafik yang bermusim tinggi. Akhir sekali, dari penganalisaan dan penilaian keputusan prestasi bagi pengimbangan beban algoritma berasaskan DNS yang dicadangkan dan yang sedia ada, ASS ( Adaptive System State ) algoritma berasaskan DNS yang dicadangkan berjaya meningkatkan prestasi v
keseluruhan dalam jangka masa pelaksanaan sebanyak 78.87%. Keputusan ini diperolehi selepas membuat perbandingan dengan algoritma SPS, PI, COM, RR dan lbmnaned di bawah senario kelompok pelayan 1 kepada 6 (Jadual 4.3) yang terdiri daripada pelayan dengan pelbagai perbezaan prestasi. vi
Table of Contents Declaration... i Acknowledgments... ii List of Publications... iii Abstract... iv Abstrak... v Table of Contents... vii List of Figures... xi List of Tables... xiv List of Equation... xvi List of Abbreviations... xvii Chapter 1 Introduction... 1 1.1 Introduction... 1 1.2 Problem Statement... 4 1.3 Research Objectives... 5 1.4 Scopes... 6 1.5 Procedures/Methodologies... 7 1.6 Significance of the Research... 8 1.7 Chapters Summary... 9 Chapter 2 Literature Review... 11 vii
2.1 Introduction... 11 2.2 Client-based Approach... 11 2.2.1 Web clients... 13 2.3 Dispatcher-based Approach... 14 2.3.1 Packet Single-rewriting... 15 2.3.2 Packet Double-rewriting... 16 2.3.3 Packet Forwarding... 18 2.3.4 HTTP Redirection... 21 2.4 Server-based Approach... 22 2.4.1 HTTP Redirection... 23 2.4.2 Packet Redirection... 24 2.5 DNS-based Approach... 25 2.5.1 Constant TTL Algorithms... 28 2.5.2 Adaptive TTL Algorithms... 33 2.5.3 Dynamic DNS for Load Balancing (DDLB)... 35 2.5.4 DNS-based Dynamic Load Balancing... 36 2.6 Comparison of the Different Approaches... 37 2.7 Summary... 43 Chapter 3 The Adaptive System State (ASS) DNS-Based Load Balancing Algorithm... 44 3.1 Introduction... 44 3.2 General Load Balancing Algorithms... 44 viii
3.3 The New DNS-based Load Balancing Design Requirements... 46 3.4 Overview of the Proposed DNS-based Load Balancing Algorithms... 51 3.4.1 Server Performance Score (SPS) DNS-based Load Balancing Algorithm... 52 3.4.2 Performance Indexing (PI) DNS-based Load Balancing Algorithm... 55 3.4.3 Combination of PI and SPS (COM) DNS-based Load Balancing Algorithm... 59 3.4.4 Adaptive System State (ASS) DNS-based Load Balancing Algorithm... 62 3.5 Summary... 66 Chapter 4 Simulation & Results Analysis... 67 4.1 Introduction... 67 4.2 Simulation Modeling... 68 4.2.1 Assumptions of the Model... 71 4.3 The Standard Normal Distribution for Client Access Distribution... 73 4.4 Performance Metrics... 74 4.4.1 Task Completion Time (TCT)... 75 4.4.2 Percentage Improvement of TCT for Proposed Algorithms (... 75 4.4.3 Average Percentage Improvement of TCT in All Scenarios for Each Algorithm ( )... 76 4.5 Simulation Parameters... 77 4.6 Dataset... 78 4.7 Simulation Scenarios... 79 4.7.1 Initial Server Load... 80 ix
4.7.2 Server Performance Score Scenarios... 81 4.8 Performance Comparison and Results Analysis... 82 4.8.1 Server Performance Score (SPS) for DNS-based Load Balancing Algorithm.. 83 4.8.2 Performance Indexing (PI) of DNS-based Load Balancing Algorithm... 89 4.8.3 Performance and Results Comparison for PI versus SPS DNS-based Load Balancing Algorithm... 95 4.8.4 Combination of PI and SPS (COM) DNS-based Load Balancing Algorithm. 100 4.8.5 Performance and Results Comparison for COM versus PI and SPS DNS-based Load Balancing Algorithm... 106 4.8.6 Adaptive System State (ASS) DNS-based Load Balancing Algorithm... 113 4.9 Discussion... 120 4.10 Summary... 123 Chapter 5 Conclusion and Discussion... 125 5.1 Introduction... 125 5.2 Contributions... 126 5.3 Limitations... 127 5.4 Future Works... 127 References... 129 x
List of Figures Figure 2.1: Web client-based approach... 12 Figure 2.2: Packet single-rewriting... 16 Figure 2.3: Packet double-rewriting... 17 Figure 2.4: WAN Network Dispatcher... 19 Figure 2.5: HTTP redirection... 23 Figure 2.6: Packet redirection... 24 Figure 2.7: DNS-based approach... 27 Figure 3.1: General load balancing algorithm diagram... 45 Figure 3.2: Concepts of the proposed load balancing algorithms... 47 Figure 3.3: Server Performance Score DNS-based load balancing algorithm... 53 Figure 3.4: Performance Indexing DNS-based load balancing algorithm... 56 Figure 3.5: Combination of PI and SPS DNS-based load balancing algorithm... 60 Figure 3.6: Adaptive System State DNS-based load balancing algorithm... 63 Figure 4.1: Simulation model... 69 Figure 4.2: Simulation flow... 70 Figure 4.3: Time diagram of client, local DNS and Web application server s interactions... 71 Figure 4.4: Standard Normal Distribution for client access distribution... 74 Figure 4.5: Scenario 1 (All low performance servers)... 84 Figure 4.6: Scenario 2 (All high performance servers)... 85 Figure 4.7: Scenario 3 (50:50 ratio of low and high performance servers)... 86 Figure 4.8: Scenario 4 (10% high performance servers)... 87 Figure 4.9: Scenario 5 (10-20% low performance servers)... 87 xi
Figure 4.10: Scenario 6 (All similar performance servers)... 88 Figure 4.11: Scenario 1 (All low performance servers)... 90 Figure 4.12: Scenario 2 (All high performance servers)... 91 Figure 4.13: Scenario 3 (50:50 ratio of low and high performance servers)... 92 Figure 4.14: Scenario 4 (10% high performance servers)... 92 Figure 4.15: Scenario 5 (10-20% low performance servers)... 93 Figure 4.16: Scenario 6 (All similar performance servers)... 94 Figure 4.17: Scenario 1 (All low performance servers)... 96 Figure 4.18: Scenario 2 (All high performance servers)... 97 Figure 4.19: Scenario 3 (50:50 ratio of low and high performance servers)... 97 Figure 4.20: Scenario 4 (10% high performance servers)... 98 Figure 4.21: Scenario 5 (10-20% low performance servers)... 99 Figure 4.22: Scenario 6 (All similar performance servers)... 99 Figure 4.23: Scenario 1 (All low performance servers)... 101 Figure 4.24: Scenario 2 (All high performance servers)... 102 Figure 4.25: Scenario 3 (50:50 ratio of low and high performance servers)... 102 Figure 4.26: Scenario 4 (10% high performance servers)... 103 Figure 4.27: Scenario 5 (10-20% low performance servers)... 104 Figure 4.28: Scenario 6 (All similar performance servers)... 105 Figure 4.29: Scenario 1 (All low performance servers)... 108 Figure 4.30: Scenario 2 (All high performance servers)... 108 Figure 4.31: Scenario 3 (50:50 ratio of low and high performance servers)... 110 Figure 4.32: Scenario 4 (10% high performance servers)... 110 Figure 4.33: Scenario 5 (10-20% low performance servers)... 111 xii
Figure 4.34: Scenario 6 (All similar performance servers)... 112 Figure 4.35: Scenario 1 (All low performance servers)... 115 Figure 4.36: Scenario 2 (All high performance servers)... 116 Figure 4.37: Scenario 3 (50:50 ratio of low and high performance servers)... 116 Figure 4.38: Scenario 4 (10% high performance servers)... 117 Figure 4.39: Scenario 5 (10-20% low performance servers)... 118 Figure 4.40: Scenario 6 (All similar performance servers)... 118 Figure 4.41: Average Percentage Improvement of TCT for All Scenarios ( ) in Each Algorithm... 121 xiii
List of Tables Table 2.1: Main advantages and disadvantages of the approaches... 37 Table 2.2: Scheduling mechanism... 39 Table 4.1: Parameters of the system model... 78 Table 4.2: Initial server load setting... 80 Table 4.3: Server performance score scenarios setting... 82 Table 4.4: Scenario 1 (All low performance servers)... 84 Table 4.5: Scenario 2 (All high performance servers)... 85 Table 4.6: Scenario 3 (50:50 ratio of low and high performance servers)... 85 Table 4.7: Scenario 4 (10% high performance servers)... 86 Table 4.8: Scenario 5 (10-20% low performance servers)... 87 Table 4.9: Scenario 6 (All similar performance servers)... 88 Table 4.10: Scenario 1 (All low performance servers)... 90 Table 4.11: Scenario 2 (All high performance servers)... 90 Table 4.12: Scenario 3 (50:50 ratio of low and high performance servers)... 91 Table 4.13: Scenario 4 (10% high performance servers)... 92 Table 4.14: Scenario 5 (10-20% low performance servers)... 93 Table 4.15: Scenario 6 (All similar performance servers)... 93 Table 4.16: Scenario 1 (All low performance servers)... 96 Table 4.17: Scenario 2 (All high performance servers)... 96 Table 4.18: Scenario 3 (50:50 ratio of low and high performance servers)... 97 Table 4.19: Scenario 4 (10% high performance servers)... 98 Table 4.20: Scenario 5 (10-20% low performance servers)... 98 xiv
Table 4.21: Scenario 6 (All similar performance servers)... 99 Table 4.22: Scenario 1 (All low performance servers)... 101 Table 4.23: Scenario 2 (All high performance servers)... 102 Table 4.24: Scenario 3 (50:50 ratio of low and high performance servers)... 102 Table 4.25: Scenario 4 (10% high performance servers)... 103 Table 4.26: Scenario 5 (10-20% low performance servers)... 103 Table 4.27: Scenario 6 (All similar performance servers)... 105 Table 4.28: Scenario 1 (All low performance servers)... 107 Table 4.29: Scenario 2 (All high performance servers)... 108 Table 4.30: Scenario 3 (50:50 ratio of low and high performance servers)... 109 Table 4.31: Scenario 4 (10% high performance servers)... 110 Table 4.32: Scenario 5 (10-20% low performance servers)... 111 Table 4.33: Scenario 6 (All similar performance servers)... 112 Table 4.34: Scenario 1 (All low performance servers)... 114 Table 4.35: Scenario 2 (All high performance servers)... 116 Table 4.36: Scenario 3 (50:50 ratio of low and high performance servers)... 116 Table 4.37: Scenario 4 (10% high performance servers)... 117 Table 4.38: Scenario 5 (10-20% low performance servers)... 118 Table 4.39: Scenario 6 (All similar performance servers)... 118 xv
List of Equation Equation 3.1 54 Equation 3.2 54 Equation 3.3 57 Equation 4.1 73 Equation 4.2 74 Equation 4.3 74 Equation 4.4 75 Equation 4.5 75 Equation 4.6 76 Equation 4.7 76 Equation 4.8 77 Equation 4.9 77 xvi
List of Abbreviations Andrew File System Center Processor Unit Current Server Load Distributed Packet Rewriting Domain Name Service Dynamic DNS Load Balancing Graphical User Interface Hypertext Transfer Protocol Intermediate Name Server Internet Protocol Internet2 Distributed Storage Infrastructure Local Area Network Local Gateway Media Access Control National Center for Supercomputing Applications Network Address Translation Packet Size Performance Indexing Round Robin Scalable server World Wide Web Server Performance Score Service Provider Machine AFS CPU CSL DPR DNS DDLB GUI HTTP INS IP I2-DSI LAN LG MAC NCSA NAT PKT_SIZE PI RR SWEB SPS SPM xvii
Single Virtual IP Address Time to Live Total Packet Size Transmission Control Protocol Uniform Resource Locator World Area Network World Wide Web IP-SVA TTL TL_PKT_SIZE TCP URL WAN WWW xviii
Chapter 1 Introduction 1.1 Introduction In today s computing industries, the demand for computing resources have grown rapidly. Computing resources are inevitably expensive, thus they creating a need to research into full utilization of existing computing resources available in an organization. Load balancing is introduced to solve the problem such as data warehousing and transaction processing that are involved in businesses, education, government and so on (Malony, 1992). In addition, popular web sites also experience heavy workload on their server. This can happen in a short time window. As applications move towards web based, the adoption of load balancing faces great challenges as web services have wider user coverage and can be accessed anywhere. Owing to the shift of application platform from conventional client server to the web, there is a need to evaluate the effectiveness of load balancing schemes proposed specifically for web based services. Furthermore, server congestion and sudden traffic have been increasing rapidly since the expansion of the Internet. This is because the Internet accessibility is easily and widely available especially the services are provided across network. Owing to that, millions of users from the Internet may access a single service site at the same time which creates peak access period. For example, during a limited product promotion period, new service launching and limited time payment services period. 1
During these peak periods, server resources can be easily exhausted and may result in service interruption and denial. Such sudden increases in traffic and service requests are difficult to predict and it is not cost effective to accommodate this issue by allocating huge amount of permanent computing resources to accommodate seasonal traffic demands. As a result, load balancing are used to overcome the above mentioned issues by using dynamic computing resource allocation ability. This technique plays an important role in efficient load distribution because each node may require different levels of system resources and processing power (Mohammadpour et al., 2008). Load balancing is a technique that distributes work or processes between two or more computers, hard drives, network traffic links, CPUs and other resources (Huang et al., 2009). The main purpose is to minimize response time, optimize resource utilization and maximize throughput which will improve the performance of each node. All these need to be achieved so that the system resources can be utilized to the fullest. Besides, the reliability through redundancy can be increased with the use of server farm containing multiples of computing resources with load balancing instead of a single computing resource (Huang et al., 2009). This is because with the uses of multiple servers architecture solution can increase the scalability of network service system on a cluster of servers (Santarelli et al., 2000). A new server or more can be simply added to the cluster when the workload is increased due to higher volume of requests. Thus, building server cluster architecture for network services is 2
much more cost effective and scalable than the single server architecture (Santarelli et al., 2000). Therefore, new requirements for effective load balancing are identified to handle massive loads which are to be distributed among two or more computers in order to reduce the burst traffic and service requests. Whenever a server is overloaded, its performance will reduce drastically and all users will experience poor services from the server. Thus, new requirements set for an efficient and effective load balancing scheme will help improve the throughput and response time. Load balancing is to improve the performance of parallel computers. Additionally, load balancing is also used to share computational workload or function as a single virtual computer. To a user, there is only a single server and one service point though in reality there are multiple machines at the backend. In this research work, an enhancement to the Round Robin (RR) DNS-based Load Balancing technique is proposed. The conventional RR DNS-based Load Balancing technique allows a single domain name to be associated with several IP addresses in a rotated order. This technique will redirect the request to one of the servers in the server cluster. Once the DNS resolves the domain name to one of the IP address for the server, the subsequent requests from the same client will be sent to the same server regardless of the current load of the server. The proposed enhanced RR DNS-based load balancing service offers more intelligence in load distribution. Local DNS is introduced to resolve caching problem and it is also aware of 3
the status of the servers by creating a reporting mechanism of failure to the local DNS in the cluster. Moreover, the cluster also has the ability to dynamically add and remove server based on the needs during certain important periods of time by taking from the existing computing resources to act as server. Besides, the proposed algorithms have the ability to adapt based on the current environment status to distribute the task. The service requests are distributed based on the performance matrix of the servers in the cluster. The performance matrices are the CPU load, memory usage, system throughput and the heterogeneous platform. All the mentioned parameters aim to increase the performance of the system and the effectiveness of the load balancing processes. 1.2 Problem Statement Nowadays, Internet accessibility is easily and widely available with services provided across the network which make the Internet a common platform. As a result millions of users from the Internet may access a single service site during peak period such as product promotion and launching of new service. During these peak periods, server resources can be easily exhausted thus result in service interruption and denial. Such sudden traffic and service requests are difficult to predict and they are not economical to accommodate by allocating huge amount of permanent computing resources. By looking at the above mentioned problem, there is a need for a cost effective and 4