I think in terms of requests i. The data received in reply is incoming, of course. Others think in the opposite sense of "a request for incoming data". An accelerator caches incoming requests for outgoing data i. It takes load away from your HTTP server and internal network. You move the server away from port 80 or whatever your published port is , and substitute the accelerator, which then pulls the HTTP data from the "real" HTTP server only the accelerator needs to know where the real server is.
The outside world sees no difference apart from an increase in speed, with luck. Quite apart from taking the load of a site's normal web server, accelerators can also sit outside firewalls or other network bottlenecks and talk to HTTP servers inside, reducing traffic across the bottleneck and simplifying the configuration.
Two or more accelerators communicating via ICP can increase the speed and resilience of a web service to any single failure. The Squid redirector can make one accelerator act as a single front-end for multiple servers. If you need to move parts of your filesystem from one server to another, or if separately administered HTTP servers should logically appear under a single URL hierarchy, the accelerator makes the right thing happen.
If you wish only to cache the "rest of the world" to improve local users browsing performance, then accelerator mode is irrelevant. Sites which own and publish a URL hierarchy use an accelerator to improve access to it from the Internet. Sites wishing to improve their local users' access to other sites' URLs use proxy caches. Squid will cache web pages only if the HTTP headers sent out by your web application tell it to do so.
If you want Squid to cache your pages, you can set an Expires header with a date in the future, but the recommended way is to use s-maxage :. This tells Squid to cache the page for seconds s-maxage , and at the same time it tells the user's browser not to cache the page max-age - double-caching can lead to some unexpected results! Of course, this header is useless if you send out one of the non-caching headers Expires in the past, Set-Cookie , etc. Some user-agents don't understand gzip compression, so they should get the uncompressed version.
Next we make a backup of the original squid. Although this is pretty much to read, you should definitely take the time to study it! This is standard stuff. Make sure you adjust the hostname and IP address, if necessary. I've added some commented out lines that show how you can configure Squid to not log certain requests in its access log and how to tell it to not cache certain URLs.
This configuration assumes that all your users are seeing the same, i. If you have logged-in users that should not see cached content, read on - I'll come to that in a moment chapter 5.
0コメント