Font Size: a A A

Design And Implementation Of A Lightweight WEB Server Based On Thread Pool

Posted on:2018-04-22Degree:MasterType:Thesis
Country:ChinaCandidate:P ChenFull Text:PDF
GTID:2428330512466975Subject:Communication and Information System
Abstract/Summary:PDF Full Text Request
Web application has excellent versatility and great interactivity,thus becoming the first choice of the Internet access platform as the growing popularity and rapid development of Internet technology.However,most of the popularity Web server takes up too much physical resources when processing a request and restricts the site response speed of massive requests.Therefore,the development of lightweight high performance Web server to ensure fast and stable work at the time of limited resources is important to promote the further development of the popularity of Internet.In this thesis,a lightweight asynchronous non-blocking Web server is selected as the research topic.A thread pool which can be resized dynamically based on the load had been designed and used in Web server.The main contents can be summarized as follows:This thesis designed a lightweight asynchronous non-blocking Web server based on the detailed analysis of HTTP,TCP and other important Internet net work protocols,as well as the analysis of network programming based on Socket,process thread and server IO model,combined with the depth study of N ginx server.The server can process requests asynchronously based on the Reactor pattern,and compute data tasks with thread pool.It can be effectively applied to the network environment with limited resources;This thesis introduces the basic technology and design idea of thread pool,then design a thread pool with dynamically size: when the request increase s,the number of threads increases to meet the demand of system load;when the request decreases,The thread pool recovers the excess threads to make efficient use of system resources.In addition,a task scheduling method based on thread pool is designed,In this method,the task can be submitted to the most suitable thread for processing;In this thesis,the basic functions,system capacity,throughput and delay performance of the server are tested.The web server was optimization combined with the test results.Test result shows that the server can support the basic Web service functions,performance stable and reliable,success to meet the design requirements.The innovations for this work can be summarized as follows:A lightweight asynchronous non-blocking Web server is implemented.The server perform stable and reliable based on IO multiplexing and thread pool technology;Design a thread pool with dynamically size according to the load,and study a task scheduling method based on thread pool.
Keywords/Search Tags:Web server, lightweight, IO multiplexer, thread pool
PDF Full Text Request
Related items