Continuing on JGroups
Message
[destination][headers] [payload]
Protocols
The protocols always are from the org.jgroups.protocolshot
<config xmlns="urn:org:jgroups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups.xsd">
<UDP
mcast_port="${jgroups.udp.mcast_port:45588}"
ip_ttl="4"
max_bundle_size="64K"
enable_diagnostics="true"
thread_pool.min_threads="2"
thread_pool.max_threads="8"
thread_pool.keep_alive_time="5000" />
<PING />
<MERGE3 max_interval="30000" min_interval="10000"/>
<FD_SOCK/>
<FD_ALL/>
<VERIFY_SUSPECT timeout="1500" />
<pbcast.NAKACK2 xmit_interval="500" />
<UNICAST3 xmit_interval="500" />
<pbcast.STABLE desired_avg_gossip="50000"
max_bytes="4M"/>
<pbcast.GMS print_local_addr="true" join_timeout="2000"/>
<UFC max_credits="2M"
min_threshold="0.4"/>
<MFC max_credits="2M"
min_threshold="0.4"/>
<FRAG2 frag_size="60K" />
</config>
UDP
mcast_port specifies the multicast port number. If omitted, the default is 45566
ip_ttl: time to live IP Multicast packets
PING
MERGE3
This service enables the node coordinators in partitions to put the cluster back again in case of failure and form a single cluster back again.
FD SOCK
Fail detection protocol based on sockets.
FD ALL
Failure detection protocol based on simple heartbeat protocol.
VERIFY_SUSPECT
pbcast.NAKACK2
Reliable delivery protocol: NAKACK protocol is used for multicast messages, which are numbered in a sequence. In case the receiver misses one message, he can ask to re-transmit it.
UNICAST3
Reliable delivery protocol: Unicast is not necessary in case of TCP.
pbcast.STABLE
Is responsible to calculate the stable messages (the ones delivered by members), then send <STABLE> events so then the GC can act (with the NAKACK) – the GC applies on the messages we are accumulating – regulated either by the <> or <>
• desired_avg_gossipspecifies intervals (in milliseconds) of garbage collection• max_bytesspecifies the maximum number of bytes received before the cluster
pbcast.GMS
Group membership protocol. Handles joins/leaves/crashes (suspicions) and emits new views accordingly.
UFC
Unified Flow Control protocol based on credit system in which sender has a limited amount implemented using protected java.util.Map<Address,FlowControl.Credit>
MFC
Another Flow Control protocol based on credit system in which sender has a limited amount but implemented using protected CreditMap
FRAG2
This protocol will fragment a message, on this case any that is larger than <60K>
Reading the Protocols
The reading is from top to down so the stack will be built from UDP to FRAG2 protocols (bottom up) and each protocol is implemented a independent Java class.
Complete list
-
- java.lang.Object
- org.jgroups.stack.Protocol
- java.lang.Object
-
-
- Direct Known Subclasses:
AUTH,BARRIER,CLEAR_FLAGS,COMPRESS,COUNTER,DAISYCHAIN,DELAY,DELIVERY_TIME,DISCARD,DISCARD_PAYLOAD,Discovery,DROP,DUPL,Encrypt,EXAMPLE,FailureDetection,FD,FD_HOST,FD_SOCK,FlowControl,FLUSH,FORK,ForkProtocol,FORWARD_TO_COORD,FRAG,FRAG2,FRAG3,GMS,HDRS,INJECT_VIEW,KeyExchange,Locking,MAKE_BATCH,MERGE3,NAKACK2,NAMING,PDC,PERF,ProtocolStack,RATE_LIMITER,RELAY,RELAY2,REVERSE,RSVP,SEQUENCER,SEQUENCER2,SERIALIZE,SHUFFLE,SIZE,SNIFF,STABLE,STATE_TRANSFER,STATS,STOMP,StreamingStateTransfer,TOA,TP,TRACE,UNICAST3,VERIFY_SUSPECT
-
REFs
Although very outdated, this guide comes in hand to understand it.

