Hi, 2016-05-23 18:56 GMT+09:00 Hans-Joachim Kliemeck < hans-joachim.kliem...@hays.de>:
> Hey, > > > If you do not set the LocalMember, > > the implementation class of local members will become MemberImpl rather > than the StaticMember. > > In addition, you can not explicitly specify the domain and the uniqueId > of local member. > > If you do not mind these, there is no problem if you do not set > LocalMember. > > According to the configuration example, it is possible to set the > uniqueid/domain. Could you clarify your statement? > https://tomcat.apache.org/tomcat-7.0-doc/config/cluster-interceptor.html > > <Interceptor > className="org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor"> > <LocalMember > className="org.apache.catalina.tribes.membership.StaticMember" > port="4000" > securePort="-1" > host="tomcat01.mydomain.com" > domain="staging-cluster" > uniqueId="{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1}"/> > <Member > className="org.apache.catalina.tribes.membership.StaticMember" > port="5678" > securePort="-1" > host="tomcat01.mydomain.com" > domain="staging-cluster" > uniqueId="{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}"/> > </Interceptor> > > > If you explicitly define the <LocalMember> in server.xml, You can define the domain and uniqueId. (As in the above example) If you do not define a <LocalMember> in server.xml, the local member is automatically generated by the multicast service. (This multicast service is available even if you use a static cluster) The domain of this local member is used the domain that is defined by multicast service. The uniqueId is automatically generated in multicast service. > > The heartbeat is chained. > > > Container->Cluster->channel->Interceptor(TcpPingInterceptor)->ChannelSender > > When using a static membership, TcpPingInterceptor does the nodes > failure detection. > > Therefore, when using a static membership, TcpPingInterceptor is > required. > I understand the concept of this chain, but I want to understand WHY there > are these 3 points to enable the heartbeat instead of a central one? > I don’t see a reason to send the heartbeat on different levels of the > chain. > > Usually, The heartbeat is controlled by the Channel#heartbeat only. If you want to do the heartbeat, you set true to Channel#heartbeat. If you do not want to do the heartbeat, you set false to Channel#heartbeat. Cluster#heartbeatBackgroundEnabled is set to true only if you want to do a heartbeat by the container background thread . The default is false If heartbeatBackgroundEnabled is true, Channel # heartbeat is forced to false. The useThread is set to true only if you want to send a PING in a different period than the heartbeat of the channel. > Regards > Hajo > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- > Keiichi.Fujino > <users-h...@tomcat.apache.org> > <users-h...@tomcat.apache.org> >