Master Thesis
Total Page:16
File Type:pdf, Size:1020Kb
MASTER THESIS TITLE: Analysis and evaluation of high performance web servers MASTER DEGREE: Master in Science in Telecommunication Engineering & Management AUTHOR: Albert Hidalgo Barea DIRECTOR: Rubén González Blanco SUPERVISOR: Roc Meseguer Pallarès DATE: July 13 th 2011 Title: Analysis and evaluation of high performance web servers Author: Albert Hidalgo Barea Director: Rubén González Blanco Supervisor: Roc Meseguer Pallarès Date: July 13 th 2011 Overview Web servers are a very important tool when providing users with requested content on the Internet. Usage of the Internet is growing day-by-day, making those software applications essential. In the first part of the thesis, the web server world will be introduced to the reader, by giving a brief explanation of some of the available technologies as well as different dynamic protocols. Also, as there are different web servers available in the market, during this report it will be chosen the best performing ones. So, it will be presented a comparative chart between all of them in order to show the most important features of each one. Defining the scenario and the test cases is mandatory. For this reason, it is described the used hardware and software used to perform those benchmarks. The hardware is maintained equal during the whole test process, in order to let web server’s performance gaps to their internal architecture. Operating system and benchmarking tools are also described and given some examples. Furthermore, test cases are chosen to show some strengths and weakness of each web server, enabling us to compare the relative performance between them. Finally, the last part of the report consists on presenting the obtained results during the benchmark process, as well as presenting some lessons learned during the curse of the whole thesis, summing-up with some conclusions. INDEX CHAPTER 1. INTRODUCTION .......................................................................... 1 1.1. Project scope ..................................................................................................................... 1 1.2. Background and motivation ............................................................................................. 2 1.3. Report organization ........................................................................................................... 2 CHAPTER 2. WEB SERVERS ........................................................................... 4 2.1. Web languages .................................................................................................................. 4 2.1.1. Programming languages classification ................................................................... 4 2.1.2. Web content classification ...................................................................................... 6 2.2. Dynamic web content technologies ................................................................................ 7 2.2.1. CGI ......................................................................................................................... 7 2.2.2. FastCGI .................................................................................................................. 8 2.2.3. Servlet ..................................................................................................................... 8 2.2.4. JSP ......................................................................................................................... 9 2.2.5. uWSGI .................................................................................................................... 9 2.3. HyperText Transfer Protocol (HTTP) ............................................................................. 10 2.4. Web server selection ....................................................................................................... 11 2.4.1. Available web servers ........................................................................................... 11 2.4.2. Web servers feature comparison ......................................................................... 13 2.4.3. Architecture overview ........................................................................................... 15 2.5. Software stack ................................................................................................................. 18 CHAPTER 3. TESTBED FOR WEB SERVER BENCHMARKING .................. 19 3.1. Used machines and software ......................................................................................... 19 3.2. Network benchmark ........................................................................................................ 20 3.3. Software configuration ................................................................................................... 20 3.3.1. Operating system ................................................................................................. 21 3.3.2. Web server configuration ...................................................................................... 21 3.4. Test cases ........................................................................................................................ 21 3.4.1. Definition ............................................................................................................... 21 3.4.2. Benchmarking tools .............................................................................................. 22 3.4.3. Static tests ............................................................................................................ 23 3.4.4. Dynamic tests ....................................................................................................... 23 3.4.5. Keep-alive tests .................................................................................................... 25 3.4.6. HTTPS tests ......................................................................................................... 26 3.4.7. Load test ............................................................................................................... 26 CHAPTER 4. TEST RESULTS ........................................................................ 28 4.1. Static tests ........................................................................................................................ 28 4.1.1. ST-1 HTML test .................................................................................................... 28 4.1.2. ST-2 Image small test ........................................................................................... 32 4.1.3. ST-3 Image large test ........................................................................................... 35 4.1.4. Static tests conclusions ........................................................................................ 36 4.2. Dynamic tests .................................................................................................................. 37 4.2.1. DT-1 PHP test ...................................................................................................... 37 4.2.2. DT-2 PYTHON test ............................................................................................... 41 4.2.3. Dynamic tests conclusions ................................................................................... 44 4.3. HTTPS tests ...................................................................................................................... 46 4.3.1. HTTPST-1 HTML test ........................................................................................... 47 4.3.2. HTTPST-2 PHP test ............................................................................................. 49 4.3.3. HTTPST-3 PYTHON test ...................................................................................... 50 4.3.4. HTTPS tests conclusions ..................................................................................... 51 4.4. Load test ........................................................................................................................... 53 CHAPTER 5. LESSONS LEARNED ................................................................ 55 CONCLUSIONS ............................................................................................... 57 REFERENCES ................................................................................................. 58 APPENDIX ....................................................................................................... 60 A.1 Scenario configuration ................................................................................................... 60 A.2 Test cases extended ....................................................................................................... 74 A.3 Test results extended ...................................................................................................... 82 Introduction 1 CHAPTER 1. INTRODUCTION Since the introduction of the Internet network, people can communicate with each other around the world using different online tools. Also, it has been a driving force to allow people to use electronic commerce to buy different goods, as well as share media content. Nowadays, there are almost 7,000 million [1] people in the world, with an estimation of up to 2,000 million Internet users. In order to see the importance of this share, in the year 2000 it was only 360,000 Internet users, so there has been an increase of 445%. A web server powers all the operations done in the Internet, which