1

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.

1 Answers1

3

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.

EightBitTony
  • 9,311
  • 1
  • 34
  • 46