First, suggest you have a look at the presentation Bela Ban and I did at JBoss World 2008, which gets into this and other topics you've recently asked about: http://jbossworld.com/downloads/pdf/wednesday/JBOSS_1-150pm_ClusterTuning_Bela_Ban.pdf .
The basic answer to your question is the more servers you need to send a message to, the less well TCP will do, since a server has to send n messages to communicate with n peers, while UDP just sends one. A TCP-based stack works fine for smaller clusters (4-6 or less), and if you use buddy replication you're not sending messages to all peers, so TCP can be suitable even with a bigger cluster.
Note that if you use a TCP-based stack, you either need to list all hosts in the TCPPING protocol's initial_hosts parameter, or you should replace TCPPING with the MPING protocol, which uses UDP multicast for group discovery.
Ok thanks Brian.
My instinct is to go with the default configuration - UDP. And I also understand from your comments why this configuration will be the best for most cases.
The reason I ask is that about 3 years ago (before my time) it was reported that with our app (then using I think JBOSS 2.x) running Windows 2000 that when using UDP for JGroups some app servers would periodically hang while booting. This behavior was intermittent but when they hung there were error messages in the JGroups logs. I don't believe the root cause was ever discovered and so the decision was made to move to a TCP based configuration using the Gossip Router. This apparently stopped the 'hang during boot' behavior but we never understood the original problem.
Since then we have read MS articles saying that Windows networking using multi-homed machines (which our app servers are) can have trouble when talking UDP. MS have a patch for this and we will try that.
My question : have you guys at JBOSS ever heard of problem clustering JBOSS using UDP under Windows? If so, any details (especially resolution steps) you may have come across would be most welcome.
We are now planning to start using full blown JBOSS clustering (session replication, tree cache) etc and I would like to be able to use UDP for all networking configurations.
The one thing I've heard about with Windows is some sort of conflict if you use Network Load Balancer (which is also UDP based). But I don't really know any details; IIRC there was a forum post about a possible conflict, but it didn't really get into specifics.
I've certainly done plenty of UDP clustering of multi-homed Windows machines. If you run the AS clustering testsuite, it deploys two AS instances on the same box and clusters them to run tests. On Windows only way to do that is to multihome the machine.
I am using UDP for clustering. My question is what are the port range for udpPort and udpHttpPort.
JAVA_OPTS="$JAVA_OPTS -Djboss.partition.name=iqueacluster -Djboss.partition.udpGroup=22.214.171.124 -Djboss.partition.udpPort=66666 -Djboss.partition.udpHttpPort=77777 -Dprogram.name=$PROGNAME"
From the above examle, I am using port 66666 and port 77777. However the file /proc/sys/net/ipv4/ip_local_port_range has this value:
Do I need to adjust the above port to between port 32768 and 61000? If I do that, how come jboss port 8080 and 80 are working?