You are missing the load balancer. What you are doing right now is sending requests to individual servers. What you really want to do is send your requests to a load balancer and let it decide to which app server instance to forward the request.
You are correct in that you can use load balancing without clustering - each app server could work on its own. However, for clustering to work, you need a single point of entry that distributes the load among the cluster - it is this "distributer" that understand the layout of the cluster and provides a single point of entry to the cluster to the clients. And it is this distributor that handles the situation of a server going down and automatically routes traffic to the running servers.
The other possibility is that each client needs to be aware of the cluster and automatically route requests to another server in the cluster if the originally selected server is non responding. In your example, the client that used http://node1_addr:8080, on seeing that node1_addr was down should then try node2_addr. (I recall doing something like this many years ago with a load test client that I wrote.)
Thomas Chang
Ranch Hand
Joined: May 13, 2008
Posts: 58
posted
0
Hello Peter,
I think you should be one of the authors of the book "jboss in action"? I read the Chapter 12.2.2 "Creating a clustered EJB" and wrote the program. I can test the program locally, that means I start the JBoss locally on my PC and deploy the ejbonto this Jboss. But later as I deployed the ejb to a remote JBoss AS on the LINUX machine and try to run the Client against the remote ejb, I got following errors, though I've set the 'java.naming.provider.url' with the remote IP.
What could e the reason?
This message was edited 1 time. Last update was at by Thomas Chang