WildFly JGroups Subsystem Configuration: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
 
(14 intermediate revisions by the same user not shown)
Line 2: Line 2:
<br>
<br>
<br><center><font color=red>Migrating from https://home.feodorov.com:9443/wiki/Wiki.jsp?page=JBoss7JGroups</font></center>
<br><center><font color=red>Migrating from https://home.feodorov.com:9443/wiki/Wiki.jsp?page=JBoss7JGroups</font></center>
 
<br>
<br>
=Internal=
=Internal=


* [[WildFly JGroups Subsystem#Subjects|WildFly JGroups Subsystem]]
* [[WildFly JGroups Subsystem#Subjects|WildFly JGroups Subsystem]]
* [[Infinispan Configuration]]


=Relevance=
=Relevance=
Line 64: Line 66:
=Default Values=
=Default Values=


=Configuring a New Protocol Attribute=
JGroups stack configuration values are applied from, in this order:
 
1. <tt>standalone*.xml</tt>/<tt>domain.xml</tt>.
 
2. The ProtocolDefaultsService (implemented by <tt>org.jboss.as.clustering.jgroups.subsystem.ProtocolDefaultsService</tt>, part of <tt>jboss-as-clustering-jgroups-*.jar</tt>) which is initialized at startup with values from the file <tt>jgroups-defaults.xml</tt> embedded in the root of <tt>$JBOSS_HOME/modules/system/layers/base/org/jboss/as/clustering/jgroups/main/jboss-as-clustering-jgroups-*.jar</tt> or the respective overlay, if the installation was patched.
 
3. JGroups code defaults.
 
=Configuring a New Protocol or Transport Attribute or Overriding Default Values=
 
In case we need to override defaults or specify new properties at the transport level or at the protocol level, specify new sub-elements in <transport> and <protocol> as follows:
 
<pre>
<subsystem xmlns="urn:jboss:domain:jgroups:1.1" ...>
    <stack name="udp">
        <transport type="UDP" socket-binding="jgroups-udp">
            <property name="thread_pool.max_threads">301</property>
        </transport>
        ...
    </stack>
</subsystem>
</pre>
 
<pre>
<protocol type="PING">
    <property name=”timeout”>20000</property>
<protocol/>
</pre>
 
A list of possible configuration attributes can be obtained from <tt>jgroups-defaults.xml</tt> embedded with <tt>$JBOSS_HOME/modules/system/layers/base/org/jboss/as/clustering/jgroups/main/jboss-as-clustering-jgroups-*.jar</tt>. A sample is provided here:
 
<blockquote style="background-color: #f9f9f9; border: solid thin lightgrey;">
:[[jgroups-defaults.xml]]
</blockquote>


=TCP-based Configuration=
=TCP-based Configuration=
Line 71: Line 106:
:[[WildFly Clustering without Multicast]]
:[[WildFly Clustering without Multicast]]
</blockquote>
</blockquote>
=CLI Command to Configure TCPPING initial_hosts Value=
<font color=red>TODO: relocate.</font>
<pre>
/subsystem=jgroups/stack=tcp/protocol=TCPPING/property=initial_hosts:write-attribute(name="value", value="node1[7600], node2[7600],node3[7600]")
reload
</pre>

Latest revision as of 22:09, 21 August 2016




Migrating from https://home.feodorov.com:9443/wiki/Wiki.jsp?page=JBoss7JGroups



Internal

Relevance

  • EAP 6.4

Subjects

Overview

The JGroups stacks are defined within the "jgroups" subsystem:

        <subsystem xmlns="urn:jboss:domain:jgroups:1.1" default-stack="udp">
            <stack name="udp">
                <transport type="UDP" socket-binding="jgroups-udp"/>
                <protocol type="PING"/>
                <protocol type="MERGE3"/>
                <protocol type="FD_SOCK" socket-binding="jgroups-udp-fd"/>
                <protocol type="FD"/>
                <protocol type="VERIFY_SUSPECT"/>
                <protocol type="pbcast.NAKACK"/>
                <protocol type="UNICAST2"/>
                <protocol type="pbcast.STABLE"/>
                <protocol type="pbcast.GMS"/>
                <protocol type="UFC"/>
                <protocol type="MFC"/>
                <protocol type="FRAG2"/>
                <protocol type="RSVP"/>
            </stack>
            <stack name="tcp">
                <transport type="TCP" socket-binding="jgroups-tcp"/>
                <protocol type="MPING" socket-binding="jgroups-mping"/>
                <protocol type="MERGE2"/>
                <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>
                <protocol type="FD"/>
                <protocol type="VERIFY_SUSPECT"/>
                <protocol type="pbcast.NAKACK"/>
                <protocol type="UNICAST2"/>
                <protocol type="pbcast.STABLE"/>
                <protocol type="pbcast.GMS"/>
                <protocol type="UFC"/>
                <protocol type="MFC"/>
                <protocol type="FRAG2"/>
                <protocol type="RSVP"/>
            </stack>
        </subsystem>

Subsystem Configuration Schema

WildFly Configuration Schemas

Default Values

JGroups stack configuration values are applied from, in this order:

1. standalone*.xml/domain.xml.

2. The ProtocolDefaultsService (implemented by org.jboss.as.clustering.jgroups.subsystem.ProtocolDefaultsService, part of jboss-as-clustering-jgroups-*.jar) which is initialized at startup with values from the file jgroups-defaults.xml embedded in the root of $JBOSS_HOME/modules/system/layers/base/org/jboss/as/clustering/jgroups/main/jboss-as-clustering-jgroups-*.jar or the respective overlay, if the installation was patched.

3. JGroups code defaults.

Configuring a New Protocol or Transport Attribute or Overriding Default Values

In case we need to override defaults or specify new properties at the transport level or at the protocol level, specify new sub-elements in <transport> and <protocol> as follows:

<subsystem xmlns="urn:jboss:domain:jgroups:1.1" ...>
    <stack name="udp">
        <transport type="UDP" socket-binding="jgroups-udp">
            <property name="thread_pool.max_threads">301</property>
        </transport>
        ...
    </stack>
</subsystem>
<protocol type="PING">
    <property name=”timeout”>20000</property>
<protocol/>

A list of possible configuration attributes can be obtained from jgroups-defaults.xml embedded with $JBOSS_HOME/modules/system/layers/base/org/jboss/as/clustering/jgroups/main/jboss-as-clustering-jgroups-*.jar. A sample is provided here:

jgroups-defaults.xml

TCP-based Configuration

WildFly Clustering without Multicast

CLI Command to Configure TCPPING initial_hosts Value

TODO: relocate.

/subsystem=jgroups/stack=tcp/protocol=TCPPING/property=initial_hosts:write-attribute(name="value", value="node1[7600], node2[7600],node3[7600]")
reload