Font Size: a A A

The Research And Realization For Strategy Of Proxy Cache

Posted on:2006-08-25Degree:MasterType:Thesis
Country:ChinaCandidate:X JiFull Text:PDF
GTID:2168360155953164Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
With the fast development of internet and intranet, the proxy server, as the connection of internet and intranet, plays a very important role in the practical application. It possesses such functions as visiting for the client, accelerating the visit speed, realizing insulation between internet and intranet, supervising the client management and client behavior, and protecting private resources etc. Thus there are considerable applied and technology-based researches on the proxy server at home and abroad. On the basis of the combination of theory and practice, this paper makes a further research on the principle and realizing method of the proxy server。In the environment of Web, this paper studies the proxy cache strategy from such perspectives as the hit-the-target rate, average visit delay, room use rate and so on, and accordingly puts forward and analyzes several corresponding cache strategies. Besides, this paper takes the HTTP protocol proxy server for example to present the design and procedure of the proxy server of the cache-based strategy. In the course of research and exploration, this paper mainly studies the working principle and technological basis of the proxy server, and at the same time links the research on the proxy server to that on the network protocol, and focus analyzes the realization of the proxy cache. The elementary function of the proxy server is to visit for the client. The proxy server is the network node which receives or interprets the client connection and also starts up new connection with the server. The proxy server acts as the medium between the client and the server, so it has to satisfy the following items: receiving and interpreting client requirement, setting up new connection with the server, receiving response from the server, sending or interpreting the server's response and sending it back to the client. Since we are developing the window-based applied program and need to carry out the window message management, we adopt an asynchronous I/O model named WSAAsyncSelect. By illustrating the data configuration of the two sockets clientf which contain respective connections with both the client and the server, we fulfill the corresponding connections between the server and the client and also between the proxy server and the server. Besides, we react to the client connection requirement, client read message, the server read message and search target IP address of host. In this way, the proxy visit function is accomplished. In order to speed up the visit rate, the proxy server usually needs a big cache. This cache system has to realize such requirements as the search for the script file, the consistency of cache, the substitution of cache and so on. As far as the client requirement is concerned, the proxy server at first searches its own cache. We realize the search of the script file by means of maintaining a hash table. If there is matching item, we judge the cache consistency which is maintained by the TTL algorithm, and if it meet the standard, it is returned straight back to the client. if there is none, the proxy server retrieves the host from the requirement, and transforms it into the corresponding IP address (If the requirement contains the IP address, the address needn't to be transformed.) and then sends out the requirement to the target host. The response of the target host is copied in the cache and then transmitted to the client. The cache mechanism deals with the client requirement and the server response respectively. Specifically speaking, it judges whether the client requirement is still valid and whether the...
Keywords/Search Tags:Realization
PDF Full Text Request
Related items