In: Computer Science
Computer Networking Proxy Server Related Question:
Please explain the caching algorithms of a web proxy server and include following concepts: Greedy Dual Size, least recently used, and least frequently used.
Caching algorithms of a web proxy server
To reduce response time for a web user one of the way is to use
caching at proxy server. This caching algorithms has a very vital
part in reducing the response time by caching a part of the
document, because of which the performance is maximized.
This is good for the other users, when one user visits a page, a
small part of that is stored as cache in the server so when some
other user tries to access the same page later then the server
doesn't have to go back to the main source to fetch the page and
can directly send it to the user reducing the time.
Greedy Dual Size
This is a algorithm which is used in storing documents of varying sizes. The greedy-dual algorithm is determined by H. Here H is cost/size where the cost is for the document and the size is in bytes for the document. Based on the H value, priority can be given to a particular document.
Least recently used
When a page is heavily used it is known that this page will be used for some more time again. Similarly when a page is not used so frequently it will most likely be unused for a long time. This is where the algorithm comes which throws out a page which has been used for a long time when there is a fault in a page.
Least frequently used
This is a algorithm used in caching the least frequently used cache block, which is then removed whenever their is overflow in cache. The working of the algorithm is that it checks a page and the number of time it has been visited and if that number is greater than the page which is older than that, then it cannot be removed. And also if all the pages have same frequency then the last page will be removed.