web proxy caching

22
Web Proxy Caching Web Proxy Caching By Miquel Company By Miquel Company

Upload: zeno

Post on 23-Jan-2016

77 views

Category:

Documents


0 download

DESCRIPTION

Web Proxy Caching. By Miquel Company. Contents. Basics of Proxy Caching Cache Consistency Proxy Cache Cooperation. Benefits of using Proxies. Dangers of using Proxies. Commercialized sofware. Basics of Web Proxy Caching. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Web Proxy Caching

Web Proxy CachingWeb Proxy Caching

By Miquel CompanyBy Miquel Company

Page 2: Web Proxy Caching

Miquel Company RMiquel Company Rodriguezodriguez

T110.456 Next Generation CellulaT110.456 Next Generation Cellular Networksr Networks

22

ContentsContents

Basics of Proxy CachingBasics of Proxy Caching Cache ConsistencyCache Consistency Proxy Cache Cooperation.Proxy Cache Cooperation. Benefits of using Proxies.Benefits of using Proxies. Dangers of using Proxies.Dangers of using Proxies. Commercialized sofware.Commercialized sofware.

Page 3: Web Proxy Caching

Miquel Company RMiquel Company Rodriguezodriguez

T110.456 Next Generation CellulaT110.456 Next Generation Cellular Networksr Networks

33

Basics of Web Proxy Basics of Web Proxy Caching.Caching.

Definition: A Definition: A Web cacheWeb cache sits between one or more Web sits between one or more Web servers (also known as servers (also known as origin serversorigin servers) and a client or ) 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.

Page 4: Web Proxy Caching

Miquel Company RMiquel Company Rodriguezodriguez

T110.456 Next Generation CellulaT110.456 Next Generation Cellular Networksr Networks

44

Basics of Web Proxy Basics of Web Proxy 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 used by a client.the amount of bandwith used by a client.

Page 5: Web Proxy Caching

Miquel Company RMiquel Company Rodriguezodriguez

T110.456 Next Generation CellulaT110.456 Next Generation Cellular Networksr Networks

55

Basics of Web Proxy Basics of Web Proxy Caching.Caching.

How does it work:How does it work: Without Proxy:Without Proxy:

Page 6: Web Proxy Caching

Miquel Company RMiquel Company Rodriguezodriguez

T110.456 Next Generation CellulaT110.456 Next Generation Cellular Networksr Networks

66

Basics of Web Proxy Basics of Web Proxy Caching.Caching.

How it works?How it works?

Page 7: Web Proxy Caching

Miquel Company RMiquel Company Rodriguezodriguez

T110.456 Next Generation CellulaT110.456 Next Generation Cellular Networksr Networks

77

Basics of Web Proxy Basics of Web Proxy 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 object in the cache. If it is inside the cache we’ve got a HitHit. . 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 server If the object is in the cache but it is not valid, the proxy server 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 cached object is the same on the origin server. If it is the proxy sends the object to the client. If it is not, the proxy downloads sends the object to the client. If it is not, the proxy downloads the object from the server.the object from the server.

If the object asked by the client is not cached then we’ve got a If the object asked by the client is not cached then we’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.

Page 8: Web Proxy Caching

Miquel Company RMiquel Company Rodriguezodriguez

T110.456 Next Generation CellulaT110.456 Next Generation Cellular Networksr Networks

88

Cache ConsistencyCache 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.

Page 9: Web Proxy Caching

Miquel Company RMiquel Company Rodriguezodriguez

T110.456 Next Generation CellulaT110.456 Next Generation Cellular Networksr Networks

99

Cache ConsistencyCache Consistency

Inconsistence problems:Inconsistence problems: Waste of HDD space: It’s better to use the HDD Waste of HDD space: It’s better to use the HDD

space for Up-date copies than to Out-dated copies.space for Up-date copies than to Out-dated copies. Out-dated objects: The client gets wrong information Out-dated objects: The client gets wrong information

and may get angry.and may get angry. Waste of trafic: If we don´t keep the copies the Waste of trafic: If we don´t keep the copies the

proxy has to look for them everytime the client proxy has to look for them everytime the client demands it.demands it.

Having an Inconsistent cache is useless.Having an Inconsistent cache is useless.

Page 10: Web Proxy Caching

Miquel Company RMiquel Company Rodriguezodriguez

T110.456 Next Generation CellulaT110.456 Next Generation Cellular Networksr Networks

1010

Cache consistencyCache 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’s TTL: The TTL depends Defining document’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.

Page 11: Web Proxy Caching

Miquel Company RMiquel Company Rodriguezodriguez

T110.456 Next Generation CellulaT110.456 Next Generation Cellular Networksr Networks

1111

Cache ConsistencyCache 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 doesn´t save to much bandwith.It doesn´t save to much bandwith. All the objects requested in hard consistency All the objects requested in hard consistency

are ,for sure, up-to-dated objects. are ,for sure, up-to-dated objects.

Page 12: Web Proxy Caching

Miquel Company RMiquel Company Rodriguezodriguez

T110.456 Next Generation CellulaT110.456 Next Generation Cellular Networksr Networks

1212

Proxy Cache CooperationProxy Cache Cooperation

Several servers can form a server hierarchy:Several servers can form a server hierarchy: Parent servers: They’re on top of the hierarchy, they Parent servers: 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 they don’t have the requested object ask their parents, or to the original server.parents, or to the original server.

Siblings: If the original cache don’t have a copy of Siblings: If the original cache don’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 siblings (brothers) and if they don’t have the requested object then the proxy ask to his parents.requested object then the proxy ask to his parents.

Page 13: Web Proxy Caching

Miquel Company RMiquel Company Rodriguezodriguez

T110.456 Next Generation CellulaT110.456 Next Generation Cellular Networksr Networks

1313

Proxy cache cooperationProxy cache cooperation

Page 14: Web Proxy Caching

Miquel Company RMiquel Company Rodriguezodriguez

T110.456 Next Generation CellulaT110.456 Next Generation Cellular Networksr Networks

1414

Proxy cache cooperationProxy cache cooperation

Problems:Problems: Cache hierarchies can yield successive Cache hierarchies can yield successive

reductions in network traffic, but there is a reductions in network traffic, but there is a cost in replication of disk storage. When a cost in replication of disk storage. When a request is passwd up a branch the returning request is passwd up a branch the returning response is likely to be saved by each cache response is likely to be saved by each cache it passes though.it passes though.

Worst latency: You have to check in several Worst latency: You have to check in several servers if they have the object saved. servers if they have the object saved. Less Less time than looking for the original object.time than looking for the original object.

Page 15: Web Proxy Caching

Miquel Company RMiquel Company Rodriguezodriguez

T110.456 Next Generation CellulaT110.456 Next Generation Cellular Networksr Networks

1515

Benefits of using Proxies:Benefits of using Proxies:

Reduces traffic bandwith: More clients Reduces traffic bandwith: More clients using the same bandwith, than without using the same bandwith, than without using proxy.using proxy.

Reduces latency: The client gets the Reduces latency: The client gets the requested object sooner than going to requested object sooner than going to look for it outside the LAN.look for it outside the LAN.

Improves network security: All the Improves network security: All the requests passes through the same point.requests passes through the same point.

Page 16: Web Proxy Caching

Miquel Company RMiquel Company Rodriguezodriguez

T110.456 Next Generation CellulaT110.456 Next Generation Cellular Networksr Networks

1616

Dangers of using proxies.Dangers of using proxies.

Ok, proxies save Ok, proxies save traffic bandwith, traffic bandwith, reduces latency, and increases Network reduces latency, and increases Network securitysecurity, but:, but: You can get out-to-date contentYou can get out-to-date content More difficult to code web-sites. More More difficult to code web-sites. More

difficult to configure web-servers.difficult to configure web-servers. Lost of privacy for the client: You can keep a Lost of privacy for the client: You can keep a

logfile in the proxy server telling which logfile in the proxy server telling which objects have you looked for.objects have you looked for.

Page 17: Web Proxy Caching

Miquel Company RMiquel Company Rodriguezodriguez

T110.456 Next Generation CellulaT110.456 Next Generation Cellular Networksr Networks

1717

Actual Proxy Servers:Actual Proxy Servers:

Squid: The most widely used. The better working and the free Squid: The most widely used. The better working and the free one.one.http://www.squid-cache.orghttp://www.squid-cache.org//

Microsoft ISA Server 2004 : Microsoft developed ISA to replace Microsoft ISA Server 2004 : Microsoft developed ISA to replace Microsoft proxy server. It’s fully functional with Active DirectoryMicrosoft proxy server. It’s fully functional with Active Directoryhttp://www.microsoft.com/http://www.microsoft.com/isaserverisaserver//

Apache: Apache web server has a module to do reverse caching Apache: Apache web server has a module to do reverse caching (experimental).(experimental).http://httpd.apache.org/docs-2.0/mod/mod_cache.htmlhttp://httpd.apache.org/docs-2.0/mod/mod_cache.html

Cisco Cache Engine: sits next to (mostly) Cisco routers and Cisco Cache Engine: sits next to (mostly) Cisco routers and receives transparently redirected HTTP requests receives transparently redirected HTTP requests http://www.cisco.com/warp/public/cc/pd/cxsr/500/index.shtmlhttp://www.cisco.com/warp/public/cc/pd/cxsr/500/index.shtml

CERN/W3C HTTPd: It was the original proxy server.CERN/W3C HTTPd: It was the original proxy server.http://www.w3.org/hypertext/WWW/Daemon/Status.htmlhttp://www.w3.org/hypertext/WWW/Daemon/Status.html

Page 18: Web Proxy Caching

Miquel Company RMiquel Company Rodriguezodriguez

T110.456 Next Generation CellulaT110.456 Next Generation Cellular Networksr Networks

1818

Real Life Example:Real Life Example:

Cesca: Supercomputing center of Cesca: Supercomputing center of Catalonia. The have the parent proxy Catalonia. The have the parent proxy cache that gives support to all catalonian cache that gives support to all catalonian universities.universities.

Cesca Proxy server is the parent server Cesca Proxy server is the parent server of several campus, like UPC’s Campus of several campus, like UPC’s Campus Nord, or UB’s Zona Universitaria.Nord, or UB’s Zona Universitaria.

Page 19: Web Proxy Caching

Miquel Company RMiquel Company Rodriguezodriguez

T110.456 Next Generation CellulaT110.456 Next Generation Cellular Networksr Networks

1919

Real Life Example:Real Life Example:

Page 20: Web Proxy Caching

Miquel Company RMiquel Company Rodriguezodriguez

T110.456 Next Generation CellulaT110.456 Next Generation Cellular Networksr Networks

2020

Real Life Example:Real Life Example:

Page 21: Web Proxy Caching

Miquel Company RMiquel Company Rodriguezodriguez

T110.456 Next Generation CellulaT110.456 Next Generation Cellular Networksr Networks

2121

Real Life Example:Real Life Example:

Page 22: Web Proxy Caching

Miquel Company RMiquel Company Rodriguezodriguez

T110.456 Next Generation CellulaT110.456 Next Generation Cellular Networksr Networks

2222

Real Life Example:Real Life Example: