[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How a Proxy Cache works?

Posted on 2004-11-24
10
Medium Priority
?
220 Views
Last Modified: 2010-04-10
hi,

Proxies aim to improve the performance offered by the Web, providing end users with faster access to its resources.

my question is like when a webpage is accessed the contents of the page remains in the proxycache. when another user requests the same page it is given to the user from the cache. in case if the contents of the page is changing every time (like some thing i buy in www.ebay.de) in this case how it works.

any ideas welcome.
0
Comment
Question by:vihar123
  • 5
  • 3
  • 2
10 Comments
 

Author Comment

by:vihar123
ID: 12669468
hi,

from web search, i found some info regarding proxy cache.

there is a mechanism for the proxy to check with the remote site, before it gives you a copy it pulled earlier, to make sure the page  hasn't changed since.

but i didnot found ,how the above mechanism works .  :(

if any links/notes are appreciated.




0
 
LVL 17

Expert Comment

by:Jared Luker
ID: 12669523
I'm sure it depends on what software you are using for the caching.  My experiece is that you should be able to configure the proxy to check the requested page on the internet.  If the page has not been changed, then it issues the page from the cache to the requestor, otherwise, it recaches and then issues to the requestor.

Jared
0
 
LVL 5

Accepted Solution

by:
muhalok earned 1400 total points
ID: 12670087
Cache server vs content.

Content can be dynamic and static.
Static content - text, images, java scripts - those do not change, they are sitting on a Web Site and are serverd upon a request from client.
Dynamic content - pages that are generated by the Web Server upon a request - query, posting a form, etc.

There are 2 paramters for content that you can identify in IE cache for example: "Last Modified" and "Expires".
In case that "Last Modified" has no value - this is a file which is a dynamic content and if it has a value - its static.

"Expires" parameter is set in order to refresh the content after the time set in "expires" is reached.


Now about the Cache proxies:

1. Cache has 3 purposes:
- Decrease Bandwidth usage by bringing the content closer to the client (Browser).
- Serve the content faster
- Decrease load on the Web Servers.


2. Caching algorithms:

Static content is server from cache until "expires" point is reached.
In case that "expires" has no value - static content will not be ever refreshed.

When "expires" point is reached - proxy will forward the request from the browser to the Web Server with a message - is the content still valid? and if it will receive a positive answer from the Web Server - than the content will be downloaded from the Web Server, added to Cache and served to the client (Browser).
Otherwise - the content will be served from the Cache but "expires" will be updated.

Dynamic content is not cached - and it shouldn't . Lets make as an example : the content on the page is current Stocks numbers - you woulnd't want to get them from cache because they will be old news then.

There are some ways to cache dynamic content as well, while not serving an obsolete content: its called "selective caching". Proxy will scan every dynamic page passing through it and will interpret it into 2 parts: static (part of the page that is not changed) and dynamic - changing part. Usually "static" part of dynamic page is >> than the dynamic part. So its worth caching it.

In case you have more questiong - please ask.
0
 The Evil-ution of Network Security Threats

What are the hacks that forever changed the security industry? To answer that question, we created an exciting new eBook that takes you on a trip through hacking history. It explores the top hacks from the 80s to 2010s, why they mattered, and how the security industry responded.

 

Author Comment

by:vihar123
ID: 12670142
hi,

By configuring the proxy to check if the page is requested is changed or not. it takes the same time to redirect the request and get the page from the main server.

am i right..

can u provide me with some links which explains this mechanism.
0
 

Author Comment

by:vihar123
ID: 12670212
Hi muhalok,

thanx for ur explanation. i have some doubts u have given expires, for each and every request it check whether the pages expires r what?.r only if the page has the dynamic content it checks??.
0
 
LVL 17

Assisted Solution

by:Jared Luker
Jared Luker earned 600 total points
ID: 12670266
Timewise, it might be the same, but not bandwidth wise.  If it can keep from having to download the entire page from the graphics, scripts, text, etc, then that would be a huge bandwidth saver.

I think that it would save time though, because once it verifies that the information is the same, it can issue the cached page at 100mb/sec (the internal lan speed), instead of the speed that it would take to get the whole page from the host server.

Jared
0
 

Author Comment

by:vihar123
ID: 12670307
Hi,

can u help me in giving some links.
0
 
LVL 5

Expert Comment

by:muhalok
ID: 12670423
0
 

Author Comment

by:vihar123
ID: 12670733
one doubt

suppose if there is a page in the cache and if the page is changed in the mainserver the page in the cache is no more valid , what happens to that page it remains in cache and deleted after some time r the new page is replaced instead of old page.
0
 
LVL 5

Expert Comment

by:muhalok
ID: 12672295
the expired cache contents is replaced by any new content upon a request from the client , i.e. - when client sends for example an HTTP GET request for the content - it will send it with "If-Modified-Since <Time of download>" to the server and this request of course will be forwarded to the Server by Cache Proxy. In case that content is not modified - Server answers with HTTP 304 - Not Modified, else - server answers with HTTP 200 OK and sends the new content - which is cached and replaces the old files.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is a collection of issues that people face from time to time and possible solutions to those issues. I hope you enjoy reading it.
During and after that shift to cloud, one area that still poses a struggle for many organizations is what to do with their department file shares.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question