0 Replies Latest reply on Nov 15, 2008 9:06 AM by Brian Stansberry

    Use of the loopback=

    Brian Stansberry Master

      Had an interesting discussion with Bela Ban earlier in the week about the advantages of the JGroups "loopback" attribute; thought I'd share what I learned.

      See http://www.jboss.org/community/docs/DOC-10920 for basic background on what "loopback" is.

      In the protocol stack configs for JBoss 5, I had this set to "true" mostly because of some cases where users who had network configuration problems that prevented multicast were reporting cryptic FLUSH problems when it was "false". A "true" setting didn't allow the channel to work properly, but avoided the hard-to-understand FLUSH problems. We were discussing whether the proposed diagnostic logging improvements in https://jira.jboss.org/jira/browse/JGRP-857 would allow me to switch back to a "false" setting. Bela had seen some improvements in message throughput with loopback="false", so I thought a false setting might be a better default. Here's the discussion:

      [Mon Nov 10 2008 10:02:58] Brian Stansberry: ok, so when 857 ends up in AS, I think I'll change loopback back to false
      [Mon Nov 10 2008 10:03:13] Bela Ban: Good for perf, but...
      [Mon Nov 10 2008 10:03:58] … when the interface goes down, e.g. by ifconfig ethX down, or pulling the plug, *multicast* messages sent to self will not be received
      [Mon Nov 10 2008 10:04:21] … Including SUSPECT messages, so a member will never exclude another member if loopback="false"
      [Mon Nov 10 2008 10:05:13] … I have to think a little more about what to do there
      [Mon Nov 10 2008 10:05:26] Brian Stansberry: ok, so you recommend leaving loopback="true" as a default?
      [Mon Nov 10 2008 10:05:34] Bela Ban: For example adding a flag that says use a loopback if possible, which overrides the XML settings
      [Mon Nov 10 2008 10:05:39] … Yes, for now
      [Mon Nov 10 2008 10:05:54] … You know 150MB/sec/node minus 20% is not so bad... :-)
      [Mon Nov 10 2008 10:06:16] … For example, a SUSPECT multicast could be sent with this flag set
      [Mon Nov 10 2008 10:06:17] Brian Stansberry: ok, good
      [Mon Nov 10 2008 10:06:45] Bela Ban: Or a VIEW, or anything that's not sent a lot
      [Mon Nov 10 2008 10:07:13] Brian Stansberry: that makes sense
      [Mon Nov 10 2008 10:07:43] Bela Ban: But I don't just want to add flags at random, I want to think about a generic way of providing message-specific flags

      This discussion applies to JGroups 2.7.0 beta1 and earlier releases; if you are using a release later than that the improvements Bela mentions may be in place, in which case a loopback="false" setting may be more appropriate. (I don't expect the improvement Bela mentions in 2.7.0; probably a later release.)