JGroupsPING

Definition

 

Initial (dirty) discovery of members. Used to detect the coordinator (oldest member), either by mcasting PING requests to an IP MCAST address or connecting to a GossipRouter.

 

Each member responds with a packet {C, A}, where C=coordinator's address and A=own address. After  milliseconds or  replies, the joiner determines the coordinator from the responses, and sends a JOIN request to it (handled by GMS). If nobody responds, we assume we are the first member of a group.

 

Unlike TCPPING, PING employs dynamic discovery, meaning that the member does not have to know in advance where other group memebers are.

 

Configuration Example

 

Configuration example for IP MULTICAST.

 

    <PING timeout="3000" num_initial_members="3" ></PING>

 

 

Configuration Parameters

NameDescription
break_on_coord_rspReturn from the discovery phase as soon as we have 1 coordinator response
discovery_timeoutTime (in ms) to wait for our own discovery message to be received. 0 means don't wait. If the discovery message is not received within discovery_timeout ms, a warning will be logged
idGive the protocol a different ID if needed so we can have multiple instances of it in the same stack
levelSets the logger level (see javadocs)
nameGive the protocol a different name if needed so we can have multiple instances of it in the same stack
num_initial_membersMinimum number of initial members to get a response from. Default is 2
num_initial_srv_membersMinimum number of server responses (PingData.isServer()=true). If this value is greater than 0, we'll ignore num_initial_members
num_ping_requestsNumber of discovery requests to be sent distributed over timeout. Default is 2
return_entire_cacheWhether or not to return the entire logical-physical address cache mappings on a discovery request, or not. Default is false, except for TCPPING
statsDetermines whether to collect statistics (and expose them via JMX). Default is true
timeoutTimeout to wait for the initial members. Default is 3000 msec

 

 

See also Protocol Configuration Common Parameters.

 

 

Back To JGroups