Sunteți pe pagina 1din 6

Robust Web Caching Approaches

Wajid Ali
Computer Science and Engineering HITM,Ambala,Kurukshetra University,Haryana,India. Er.wajid.ali@gmail.com

International Journal of Computer Information Systems, Vol. 3, No. 3, 2011

Rachit Kumar Gupta


Department of Computer Science Administrator, TMU Moradabad, India. Rachit.kumar.gupta@gmail.com

Gulista Khan
Computer Science and Engineering College of Engineering, TMU, Moradabad, India, Gulista.khan@gmail.com

Abstract World Wide Web is of an exponential growth in size, which results in network congestion and server overloading. Web caching has been recognized as one of the effective schemes to alleviate the service bottleneck and reduce the network traffic, thereby minimize the user access latency. In this paper, we first describe the elements of a Web caching system and its desirable properties, focused on different routing protocols like WCCP, ICP and hash-based query algorithm. Different cache algorithms defined to validate cache data. Efficient utilization of routing schemes and routing protocols can increase the Hit Ratio of proxy caches and reduce the latency delays.

Keywords- Distributed Web Caching, Proxy server, Cache, Congestion, Latency delay.

I.

INTRODUCTION

firewall. For security reasons, companies run a special type of HTTP servers called proxy on their firewall machines. A proxy server typically processes requests from within a firewall by forwarding them to the remote servers, intercepting the responses, and sending the replies back to the clients. Since the same proxy servers are typically shared by all clients inside of the firewall, naturally this leads to the question of the effectiveness of using these proxies to cache documents. Clients within the same firewall usually belong to the same organization and likely share common interests. A proxy running on the firewall machine to service clients inside the subnet. Documents can be cached on the clients, the proxies, and the servers. The effects of Web caching are two-fold. First, it has been shown that caching documents can improve Web performance significantly [2] [3] [4]. There are several advantages of using Web caching: Web caching reduces bandwidth consumption, there by decreases network traffic and lessens network congestion. ii. Web caching reduces access latency due to: a) frequently accessed documents are fetched from nearby proxy caches instead of remote data servers, the transmission delay is minimized. b) Because of the reduction in network traffic, those documents not cached can also be retrieved relatively faster than without caching due to less congestion along the path and less workload at the server. iii. Web caching reduces the overload of the remote Web server by disseminating data among the proxy caches over the wide area network. iv. If the remote server is not available due to the remote servers crash or network partitioning, the client can obtain a cached copy at the proxy. Thus, the robustness of the Web service is enhanced. v. Web caching provides us a chance to analyze an organizations usage patterns. This document is a template. An electronic copy can be downloaded from the conference website. For questions on paper guidelines, please contact the conference publications committee as indicated on the conference website. i.

The World Wide Web (WWW) can be considered as a large distributed information system that provides access to shared data objects. As the WWW continues its exponential growth (the size of static Web pages increases approximately 15 per month), two of the major problems that todays Web users are suffering from are the network congestion and server over loading. The rapid growth of the WWW could be attributed to the fact that at least till now, its usage is quite inexpensive, and accessing information is faster using the WWW than using any other means. Also, the WWW has documents that appeal to a wide range of interests, e.g. news, education, scientific research, sports, entertainment, stock market growth, travel, shopping, weather, maps, etc. Although the Internet backbone capacity increases as 60 per year, the demand for bandwidth is likely to outstrip supply for the foreseeable future as more and more information services are moved onto the Web. If some kind of solution is not undertaken for the problems caused by its rapidly increasing growth, the WWW would become too congested and its entire appeal would eventually be lost. Researchers have been working on how to improve Web performance since the early 90s. Caching popular objects at locations close to the clients has been recognized as one of the effective solutions to alleviate Web service bottlenecks, reduce traffic over the Internet and improve the scalability of the WWW idea of using proxy servers [1] to cache arose when they were firstly used to allow accesses to the Internet from users within a

Special Issue

Page 24 of 69

ISSN 2229 5208

Information about final paper submission is available from the conference website. II. DESIRABLE PROPERTIES OF WWW CACHING SYSTEM

A. Fast access Access latency is an important measurement of the quality of Web service. A desirable caching system should aim at reducing Web access latency. In particular, it should provide user a lower latency on average than those without employing a caching system. B. Robustness Robustness means availability, which is another important measurement of quality of Web service. Users desire to have web service available whenever they want. C. Transparency A Web caching system should be transparent for the user; the only results user should notice are faster response and higher availability. D. Scalability We have seen an explosive growth in network size and density in last decades and is facing a more rapid increasing growth in near future. The key to success in such an environment is the scalability. We would like a caching scheme to scale well along the increasing size and density of network. E. Efficiency We would like a caching system to impose a minimal additional burden on the network. This includes both control packets and extra data packets incurred by using a caching system. F. Adaptivity The adaptively involves several aspects: cache management, cache routing, proxy placement, etc. This is essential to achieve optimal performance. G. Stability The schemes used in Web caching system shouldnt introduce instabilities into the network. H. Load balancing Its desirable that the caching scheme distributes the load evenly through the entire network. Simplicity We would like an ideal Web caching mechanism to be simple to deploy. III. METHODOLOGIES I.

International Journal of Computer Information Systems, Vol. 3, No. 3, 2011 A. Web Cache Communication Protocol Using WCCP, the router redirects requests on configured TCP ports to network caches rather than to intended host sites. It also balances traffic load across a cache cluster and ensures fault-tolerant and fail-safe operation. As Content Engines are added to or deleted from a cache cluster, the WCCP-aware router or switch dynamically adjusts its redirection map to reflect the currently available caches, resulting in maximized performance and content availability. WCCP Version 2 contains the following features: Multiple router support Improved security Faster throughput Redirection of multiple TCP port-destined traffic Load-distributing applications capability Client IP addressing transparency

WCCP Version 2 enables a series of Content Engines, called a Content Engine cluster, to connect to multiple routers. This feature provides redundancy and a more distributed architecture for instances when a Content Engine needs to connect to a large number of interfaces. This strategy also has the benefit of keeping all the Content Engines in a single cluster, avoiding unnecessary duplication of web pages across several clusters. 1) How Version 1 Works With WCCP Version 1, only a single router services a cluster, becoming the default home router for the cluster. In this scenario, this router is the device that performs all the IP packet redirection. The following sequence of events details how this process works: 1. Each Content Engine records the IP address of the router servicing the cluster. 2. The Content Engines then transmit their IP addresses to the router, indicating their presence to one another in the cluster. 3. The router then replies to the Content Engines, establishing that each can connect to others in the cluster, and providing a view (a list) of Content Engine addresses in the cluster, indicating that all can recognize one another. 4. Once the view has been established, one Content Engine is designated the lead and indicates to the router how IP packet redirection should be performed. The lead Content Engine is defined as one seen by all the routers in the service group and that has the lowest IP address. 2) How Version 2 Works

Special Issue

Page 25 of 69

ISSN 2229 5208

With WCCP Version 2, multiple routers can service a cluster. This allows any of the available routers in a service group to redirect packets to each of the Content Engines in the cluster. You can configure the router to run one of the following cache-related services: Web cacheA global service that sends content to a large collection of destination World Wide Web servers Reverse proxyA local service that sends content to a small number of destination World Wide Web servers Custom web cacheA service that permits routers to redirect HTTP traffic to Content Engines on a port other than port 80 Dynamic web serviceService in which port numbers 90 to 97 can be configured to redirect traffic to the Content Engine

The subset of Content Engines within a cluster and routers connected to the cluster that are running the same service is known as a service group. B. Internet Cache Protocol The Internet Cache Protocol is a protocol used for coordinating web caches. Its purpose is to find out the most appropriate location to retrieve a requested object from in the situation where multiple caches are in use at a single site. The goal is to use the caches as efficiently as possible, and to minimize the number of remote requests to the originating server. Hierarchically, a queried cache can either be a parent or a sibling. Parents usually sit closer to the internet connection than the child. If a child cache cannot find an object, the query usually will be sent to the parent cache, which will fetch, cache, and pass on the request. Siblings are caches of equal hierarchical status, whose purpose is to distribute the load amongst the siblings. When a request comes into one cache in a cluster of siblings, ICP is used to query the siblings for the object being requested. If the sibling has the object, it will usually be transferred from there, instead of being queried from the original server. This is often called a near miss, the object was not found in the cache but it was loaded from a nearby cache, instead of from a remote server. The ICP protocol was designed to be lightweight in order to minimize round-trip time between caches. It is intended for unreliable but quick connections.

International Journal of Computer Information Systems, Vol. 3, No. 3, 2011 C. Hash-based Query Caching Method In hash-based query caching method, the hash function is used not to determine to which cache server to send an HTTP request message, but to determine to which cache server to send a query message. In HQCM, Web objects cached on other servers can be found using just one query message, assuming that each server caches the following types of data. (A) Web objects and their URLs. (B) URLs of objects queried by other cache servers and the names of cache servers from which query messages were sent. Cache data (A) is the same as that used in conventional cache servers, while cache data (B) is the query history used in this method and in our original query caching method. For any URL cached in data (B), the cache server knows which cache servers hold the object because a cache server must get the object from another cache server or from the originating Web server after it has queried them. When a cache server is queried, it answers that it holds the object itself if it is found in data (A) or that other cache servers hold the object if a query is found in data (B). In this way, when a cache server queries another cache server, it can discover which servers have the object. The procedure for doing this is as follows. Step 1: When a client requests an object from a local cache server, the server checks cache data (A). If it finds the requested URL, it transfers the object to the client and the procedure ends. Step 2: If the local cache server is allocated hash space containing the requested URL and finds the requested URL in cache data (B), it downloads the object from a cache server that previously requested the URL. Then it caches the object and transfers it to the client. This ends the procedure. Step 3: The local cache server calculates the hash value of the URL and sends a query message to a sibling server whose set contains the hash value. Case 1 If the sibling server bas the requested URL only in cache data (A), it notifies the local server that it is the only sibling server holding the object. Case 2 If the sibling server has the URL only in cache data (B), it notifies the local server of the name(s) of the cache server(s) that has (have) the object. Case 3 If the sibling server has the URL in both cache data (A) and (B), it notifies the local server of the names of the cache servers (including itself) that have the object. Case 4 If the sibling server has neither data (A) nor data (B), it notifies the local server that none of the cache servers have the object. The local cache server downloads the object with its URL from the closed server having the object or from the originating Web server. It then caches the object and transfers it to the client. Step 4: The sibling server queried by the local server caches the URL and the name of the querying server in data (B), and the procedure ends. This prevents the distributed cache server system as a whole from deteriorating in performance if a particular server fails or becomes overloaded. Furthermore, this method

Special Issue

Page 26 of 69

ISSN 2229 5208

separates the cache objects from their location information, permitting several cache servers to hold the same object. Hence, each cache server can hold the most popular objects. Thus, when cache servers are dispersed out in a wide area network, the amount of cache data transmitted between servers can be less than in hash routing. D. Hypertext Cache Protocol (HTCP) HTCP, a protocol for discovering HTTP caches and cached data, managing sets of HTTP caches, and monitoring cache activity. This is an experimental protocol, one among several proposals to perform these functions. Hypertext Caching Protocol (HTCP) which permits full request and response headers to be used in cache management, and expands the domain of cache management to include monitoring a remote cache's additions and deletions, requesting immediate deletions, and sending hints about web objects such as the third party locations of cacheable objects or the measure uncacheability or unavailability of web objects. a) All multi-octet HTCP protocol elements are transmitted in network byte order. All RESERVED fields should be set to binary zero by senders and left unexamined by receivers. b) Any hostnames specified should be compatible between sender and receiver, such that if a private naming scheme is in use, names depending on such schemes will only be sent to HTCP neighbors who are known to participate in said schemes. Raw addresses are universal, as are public DNS names. Use of private names or addresses will require special operational care. c) HTCP messages may be sent as UDP data grams, or over TCP Connections. UDP must be supported. HTCP agents must not be isolated from NETWORK failures and delays. An HTCP agent should be prepared to act in useful ways when no response is forthcoming, or when responses are delayed or reordered or damaged. TCP is optional and is expected to be used only for protocol debugging. d) A set of configuration variables concerning transport characteristics should be maintained for each agent who is capable of initiating HTCP transactions, perhaps with a set of per-agent global defaults. These variables are: Maximum number of unacknowledged transactions before a "failure" is imputed. Maximum interval without a response to some transaction before a failure" is imputed. Minimum interval before trying a new transaction after a failure. IV. CACHE ALGORITHMS

International Journal of Computer Information Systems, Vol. 3, No. 3, 2011 the algorithm must choose which items to discard to make room for the new ones. The "hit rate" of a cache describes how often a searchedfor item is actually found in the cache. More efficient replacement policies keep track of more usage information in order to improve the hit rate. The "latency" of a cache describes how long after requesting a desired item the cache can return that item. Faster replacement strategies typically keep track of less usage information or, in the case of direct-mapped cache, no information to reduce the amount of time required to update that information. Each replacement strategy is a compromise between hit rate and latency. Beladys Algorithm The most efficient caching algorithm would be to always discard the information that will not be needed for the longest time in the future. This optimal result is referred to as Belady's optimal algorithm or the clairvoyant algorithm. Since it is generally impossible to predict how far in the future information will be needed, this is generally not implementable in practice. The practical minimum can be calculated only after experimentation, and one can compare the effectiveness of the actually chosen cache algorithm with the optimal minimum. This algorithm that works as follows: when a page needs to be swapped in, the operating system swaps out the page whose next use will occur farthest in the future. For example, a page that is not going to be used for the next 6 seconds will be swapped out over a page that is going to be used within the next 0.4 seconds. This algorithm cannot be implemented in the general purpose operating system because it is impossible to compute reliably how long it will be before a page is going to be used, except when all software that will run on a system is either known beforehand and is amenable to the static analysis of its memory reference patterns, or only a class of applications allowing run-time analysis is allowed. Despite this limitation, algorithms exist that can offer near-optimal performance the operating system keeps track of all pages referenced by the program, and it uses those data to decide which pages to swap in and out on subsequent runs. This algorithm can offer nearoptimal performance, but not on the first run of a program, and only if the program's memory reference pattern is relatively consistent each time it runs. A. B. Least Recently Used Least Recently Used (LRU) discards the least recently used items first. This algorithm requires keeping track of what was used when, which is expensive if one wants to make sure the algorithm always discards the least recently used item. General implementations of this technique require keeping age bits for cache-lines and tracking the "Least Recently Used" cache-line based on age-bits. In such implementation, every time a cache-line is used, the age of all other cache-lines changes. The least recently used page (LRU) replacement algorithm, though similar in name to NRU, differs in the fact

In computing, cache algorithms are optimizing instructions or algorithms that a computer program or a hardware-maintained structure can follow to manage a cache of information stored on the computer. When the cache is full,

Special Issue

Page 27 of 69

ISSN 2229 5208

that LRU keeps track of page usage over a short period of time, while NRU just looks at the usage in the last clock interval. LRU works on the idea that pages that have been most heavily used in the past few instructions are most likely to be used heavily in the next few instructions too. While LRU can provide near-optimal performance in theory it is rather expensive to implement in practice. There are a few implementation methods for this algorithm that try to reduce the cost yet keep as much of the performance as possible. The most expensive method is the linked list method, which uses a linked list containing all the pages in memory. At the back of this list is the least recently used page, and at the front is the most recently used page. The cost of this implementation lies in the fact that items in the list will have to be moved about every memory reference, which is a very time-consuming process. Another method that requires hardware support is as follows: suppose the hardware has a 64-bit counter that is incremented at every instruction. Whenever a page is accessed, it gains a value equal to the counter at the time of page access. Whenever a page needs to be replaced, the operating system selects the page with the lowest counter and swaps it out. With present hardware, this is not feasible because the required hardware counters do not exist. Because of implementation costs, one may consider algorithms that are similar to LRU, but which offer cheaper implementations. One important advantage of the LRU algorithm is that it is amenable to full statistical analysis. It has been proven, for example, that LRU can never result in more than N-times more page faults than OPT algorithm, where N is proportional to the number of pages in the managed pool. On the other hand, LRU's weakness is that its performance tends to degenerate under many quite common reference patterns. For example, if there are N pages in the LRU pool, an application executing a loop over array of N + 1 pages will cause a page fault on each and every access. As loops over large arrays are common, much effort has been put into modifying LRU to work better in such situations. Many of the proposed LRU modifications try to detect looping reference patterns and to switch into suitable replacement algorithm, like Most Recently used (MRU). C. Not recently used The not recently used (NRU) page replacement algorithm is an algorithm that favors keeping pages in memory that have been recently used. This algorithm works on the following principle: when a page is referenced, a referenced bit is set for that page, marking it as referenced. Similarly, when a page is modified (written to), a modified bit is set. The setting of the bits is usually done by the hardware, although it is possible to do so on the software level as well. Only pages referenced within the current clock interval are marked with a referenced bit. When a page needs to be replaced, the operating system divides the pages into four classes: Class 0: not referenced, not modified

International Journal of Computer Information Systems, Vol. 3, No. 3, 2011 Class 1: not referenced, modified Class 2: referenced, not modified Class 3: referenced, modified

Although it does not seem possible for a page to be not referenced yet modified, this happens when a class 3 page has its referenced bit cleared by the clock interrupt. The NRU algorithm picks a random page from the lowest category for removal. Note that this algorithm implies that a referenced page is more. D. Segmented LRU An SLRU cache is divided into two segments. a probationary segment and a protected segment. Lines in each segment are ordered from the most to the least recently accessed. Data from misses is added to the cache at the most recently accessed end of the probationary segment. Hits are removed from wherever they currently reside and added to the most recently accessed end of the protected segment. Lines in the protected segment have thus been accessed at least twice. The protected segment is finite. So migration of a line from the probationary segment to the protected segment may force the migration of the LRU line in the protected segment to the most recently used (MRU) end of the probationary segment. Giving this line another chance to be accessed before being replaced. The size limit on the protected segment is an SLRU parameter that varies according to the I/O workload patterns. Whenever data must be discarded from the cache, lines are obtained from the LRU end of the probationary segment.[3] E. Most Recently Used In contrast to LRU, the most recently used items first. According to [1] "When a file is being repeatedly scanned in a [Looping Sequential] reference pattern, MRU is the best replacement algorithm" In [2] the authors also point out that for random access patterns and repeated scans over large datasets (sometimes known as cyclic access patterns) MRU cache algorithms have more hits than LRU due to their tendency to retain older data. MRU algorithms are most useful in situations where the older an item is the more likely it is to be accessed. F. Multi Queue Caching Algorithm Multi Queue (MQ) caching algorithm:[5] (by Y. Zhou J.F. Philbin and Kai Li). Other things to consider: Items with different cost: keep items that are expensive to obtain, e.g. those that take a long time to get. Items taking up more cache: If items have different sizes, the cache may want to discard a large item to store several smaller ones.

Items that expire with time: Some caches keep information that expires (e.g. a news cache, a DNS cache, or a web

Special Issue

Page 28 of 69

ISSN 2229 5208

browser cache). The computer may discard items because they are expired. Depending on the size of the cache no further caching algorithm to discard items may be necessary. Items with different cost: keep items that are expensive to obtain, e.g. those that take a long time to get. Items taking up more cache: If items have different sizes, the cache may want to discard a large item to store several smaller ones. Items that expire with time: Some caches keep information that expires (e.g. a news cache, a DNS cache, or a web browser cache). The computer may discard items because they are expired. Depending on the size of the cache no further caching algorithm to discard items may be necessary. V. CONCLUSION

International Journal of Computer Information Systems, Vol. 3, No. 3, 2011 AUTHORS PROFILE
Gulista Khan born in india on September 30,1985. Shri Krishan Institute of Engineering And Technology, Kurukshetra in 2006.. She completed post graduatiuon from MMEC ,Mullana, Ambala(Haryana) in 2009. She is having experience of more than 4.8 years as lecturer in Haryana Engineering college.. Presently working as a Assistant Professor in Teerthankar Mahaveer University,Moradabad(U.P). Wajid Ali was born on Feb. 20, 1985. After completing, Bachelor of Technology in the field of Computer Engineering from Acharya Institute of Management And Technology 2009, He did his Masters in Technology in the field of Information Technology from Karnataka University Persuing M.tech in computer science Institute of Foreign Trade & Management University[IFTMU].Presently he is doing job as lecturer in Hindustan Institute of Technology and Management. Rachit Kumar Gupta was born on Oct. 04, 1985. After completing, Bachelor of Computer Application from Teerthanker Mahaveer Institute of Management & Technology, Moradabad 2005, He did his Masters of Computer Application from Institute of Foreign Trade & Management, Moradabad in 2008, presently, he is working as Software Developer in Teerthanker Mahaveer University, Moradabad, U.P. (India).

Web service becomes more and more popular, users are suffering network congestion and server overloading. Great efforts have been made to improve Web performance. Web caching is recognized to be one of the effective techniques to alleviate server bottleneck and reduce network traffic, thereby minimize the user access latency. In this paper, I give some protocols like WCCP, ICP ,hash-based query algorithm to reduce the solves the routing of the request to the proxy server in an efficient and fast way to get the maximum hit ratio and fast responses(low latency time) . By surveying previous works on Web caching, we notice that there are still some desirable properties Web caching such as fast access, proxy placement, cache routing, dynamic data caching, fault tolerance, security, etc. The research frontier in Web performance improvement lies in developing efficient, scalable, robust, adaptive, and stable Web caching scheme that can be easily deployed in current and future network. Further we can improve performance by adding page replacement algorithm, and efficient utilization of different protocols defined in this paper. REFERENCES
[1] Lecture Notes by Douglas W. Jones 1995 ^ 2006fall:notes:lec11 [CS111] ^ Characterization of Web reference behavior revisited: Evidence for Dichotomized Cache management 22C:116, Notes, Sept. 8, 1995 Abraham Silberschatz, Peter Baer Galvin, Greg Gagne. Operating Systems Concepts (Seventh Edition).: Wiley 2005. p. 339. VMS Help Andrew S. Tanenbaum. Modern Operating Systems (Second Edition). pp. 218 (4.4.5). 2001. "CLOCK-Pro: An Effective Improvement of the CLOCK Replacement" by Song Jiang, Feng Chen, and Xiaodong Zhang, 2005 "WSCLOCKa simple and effective algorithm for virtual memory management" by Richard W. Carr and John L. Hennessy, 1981 "WSClock" by Allan Gottlieb "Page Replacement Algorithms" by Andrew S. Tanenbaum 2002

[2] [3] [4] [5]

Special Issue

Page 29 of 69

ISSN 2229 5208

S-ar putea să vă placă și