I'm looking at using the Upstream Blocks functionality to provide failover (perhaps balancing, if useful) for two existing Tomcat servers which can't (for contractual reasons) be migrated to Nginx.
My two Tomcat servers run on port 80, are hardware separated with their own IP's (same subnet, VLAn etc). I've been using Terrecotta to cluster them, but have received a directive to move away from this. This looks straightforward enough to do with Nginx in the example shown in the Upstream Blocks section of Nedelcu's book with a separate server. That isn't an option for me, Nginx would have to live on one or both of the boxes which already run Tomcat. Clearly that bit is possible given the two technologies run alongside one another in a reverse proxy configuration, but what I'm struggling with is, how would I use Nginx to balance/failover to the multiple tomcats without an additional box? A mirrored Nginx on both existing Tomcat servers? Is that pointless?
Thanks in advance for any wisdom that can be imparted!