With the rapid development of Internet, WEB has been widely used and achieved great success. At present, it has become the primary way that people access information from WWW. The information obtained by people from the World Wide Web every day is stored in the WEB server. WEB server has played a great role in WWW service.The popular WEB server (Apache and Microsoft IIS) accounted for more than 90% market share. With the development of Internet and the applications is more and more personalized, the popular WEB server can not satisfy the requirements of all users, a variety of light weighted WEB server also start to be widely used. Compared with commonly used WEB servers, light weighted WEB server has many advantages in the case of limited resources: easier to deploy, less server resource required, lower complexity, faster running speed and so on. So it has been widely applied in some specific environment, such as Embedded System.The paper researches the theory of WEB server and correlate protocol, for example HTTP, in a deep-going way. The function and requirements of the light weighted WEB server has been detailed analyzed, and the module structure of the light weighted WEB servers has been determine, and a modular, light weighted WEB server based on thread pool has been designed and implemented. The performance of WEB server depends mostly on the performance of the thread pool. So, it put forward a scalable and efficient thread pool technology on the basis of research of a large number of traditional thread pool model. This technology uses dynamic thread pool size adjustment algorithm based on the task queue. By adjusting the sizes of thread pool, the performance of the thread pool can remain in a state of the most economical and efficient.The light weighted WEB server is generally used in the case of limited resources. So, to make the WEB server work well, resource monitoring and application monitoring on the WEB server is very important.The implementation method of the light weighted WEB server based on thread pool has been discussed and some key codes and data structure have been provided. In order to improve the performance of WEB server, it put forward a dynamic thread pool size adjustment algorithm based on the task queue. To know the performance of the WEB server, the resource and application of the WEB server is monitored.Finally, it summarizes the work of the paper and points out the locality that needs improvement and further development to perfect. Despite, there are still many deficiencies neeed to be improved in the implementation of the light weighted WEB server based on thread pool. But, it can basically satisfy the requirements. Finally it passed the test, and achieved the expected results. |