How can I reduce the discovery traffic?

For complex systems, discovery may take a big percentage of the available bandwidth in the network when some of the hosts are rebooted. There are several options that help reducing the impact of discovery in these systems:

1) Reduce the size of discovery packets

You can configure the middleware to not send the TypeCode/TypeObject in the following cases: 

  1. You are not using Dynamic Data.
  2. In case you use any of our services, if you can define the types statically using XML. For more information regarding this scenario, you can check the KB: How to use Services without sending TypeCode/TypeObject.

2) Disable preemptive Heartbeats and NACKs

Each participant manages one channel with each of the other participants; this channel is used to keep the participant’s liveliness. This channel is reliable and uses heartbeats and NACKs. You can reduce the network usage by disabling preemptive heartbeats and NACKs in this channel. For example, use the following settings in the QoS: 

    <name> dds.participant.inter_participant_data_reader.protocol.disable_preemptive_nack </name> 
    <value> 1 </value> 
    <name> dds.participant.inter_participant_data_writer.protocol.disable_preemptive_heartbeat </name> 
    <value> 1 </value> 

Note: Please take into account these properties only affect the liveliness channel. There are other channels that also send preemptive heartbeats and ACKNACKs that will continue sending them. 

3) Reduce the number of initial announcements

When a participant is enabled, by default it sends five announcements. You can reduce the number of initial announcements and the period between them with the following properties from the Discovery_config QoS: 

  1. initial_participant_announcements
  2. min_initial_participant_announcement_period
  3. max_initial_participant_announcement_period 

You can find further explanations about those QoS settings in the documentation.

4) Modify Participant's Liveliness configuration

The participant liveliness period can be increased with the property participant_liveliness_assert_period. If this property is increased, the property participant_liveliness_lease_duration must also be increased accordingly. 

5) Use Multicast discovery when possible

The usage of Unicast discovery with a large Max Participant Id can have a huge effect on bandwidth. If Multicast is available in the network, it is recommended to use it.