Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

InetAddress IP Caching - Good or Evil?  RSS feed

 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My application calls web services provided by a partner system using URL, HTTPUrlConnect, etc. Yesterday this partner failed over to a backup server. They do this by changing the DNS entry to point to a new IP address. Unfortunately, the InetAddress class caches IP addresses so we did not pick up the change, and kept trying to hit the dead server.

The docs say caching helps avoid DNS spoofing. My system and the partners are all on a private internal network, so I'm not to worried about that. I think.

There is a system property that controls caching. We could set a cache "time to live" property to 0 meaning "never cache".

Anybody know if this is a good idea?

BTW: We're on JRE 1.3.1 in WebSphere 5.02.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!