I have HTTPS based webservices (not REST, rather old code). I am generating Java client stubs using Axis & using that to call the webservices. There are around 20 different APIs on the webservice.
I have 2 servers hosting the webservices (identical - 2 servers are being used for redundancy) and data is synced between the 2 servers - so that same API called either server produces the same result).
I do not have hardware or software load balancers or clusters.
So I am planning to implement the failover & loadbalancing in code (the failover is important, it's OK even if I don't do load balancing).
I was planning to do this in code i.e if I get a connect exception, I will trap the exception and do the same Webservice call on the other server.
I was wondering if there are any known design patterns for this or any pitfalls I should be aware of.