Ana Quil
01-19-2022When the proxy cache has the data the user wants:
a. The client sends a data demand packet to the server;
b. After receiving the packet, the server first compares whether the "source" of the packet and the "target" website it is expected to go to are acceptable? If both the source and the target are legal, or if our proxy of the source and the target website can help obtain data, the server will start to obtain data for the client. The more important step in this step is the "comparison policy", which is a bit like certification;
c. The server will first check its own cache (the new data may be in memory, and the older data will be placed on the hard disk). If there is data required by the client, the data will be ready to be taken out without going through the program requesting data from the Internet;
Finally, of course, the data is returned to the client!
When the proxy cache does not have the data the user wants:
1. The client sends a data demand packet to the server;
2. After receiving the policy, the server starts policy comparison;
3. The server finds that the cache does not have the data required by the client, and is ready to go to the Internet to grab data;
4. The server starts sending requests and obtaining relevant data to the Internet;
5. Of course, the last step is to send the data back to the client!
be careful:
Proxy requires the speed of the cache, and the cache is the hard disk! Of course, the hard disk capacity must be large enough and "fast enough"!
Because from the above process, it is not difficult to find that cache is a place that has been accessed repeatedly! So the quality of the hard disk is very different!
It can be said that it is the key to the performance of a proxy.