I've tried to implement a high availability service with JBoss and Apache.
The architecture is:
Apache
| |
| |
JBoss1 JBoss2
There is a balancer implemented from Apache to the JBoss'es, and it's working fine. Sometimes the request is taken by JBoss1, and sometimes by JBoss2, however if some Jboss goes down, the balancer still sends requests to it, so the application sometimes works and sometimes doesn't.
How can I implement a service which detects that if some JBoss is down, it automatically redirects the traffic to the other node?
I tried with hearbeat, but I can't solve it.