Frank,
Don't know about vendors with pre-built components to do this, but it
shouldn't be all that hard to write.
If it's a user app, it's not too hard to put a wrapper around the
connection that checks the servers. Problems with this would include
firewalls blocking the servers, determining how to tell if the server
can connect, and the timeout on deciding if the connection isn't going
to happen. This of course wouldn't take server load into account.
The best (software) way to do it is to have a Java "load balancer"
running on a machine where the servers are, and your app only connects
to that machine. The load balancer accepts connections, picks the
destination server, connects to it, then ties the two connections
together. The app never knows any different. If it's critical, a
failover load balancer on another machine could be added, and the app
checks it if the first fails. The load balancer should run on a timer
that checks servers and, ideally, gets a load reading. You could keep
the list sorted by load, or just do a min() check on the list to find
the least used server. If the checks all turn up bad, deal with it
accordingly. I personally would want to have the sysadmin contacted
even if one server were down(for a certain period of time). I saw
something like this in Java Pro or JDJ magazine recently, so you may
want to visit the bookstore or go online and do a search. Try a search
on "redirector" - for some reason that's sticking out in my mind.
Another way of doing it is the load balancer instead of tying
connections together just responds back to the app with the address of
the server to use, then the app turns around and goes directly to that
server. But still the load balancer can check the servers on the server
side and deal with it there instead of the app having to do it.
A hardware load balancer would be your absolute best bet if there's
budget for it, esp if it's a HTTP-based app.
Good luck, and let me know what you end up doing (for curiosity's sake).
-----------------------------------------
"Frank D. Greco" wrote:
>
> Someone asked us to build infrastructure for a Java application that
> allows a application to make several attempts to connect to a
> list of servers (round-robin). If the application fails on a
> connection, it tries the next server. If no server on the list is
> available, the application is supposed to send email/page to
> an administrator.
>
> I feel that this type of software should be part of the network
> infrastructure and not in the application layer. Besides if a
> family of servers are down, an email/pager message storm would be
> unleashed.
>
> Does anyone know if a vendor has existing software (other than an app
> server) that does this type of thing?
>
> Thanks,
>
> Frank G.
> +======================================================================+
> | Crossroads Technologies Inc, 55 Broad Street, 28th Fl, NYC, NY 10004 |
> | Java Wireless Application Engineering |
> | Email: [EMAIL PROTECTED] Web: www.CrossroadsTech.com |
> | Pager: 800-495-6244 ePager: [EMAIL PROTECTED] |
> | Voice: 212-482-5280 x229 Fax: 212-482-5281 |
> +======================================================================+
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html