Web Proxy Web Proxy Caching Caching Caching Web Proxy Web Proxy Caching By Miquel Company Company By Miquel
Contents Contents Contents Contents � Basics � Basics of of Proxy Proxy Caching Caching � Cache � Cache Consistency Consistency � Proxy � Proxy Cache Cache Cooperation Cooperation. . � Benefits � Benefits of of using using Proxies Proxies. . � Dangers � Dangers of of using using Proxies Proxies. . � Commercialized � Commercialized sofware sofware. . Miquel Company T110.456 Next Generation 2 Miquel Company T110.456 Next Generation 2 Rodriguez Rodriguez Cellular Networks Cellular Networks
Basics of Basics of of Web Proxy Web Proxy Web Proxy Basics Basics of Web Proxy Caching. Caching . Caching Caching � Definition: A � Definition: A Web cache Web cache sits between one or more Web sits between one or more Web servers (also known as origin servers ) and a client or servers (also known as origin servers ) and a client or many clients, and watches requests come by, saving many clients, and watches requests come by, saving copies of the responses for itself. Then, if there is copies of the responses for itself. Then, if there is another request for the same URL, it can use the another request for the same URL, it can use the response that it has, instead of asking the origin server response that it has, instead of asking the origin server for it again. for it again. Miquel Company T110.456 Next Generation 3 Miquel Company T110.456 Next Generation 3 Rodriguez Rodriguez Cellular Networks Cellular Networks
Basics of Basics of of Web Proxy Web Proxy Web Proxy Basics Basics of Web Proxy Caching Caching. . Caching Caching � Why use them? � Why use them? � To reduce latency: Because the request is � To reduce latency: Because the request is satisfied from the client instead of the origin satisfied from the client instead of the origin server, it takes less time for the client to get server, it takes less time for the client to get the object. the object. � To reduce traffic: Because each object is � To reduce traffic: Because each object is only gotten once from the server, it reduces only gotten once from the server, it reduces the amount of bandwith bandwith used by a client. used by a client. the amount of Miquel Company T110.456 Next Generation 4 Miquel Company T110.456 Next Generation 4 Rodriguez Rodriguez Cellular Networks Cellular Networks
Basics Basics of of of Web Proxy Web Proxy Web Proxy Basics Basics of Web Proxy Caching. Caching . Caching Caching � How does it work: � How does it work: � Without Proxy: � Without Proxy: Miquel Company T110.456 Next Generation 5 Miquel Company T110.456 Next Generation 5 Rodriguez Rodriguez Cellular Networks Cellular Networks
Basics of Basics of Web Proxy of Web Proxy Web Proxy Basics Basics of Web Proxy Caching Caching. . Caching Caching � How it works? � How it works? Miquel Company T110.456 Next Generation 6 Miquel Company T110.456 Next Generation 6 Rodriguez Rodriguez Cellular Networks Cellular Networks
Basics Basics of of Web Proxy of Web Proxy Web Proxy Basics Basics of Web Proxy Caching. Caching . Caching Caching � How it works?: � How it works?: � When a client asks for an object, the proxy server looks for the � When a client asks for an object, the proxy server looks for the object in the cache. If it is inside the cache we’ ’ve got a ve got a Hit Hit . . object in the cache. If it is inside the cache we And then de proxy returns the cached object to the client. And then de proxy returns the cached object to the client. � If the object is in the cache but it is not valid, the proxy ser � If the object is in the cache but it is not valid, the proxy server ver asks for the object to the origin server, and checks if the asks for the object to the origin server, and checks if the cached object is the same on the origin server. If it is the proxy xy cached object is the same on the origin server. If it is the pro sends the object to the client. If it is not, the proxy downloads s sends the object to the client. If it is not, the proxy download the object from the server. the object from the server. � If the object asked by the client is not cached then we � If the object asked by the client is not cached then we’ ’ve got a ve got a Miss, and the proxy cache has to look for it on the outside Miss, and the proxy cache has to look for it on the outside internet. internet. Miquel Company T110.456 Next Generation 7 Miquel Company T110.456 Next Generation 7 Rodriguez Rodriguez Cellular Networks Cellular Networks
Cache Consistency Cache Consistency Cache Consistency Cache Consistency � What is consistency?: If the original � What is consistency?: If the original object changes after the cache had save object changes after the cache had save a copy then the copies immediately a copy then the copies immediately become out of date. become out of date. The consistency tries to have all the The consistency tries to have all the stored copies up to date. stored copies up to date. Miquel Company T110.456 Next Generation 8 Miquel Company T110.456 Next Generation 8 Rodriguez Rodriguez Cellular Networks Cellular Networks
Cache Consistency Cache Consistency Cache Consistency Cache Consistency � Inconsistence problems: � Inconsistence problems: � Waste of HDD space: It � Waste of HDD space: It’ ’s better to use the HDD s better to use the HDD space for Up- -date copies than to Out date copies than to Out- -dated copies. dated copies. space for Up � Out � Out- -dated objects: The client gets wrong information dated objects: The client gets wrong information and may get angry. and may get angry. � Waste of � Waste of trafic trafic: If we : If we don don´ ´t t keep the copies the keep the copies the proxy has to look for them everytime everytime the client the client proxy has to look for them demands it. demands it. � Having an Inconsistent cache is useless. � Having an Inconsistent cache is useless. Miquel Company T110.456 Next Generation 9 Miquel Company T110.456 Next Generation 9 Rodriguez Rodriguez Cellular Networks Cellular Networks
Cache consistency Cache consistency Cache consistency Cache consistency � Different ways of having a consistent � Different ways of having a consistent cache: (soft consistency) cache: (soft consistency) � Checking the staleness of an object at � Checking the staleness of an object at regular time intervals. regular time intervals. � Defining document � Defining document’ ’s TTL: The TTL depends s TTL: The TTL depends on the time the object changes. on the time the object changes. � More changing objects => More the cache � More changing objects => More the cache refreshes the object. refreshes the object. � Less changing objects => The cache refreshes � Less changing objects => The cache refreshes the object less times. the object less times. Miquel Company T110.456 Next Generation 10 Miquel Company T110.456 Next Generation 10 Rodriguez Rodriguez Cellular Networks Cellular Networks
Cache Consistency Cache Consistency Cache Consistency Cache Consistency � Different ways of having a consistent � Different ways of having a consistent cache: (hard consistency). cache: (hard consistency). � The proxy checks the staleness of the object � The proxy checks the staleness of the object each time the object is requested. each time the object is requested. � It � It doesn doesn´ ´t t save to much save to much bandwith bandwith. . � All the objects requested in hard consistency � All the objects requested in hard consistency are ,for sure, up- -to to- -dated objects. dated objects. are ,for sure, up Miquel Company T110.456 Next Generation 11 Miquel Company T110.456 Next Generation 11 Rodriguez Rodriguez Cellular Networks Cellular Networks
Proxy Proxy Cache Cache Cooperation Cache Cooperation Cooperation Proxy Proxy Cache Cooperation � Several servers can form a server hierarchy: � Several servers can form a server hierarchy: � Parent servers: They � Parent servers: They’ ’re on top of the hierarchy, they re on top of the hierarchy, they receive petitions of local servers (children). And if receive petitions of local servers (children). And if they don’ ’t have the requested object ask their t have the requested object ask their they don parents, or to the original server. parents, or to the original server. � Siblings: If the original cache don � Siblings: If the original cache don’ ’t have a copy of t have a copy of the requested object it sends a request to their the requested object it sends a request to their siblings (brothers) and if they don’ ’t have the t have the siblings (brothers) and if they don requested object then the proxy ask to his parents. requested object then the proxy ask to his parents. Miquel Company T110.456 Next Generation 12 Miquel Company T110.456 Next Generation 12 Rodriguez Rodriguez Cellular Networks Cellular Networks
Proxy cache cooperation Proxy cache cooperation Proxy cache cooperation Proxy cache cooperation Miquel Company T110.456 Next Generation 13 Miquel Company T110.456 Next Generation 13 Rodriguez Rodriguez Cellular Networks Cellular Networks
Recommend
More recommend