Service Location Protocol Administration Guide

Changing Default Timeouts

High network latency can cause UAs and SAs to time out in making their requests and registrations before a response returns. Latency can be a problem if a UA is separated from an SA, or both a UA and SA are separated from a DA, either by multiple subnets, a dial-up line, or a WAN. You can determine whether latency is a problem by checking whether UAs and SAs are timing out on requests and registrations and their SLP requests are failing, or by using ping to measure the actual latency.

The sets of configuration properties that control timeouts:

If frequent timeouts are occurring during multicast service discovery or DA discovery, the net.slp.multicastMaximumWait property should be increased from its default value of 15000 milliseconds (15 seconds). Increasing the maximum wait period allows more time for requests on high latency networks to complete. After this property is increased, you should also modify the net.slp.multicastTimeouts and net.slp.DADiscoveryTimeouts lists so that the sum of the integer timeout values in the lists equals the net.slp.multicastMaximumWait value.

As an example, suppose you have determined that multicast requests require 20 seconds (20000 milliseconds) instead of 15 seconds to complete. The following property configurations change the maximum wait time and the list of multicast timeouts:


net.slp.multicastMaximumWait=20000
net.slp.multicastTimeouts=2000,5000,6000,7000
net.slp.DADiscoveryTimeouts=3000,3000,6000,8000

If your network has low latency, you can reduce the net.slp.multicastMaximumWait configuration value and the values in the two multicast timeout lists to reduce waiting time.

A similar procedure works for the timeouts involved in sending a UDP datagram to a DA, except the upper bound on the DA timeout is determined by the sum of the elements in the net.slp.datagramTimeouts list and not a separate property. A UDP datagram is repeatedly sent to a DA until a response is received or the timeout bound is reached. If frequent timeouts occur, the values in the list can be increased.

For example, suppose, as above, you need to increase the datagram timeout bound to 20000 milliseconds to avoid frequent timeouts. The following configuration will achieve that:


net.slp.datagramTimeouts=2000,5000,6000,7000

In high performance networks, you can perform this procedure in reverse to reduce the timeout bound for multicast and unicast UDP datagram transmission. This will reduce the amount of latency in satisfying SLP requests.