Understanding SRV (Service) records and service discovery
An SRV (Service) record is a DNS record that specifies the location of services (servers) for a domain. SRV records enable service discovery by providing hostname, port, priority, and weight information for services.
SRV records follow the format: _service._protocol.domain (e.g., _sip._tcp.example.com). SRV records include: priority (lower numbers = higher priority), weight (for load balancing), port (service port number), and target (hostname providing the service).
SRV records are used for: SIP (VoIP), XMPP (chat), LDAP, and other service discovery protocols. Check SRV records to verify service location and configuration. Learn more about DNS.
SRV records enable service discovery by providing service location information (hostname, port) for applications.
SRV records specify where services are located, including hostname and port number information.
SRV records support load balancing through priority and weight values, distributing service requests across multiple servers.
Multiple SRV records with different priorities provide service redundancy, ensuring availability even if primary servers fail.
SRV records support different protocols (TCP, UDP) and services, providing flexible service configuration.
SRV records follow this format: priority weight port target
_sip._tcp.example.com. 10 60 5060 sip.example.com.
SRV records use format: _service._protocol.domain
_sip._tcp - SIP over TCP_xmpp._tcp - XMPP over TCP_ldap._tcp - LDAP over TCPTarget hostname must resolve to an A or AAAA record (IP address), not a CNAME record.
Priority values range from 0 to 65535. Lower numbers indicate higher priority. Clients attempt connections to lower priority servers first.
Weight values range from 0 to 65535. Used for load balancing among servers with the same priority. Higher weight = more traffic.
Clients select servers based on priority first, then use weight for load balancing among servers with the same priority.
Multiple SRV records with same priority but different weights enable weighted load balancing:
10 60 5060 server1.example.com - 60% of traffic10 40 5060 server2.example.com - 40% of trafficDifferent priorities enable failover: clients try lower priority servers if higher priority servers are unavailable.
SRV records for SIP: _sip._tcp.example.com - Specifies SIP server location for VoIP services.
SRV records for XMPP: _xmpp-client._tcp.example.com - Specifies XMPP server location for chat services.
SRV records for LDAP: _ldap._tcp.example.com - Specifies LDAP server location for directory services.
SRV records for Microsoft services: _autodiscover._tcp.example.com - Specifies Autodiscover service location.
SRV records can be used for any service discovery protocol requiring hostname and port information.