![]() |
Squid: one site too slow, cache problem also
Dear members,
We have two squid servers (2.5.STABLE12), first on RHEL 4 and other on FreeBSD 6.1 Users are connected to Squid Servers, and Squid Servers are connected to Gateway. My problem is that our own website.. say mysite.com is coming very slow, every user is complaining. If we try to access our site by changing our PCs gateway to bypass squid, then its working very fine. We also needs to block any caching of our website. No page/images should be cached of our website at all because its a dynamic site and we need to view latest contents quickly after uploads. Here is my squid.conf (from bsd squid, though both are identical), I request you to please have a look and advice: Code:
http_port 3128 |
Quote:
If it is internal-site-specific, it probably a nameserving problem and nameserving is incorrectly configured on the squid machines (e.g., nameserving is configured correctly somewhere else in the system, but the machines with squid are configured to use a nameservice which is not present and then the squid machines wait until the 'bad' nameservice times out before using the 'good' nameservice). Quote:
If you need a work-around, because for some reason you can't/won't write the code correctly, you can probably force squid not to cache specific sites, you can set 'no proxy'in the browser for specific sites or you can force refreshes from the browser. But, as I say, these are work-arounds for not doing the coding correctly and are not the preferred solution (IMHO). |
Thanks a lot for your kind reply.
The site is hosted somewhere else and what users are complaining repeatedly is that they uploaded the new contents but their browser is displaying old one (probably from cache) and sometimes it display fine. I need a solution to be sure that squid should get latest/updated contents or do not cache this particular website at all. I have added new acl (as per config written in my first post) and inserted a new "no_cache deny acl" to avoid caching the site. I can also see from squid access logs that all hits of that site are "DIRECT" but still users sometimes see old contents (but always fine if we bypass squid). About Delay, it might be DNS issue. Can you plz suggest that what is a good solution for this? should I start DNS service in squid server itself OR point it to nearest DNS server? Thanks in advance... |
Quote:
As I previously commented, you can write html to instruct the browser and squid not to cache the page, so with corectly written html this shouldn't be an issue. In my experience, squid, at least, respects these no caching instructions. But that's only with correctly written html.... And it may be that some browsers have behaviour that violates the html standards. I have no real experience with this specific aspect of how browsers perform, but, somehow, when I was writing that the word "Microsoft" kept coming into my mind. I suppose once you get a reputation as an abuser of standards, people may jump to the conclusion that its is your fault (just because it usually is)... Ho, hum. Quote:
Quote:
So you need to use the standard tools (dig primarily) to look at your nameserving performance and you need to look at your host file and nsswitch to check that you don't have the order of usage of nameservices wrong (the most usual error seems to be to have a non-existant or unconfigured service first in the list; it then tries to use this services; it times out when that services doesn't respond and only then uses the 'good' services - as you can imagine, this really slows every name look up). As 'internal' (to your own network) hosts are often dealt with differently from hosts out on the wider internet, that might be a pointer to where a misconfiguration might lie, particularly if this site was once hosted internally and has been moved. |
put internal ip
So to solve the problem: Enter your local (internal) IP adress at the http_port option in your squid.conf, like this:
Code: http_port 192.168.1.1:3128 |
| All times are GMT -5. The time now is 02:47 PM. |