Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I must admit, I'm a software engineer and this stuff is not really one of my areas of expertise.

I have a Web Application in .NET 4 which connects to various web services hosted on the same machine. We call these web services using publicly accessible domains which in turn point to the same machine.

The question is, will I gain some performance improvements if on my server machine I point these domains to 127.0.0.1?

The way I see it, this way, I can at least skip the domain lookup. But as I already said, this is not one of my areas of expertise and I was wondering if someone could shed some light on this.

For those interested, I am using Windows Server 2008 R2 but I doubt it really matters as I think this can apply to any other OS.

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

DNS entries are (usually) cached, so although initial lookups can take a second or so, subsequent lookups (if within a short duration) should be quick.

The answer depends on how often your code tries to do name resolution, and how long the entries are being cached by your resolver library or the OS.

i.e. if your web application makes one connection every second and always does name resolution and is always forced to send a DNS request due to expired TTL's (time to live), then yes, removing that will give you a performance benefit.

However, if your application connects once every 5 minutes and most of the time gets a cached response, you probably won't notice any change.

share|improve this answer
    
Thank you for a very detailed answer :) I'm sorry I can't give you an upvote but I still haven't any reputation. I've always been a lurker :p –  Christopher Demicoli Jun 17 '11 at 23:45
add comment

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.