The RTI Developer Blog

Optimizing DDS Discovery: Choosing the Right Discovery Protocol for Your DDS Application

Written by Jesus Lopez | November 18, 2026

Imagine you want to order a coffee. Would you tell the barista your full name, home address, date of birth, or occupation? Would you send a certified letter to your family merely to inform them that dinner is served?

The reason is obvious: we naturally recognize that distinct scenarios demand tailored communication methods and information sharing. So why not bring this identical logic to DDS application discovery?

The default Simple Participant Discovery Protocol (SPDP) shares all participant discovery-related information in a single message (DATA(p)) through a best-effort channel, regardless of whether the participants are announcing themselves, exchanging their configuration or asserting liveliness. This approach is simple and straightforward, but it has a number of drawbacks. The first one is clear; not all phases require the same information to be sent. The second drawback is the lack of flexibility over how often these messages are sent. Finally, there is no distinction between the nature of each message, and the reliability of the channel to transmit it.

What's Different About SPDP2?

SPDP2 is designed to address the drawbacks to SPDP by splitting the single message that is sent in SPDP into three different messages – bootstrap messages, configuration messages, and liveliness messages – and by allowing each of these messages to be sent at separately configured periods with different reliability settings. This design yields a discovery protocol that reduces steady-state bandwidth usage by half under default settings; optimizes the discovery bandwidth consumption in unicast environments; enhances reliability across lossy networks, small MTUs, and IP fragmentation; and increases overall discovery adaptability.

As outlined above, the participant discovery process is divided into three distinct phases:

  • Bootstrap phase: In this phase, a participant sends out messages to its initial peers list at a random period in order to discover other matching participants in the system. SPDP2 only exchanges the information that is needed to determine whether two participants should match (like the domain ID, participant partition, and security configuration) using a best-effort channel. The size of the bootstrap messages (DATA(Pb)) are ~212–240 bytes.
  • Configuration phase: During configuration, a participant makes sure that matching participants have the most up-to-date information about each other. Any additional information that needs to be communicated to other participants is shared using a reliable channel. Configuration messages (DATA(Pc)) are around 729–764 bytes.
  • Steady state phase: During steady state, participants' liveliness is periodically asserted. To do so, SPDP2 sends small liveliness messages through a best-effort channel. Liveliness messages (DATA(m)) consume approximately 50 bytes.

Note: The message sizes shown above correspond to participant configuration using the default quality of service (QoS) settings and disabling observability (one single UDPv4 interface enabled, multicast configuration, and no Security Plugins). Message sizes are highly influenced by system QoS and application configuration, and may vary in other scenarios.

Figure 1 - SPDP2 basic sequence diagram

For more information about the background and configuration parameters of SPDP2, please read the Participant Discovery Performance Characterization and Guidance: SPDP vs. SPDP2 article or the RTI Connext User’s Manual - 25.2 Simple Participant Discovery 2.0.

What are the performance characteristics of SPDP2?

To characterize and compare the performance behavior of SPDP2 against SPDP, we evaluated the discovery phase and steady state across both protocols using system scale tests of 10, 30, 60, 90, 150, and 210 participants. Each participant was configured with ten endpoints for a single topic, scaling up to 2,100 total endpoints in the 210-participant test scenario.

The QoS configuration was set to the default one but with Observability Framework disabled. Only one UDPv4 interface was set and no Security Plugin was enabled.

Metric / Configuration

Multicast Scenario

Unicast Scenario

Max Discovery Time

Similar values (delta <2s).

Similar values.

Discovery bandwidth consumption

SPDP2 uses between 5 to 10% more bandwidth.

SPDP2 uses between 10 to 20% less bandwidth.

Steady state bandwidth consumption

SPDP2 uses 60% less bandwidth.

SPDP2 uses 80% less bandwidth by default.

CPU Utilization

SPDP2 uses 10%–20% more CPU (~0.062s delta for 210 participants).

SPDP2 uses 2% more CPU time.

In general, both versions of the participant discovery protocol use a similar amount of time to complete the discovery process. SPDP2 consumes much less bandwidth than SPDP during steady state in the unicast and multicast cases and it takes a bit more CPU time.

In multicast scenarios, SPDP2 relies on a reliable-unicast channel to send configuration messages individually to each participant to complete discovery. As a result, the volume of discovery bytes sent increases, leading to higher bandwidth consumption in this specific configuration.

Figure 2 displays RTPS Network Traffic - Multicast scenario for 10 participants. It illustrates how the network traffic is higher for SPDP2 right after initializing the system, but after approximately 35 seconds, SPDP surpasses it due to the larger liveliness message size.

 

Figure 2 - RTPS Network Traffic - Multicast scenario for 10 participants and 100 endpoints

The above described metrics were gathered under default QoS settings for both SPDP and SPDP2. Nevertheless, performance for both protocols can be optimized through targeted tuning. For instance, adjusting the QoS parameters for the reliable channel enhances SPDP2 efficiency, reducing its increase in discovery bytes compared to SPDP from 65% down to 40%. Conversely, discovery optimizations – such as excluding optional properties from announcements – yield a greater benefit for SPDP because they apply to every discovery message sent, whereas in SPDP2 they only affect a subset of messages. Under these optimized conditions, the steady-state bandwidth advantage of SPDP over SPDP2 narrows from 60% to 8%.

SPDP or SPDP2? A Quick Guide

To select the ideal participant discovery protocol, evaluate your system context against the following architectural criteria:

  • Vendor Interoperability: Use SPDP. SPDP2 is currently an RTI-specific protocol. Standard OMG DDS interoperability across multi-vendor deployments requires SPDP.
  • Backwards Compatibility: Use SPDP. SPDP2 is not backwards-compatible with older versions of RTI Connext DDS that do not support SPDP2.
  • IP Fragmentation & Small MTU Networks: Use SPDP2 if no optimizations are permitted. In constrained networks (such as WAN or Cloud environments with MTUs less or equal to 1200 bytes), full SPDP DATA(p) packets often fragment when participant property lists or executable file paths are large. SPDP2 isolates participant metadata into separate DATA(Pb) and DATA(Pc) messages, preventing IP fragmentation. This phenomenon can be avoided in SPDP if discovery optimizations are used.
  • Steady-State Bandwidth Optimization: Use SPDP2. Systems operating over bandwidth-sensitive links benefit significantly from SPDP2. Once initial discovery completes, SPDP2 replaces periodic ~800-byte DATA(p) messages with lightweight ~50-byte DATA(m) liveliness assertions.
  • Lossy Networks & Dynamic Configurations: Use SPDP2. Dynamic changes (such as IP mobility updates or partition changes) sent over SPDP can be lost on lossy links and are not recovered until the next periodic announcement (30 seconds by default). SPDP2 transmits configuration updates over a reliable channel, allowing missing updates to be repaired immediately.

Networks with no multicast support: Use SPDP2. When multicast is disabled or unsupported in the network topology, SPDP2 provides superior performance across discovery completion time, transmitted bandwidth, and received network traffic.

 

 

About the author:

Jesus Lopez is a Senior Software Engineer at RTI, working across the General Purpose Product and Safety-Certified Product teams, where he specializes in performance characterization. His professional background includes firmware development for embedded systems, performance analysis, and optimization of distributed applications. He holds a degree in Industrial Electronics Engineering from the University of Granada and a Master’s degree in Systems Engineering and Control from the Complutense University of Madrid.