While we are on the subject of named...

A. Khattri ajai
Tue Nov 15 22:44:59 PST 2005


On Wed, 16 Nov 2005, Chong Yu Meng wrote:

> I have a couple of questions, but first, let me setup the scenario. I've
> got one co-located server that I am trying to use for
> mail/DNS/web/application. I've got only 1 IP address. I have "A" record
> for "www" and CNAME for "apps". Both "apps" and "www" are name-based
> virtual servers. Here's my problem:
>
> For "apps", I have to do some re-direction to a different location on my
> filesystem. This re-direction takes a very, very long time, sometimes up
> to 3 minutes to load a page. For "www", which uses no re-direction, the
> page loads very fast.

Why redirect?

Ive used name virtual hosts to do this without any redirection.

> My question: what is the difference between an "A" record and a "CNAME"
> record, and could this be the reason why it takes so long to load the
> page? CPU and memory utilization do not change significantly, and when I
> do a "tail -f" of the Apache log file, it sometimes shows that a request
> has been processed, but nothing shows up on my browser.

A CNAME is like an alias while an A record is the "real" record.

Often you will see something like this in a BIND zone file:

domain.com		IN	A	1.2.3.4
www.domain.com		IN	CNAME	domain.com
ftp.domain.com		IN	CNAME	domain.com
webmail.domain.com	IN	CNAME	domain.com

(So www., ftp., and webmail. are just aliases to domain.com)

However, Im puzzled has to why a DNS redirect would cause a page to take
three minutes to load - that makes no sense unless something is screwy in
the DNS setup.

Ive used both regular IP-based virthosts and name-based virthosts and not
seen any difference in performance between them.


-- 



More information about the Linux-users mailing list