3 Replies Latest reply: Apr 12, 2012 7:07 PM by Radoslav Husar RSS

Which is most suitable (TCP or UDP) for JBoss JGroup

Roshan Pradeep Newbie

Hi All

 

I am currently using JBoss EAP 5.1.1 in production and having two node cluster setup there. For the JGroup I am using UDP and had some problems with UDP couple of days back. The UDP packets are getting loss and under a heavy load (should be a network issue), sometimes cluster broken and won't build again. So in that case we need to re-start the cluster nodes to build the cluster again.

 

I am in the process of chaning the JGroup to use TCP, but before that I want to know which protocol is most suitable for JGroup.

 

Thanks.

  • 1. Re: Which is most suitable (TCP or UDP) for JBoss JGroup
    Wolf-Dieter Fink Master

    JGroups will work with TCP and UDP, both are suitable. It is just a different implementation.

     

    I prefere multicast UDP (default) because it will be less administration and all cluster members are detected automaticaly.

    But sometimes you might have issues that avoid multicast (e.g. firewalls network hardware) and you have no influence to the network topologie,

    or  stability problems like you have.

    In this case you might switch to TCP and configure the cluster members to ensure a stable cluster.

     

    But in case of network stability I would recommend to look after that first because you might have also different other problems in this case.

     

    BTW if you use a EAP version you should use your subscription support

  • 2. Re: Which is most suitable (TCP or UDP) for JBoss JGroup
    Roshan Pradeep Newbie

    Thanks for your explanation.

  • 3. Re: Which is most suitable (TCP or UDP) for JBoss JGroup
    Radoslav Husar Master

    But sometimes you might have issues that avoid multicast (e.g. firewalls network hardware) and you have no influence to the network topologie,

    You can still use UDP multicast for members discovery but use TCP for actual group communication. :-)

     

    PS: Roshan, when you ask which is "most suitable", the default is typically what we recommend (and that is UDP), bud it surely varies with different requirements.

     

    R