Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am working on a project in which one master communicates with numbers of slaves. For that it has to make connection with hosts in network. But sometimes it hangs.

I think that the reason behind is extra time consumption during Reverse DNS Lookup. So please tell me any command or script which checks or makes the list for the Reverse DNS Lookup time.

EDIT no. 1

Tell also that where can I add that command in rsh source code so that I got a list of time consumed by every request, whenever it connects to other hosts.

So that I can find the reason behind the hanging of server.

share|improve this question
Yes it does a reverse dns lookup. – devsda Feb 22 at 13:42
Can you tell where can I add this command in rsh source code, so that I can check, Reverse DNS lookup time, or, if I am wrong then correct me. Please. – devsda Feb 24 at 7:07
question edited... – devsda Feb 25 at 4:18
Actually my task is the same that I Edited. But my question is the approach that I thought. – devsda Feb 25 at 12:42

1 Answer

If you have doubts in Slow response in reverse query then you can try below method to rectify the same.

  • Method 1

if possible then disable reverse lookup in your application and see the difference

  • Method 2

You can use Name Service Cache Daemon (nscd) which also caches PTR but there is some Securities issue as :

The Name Service Cache Daemon (nscd) has a default behavior that
does not allow applications to validate DNS "PTR" records against
"A" records.

In particular, nscd caches a request for a "PTR" record, and when a request comes later for the "A" record, nscd simply divulges the
information from the cached "PTR" record, instead of querying the
authoritative DNS for the "A" record.

Reference Link

share|improve this answer
These are the lines from given links Important! If you are running a service that relies on forward/reverse lookup checks, don't do this!. – devsda Feb 26 at 5:02
But firstly I want to make a table of time consumed in Reverse DNS Lookup. Tell me how can I do this first. I want to analyse the delay first. Solve my problem. If this is the reason then I can apply your methods. – devsda Feb 26 at 5:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.