| With the rapid development and widely popularization of Internet, P2P applications have played an important role at Internet business. But the application of P2P makes ISPs bewilderment. Because of requesting network width is unlimited in theory. They make fluent network more and more congestion, change the traffice model of Internet and increase the ISP's network cost.Base on the situation, ISPs use strategies of forbidding P2P applications, or restricting the traffic of some P2P applicatons. These strategies have worked, but all of them are under reducing clients'service as precondition. As the matter of fact, they don't solve the contradiction with clients and ISPs. So this paper aims at how to enhance the ability of ISPs to monitor and manage the network traffic, optimize network quality, make the network traffic localize and decrease the network cost. And analyses and discusses the character of P2P traffic controller system. First of all, discusses the conpect of BitTorrent, system architecture and procotol. Analyses and discusses the mechanism and implement of P2P proxy cache. Researches deep packet inpector technology and several IO mechanism when designs the high performance server. Through the comparison and analyses of several network IO model, figures out the model which employs single process event driven plus Kqueue will meet the requirements of implementing the high performance communication server.In the system design and implementation sections, figures out the whole system objective firstly. And base on the objective, simplely introduces the design idea, system architecture and implement process of the system. Then exactly introduces the design and implementation of three core models, including PPS(P2P Switch), LBE(Load Balance Engine) and PPC(P2P Cache), in the system. PPS deploys at outlet of Internet and analyses traffic character with DPI(Deep Packet Inpector). Packets which be fitted with P2P character are redirected to LBE Server. LBE designs and implements commucation server with single process event driever. Implements tracker function in BitTorrent system, and be incoroperated with load balance algorithm, finishes loading service processes which priovde data download service. As proxy cache server, PPC provides content to clients. Through analyzing clients request during a period of time, figures out P2P cache replace algorithm base on LRU algorithm. Through system function and performance testing, the system meets our design goals and provides high performance. |