This section lists precedence order of the records among multiple SRV entries for the same domain name.
The SRV records follow the following format:
_service._proto.name TTL class type of record priority weight port target
for example:
_sip._tcp.example.com 86400 IN SRV 10 60 5060 bigbox.example.com
_sip._tcp.example.com 86400 IN SRV 10 20 5060 smallbox1.example.com
_sip._tcp.example.com 86400 IN SRV 10 20 5060 smallbox2.example.com
_sip._tcp.example.com 86400 IN SRV 20 0 5060 backupbox.example.com
The priority field in the preceding example determines the precedence of the record's data use. Clients must use the SRV records
with the lowest priority value first, and fallback to the records of higher value if the connection fails. If a service has
multiple SRV records with the same priority value, the clients must load balance them in proportion to the values of their
weight fields.
The first three records share a priority of 10, so the weight field's value is used by clients to determine which server (host
and port combination) to contact. The sum of all three values is 100, so bigbox.example.com is used 60 percent of time. The
two hosts, smallbox1 and smallbox2 are used for 40 percent of requests total, with half of them sent to smallbox1 and the
other half to smallbox2. If bigbox is unavailable, these two machines share the load equally since each is selected 50 percent
of the time.
If all the three servers with priority 10 are unavailable, the record with the next lowest priority value is chosen that is
backupbox.example.com.