Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

HTTPS connections to a resilient pair of web servers

818985May 27 2011 — edited May 31 2011
Hi,

We have a pair of resilient web servers on the internet each with their own separate IP address (two different locations, no shared infrastructure) representing the same web site and set of web services, all requiring https. DNS is configured to round robin the IP addresses, so that the first DNS lookup gives back addr1, addr2 A records then subsequently addr2, addr1 A records. The issue I have is when one web server goes down and how my java web service client code (based on JSSE because its https) behaves. If I browse with IE then it auto-retries if the downed web server is the first A record. Java doesn't appear to though. I suspect it just uses the first IP address returned by InetAddress.getAllByName(host). You can't simply try again because it only goes for the first address every time. Caching then causes issues because while that applciation instance is running every DNS query returns the same result. Is there any way of persuading jsse to try the next dns a record if the first one is a dud?

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 28 2011
Added on May 27 2011
2 comments
1,419 views