en

SRV (Service) is a type of DNS record that tells clients on which host and port a specific service is available. Unlike a plain address record, SRV also carries the port, so the client does not need to know it in advance.

Format of an SRV record

The record name has three parts — _service._proto.name, for example _sip._tcp.example.com. The value holds four fields:

  • Priority — clients try records with the lower value first.
  • Weight — spreads load across hosts that share the same priority.
  • Port — the service port, for example 5060 for SIP.
  • Target — the host name, which must have a regular A record.

Where it is used

SRV removes hard-coded ports: the client learns from DNS where to connect. For instance, _sip._tcp.example.com with the value 10 0 5060 sip.example.com sends a SIP client to port 5060 on sip.example.com. SIP telephony, XMPP, LDAP, Minecraft servers and other protocols rely on SRV, while how often clients re-query is governed by the TTL.

DNS SRV record — locating a service host and port
Learn more

Tag cloud