LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   DNS, Bind and Apache (https://www.linuxquestions.org/questions/linux-general-1/dns-bind-and-apache-3761/)

nabil 06-27-2001 07:03 PM

DNS, Bind and Apache
 
What makes a web site fetch behaviour seem or behave like this...
If you do for example "www.redhat.com" and look in bottom left hand corner of Internet explorer browser ( I know I am ashamed) to see "Finding site www.redhat.com" then the page comes right up quick with out warning, and other times, sites sometimes they say "Web site found waiting for reply" for a second or so then pages come up quick too. Does this have to to do with DNS, Apache version, performance issue or......what ??

I used to have external dns for my site hosted by external provider and it used to do the "Web site found waiting for reply.." kind of thing and now I host my own dns using bind on same web server and don't get that any more, only " Finding site www......" kind of thing . As a matter fact I don't see this " Waiting for reply..." thing any more or often on different web sites...
Did anything or major change happen in Apache or Bind or something
Just need to know whether this is a performance issue??? DNS issue or just a broweser bound behaviour... I know I have upgraded my browser on my client machines since.

THanks for any comments...

jrmann1999 06-27-2001 10:19 PM

Heh, ironically I've wondered this too. The answer(as I've seen it) is that all modern browsers have their own version of a DNS cache. When you open a browser session and start looking up sites, it translates these into their IP addresses and stores them in browser cache. This is based upon a reliance that you will eventually visit them again. Next time it needs to look up that address it realizes the IP is already verified and decides to try it. IF in fact this IP isn't valid(Dynamic IP's) it will then contact whichever DNS it can to verify it.

IE is special in the fact that if DNS can't find it, it will then go to a custom search site on MSN that might know where it is.

J

mcleodnine 06-28-2001 01:04 AM

The short answer - if your name server and web server are on the machine you are using or in the same domain that the zone is authoritative for it does not have to look far for the answer for a local http request. If you are looking up a name that is not cached on your nameserver, the resolver must hunt up the food chain to find the IP.

An Example:
Our local ISP had some serious name server issues (among other problems) so we set up our own on the cheap. It's not as fast as their caching name server, but it works all the time. Plus it is not as affected by peak (prime time) loads that the ISPs name server is subjected to (there are only 10 clients max). So we wait up to two or three seconds for uncached names all the time (cached names go BANG!), while the ISP - who keeps a larger cache due to the sheer number of lookups it does, will be faster (BANG!) until the server is overwhelmed by requests and becomes seriously bogged. (HEY - that wasn't a very short answer.)


It kinda goes like this. (Extremely simplified version. Please do not attmept to create your own international communications network based upon this model)

You type in the (valid) URL...

Your computer asks for name resolution from your local resolver which should point it to the DNS server you are using. Now we're waiting on the name server response.
Code:

Looking up www.redhat.com
Then if it finds the authoritative name server for that URL it makes an http_request from the server for that address. Now we wait for the http server to give us some stuff.
Code:

Contacting host www.redhat.com...
Then it 'gets' the data from the web server. In this case it's wherever www.redhat.com/index.html or whatever start page they default to.
Code:

Transferring data from www.redhat.com
Then it waits on doubleclick.net to load the banner ads. :)

All this is ignoring the likely possibility of forwarding firewalls and load-balanced servers.

Try this: go to a web site that you have not been to in at least a week and see how fast it resoolves (Looking up...). Then reload the page. BANG. Close your browser. and reopen it. Go to that same page. BANG.

nabil 06-28-2001 05:23 PM

SO the answer If I understood everything you guys said correctly has to do with a chached name server vs unchached name server ??Right. I know I have mine setup as cached on same box as the web server, but still I do access my web site from another machine located on another network. I kind of liked what it used to do, when the red hour glass will come on then the page will come up, The red hour glass acts as a quick indication that the site is UP...Just need to wait a second to connect to it VS now If site is down or up you will get the samething whether the site will come up or not.
To me it feels before was faster than now to fetch the site. I also noticed this when using a Windows 2000 server DNS name server....
If you goto www.google.com it will give you the red hour glass no matter how many times you hit the site, but mine will only say "Opening page http://....." if site has problems it will get stock on that until it times out.


All times are GMT -5. The time now is 12:56 AM.