Support article
SRV Record
An SRV Record (Service Record) is a type of record in the Domain Name System (DNS) that is used to identify servers that host...
An SRV Record (Service Record) is a type of record in the Domain Name System (DNS) that is used to identify servers that host specific services, such as VoIP (Voice over IP), instant messaging, and other services that require port and protocol information in addition to the domain name. Unlike A records that simply map a domain name to an IP address, SRV records are more specific and provide the additional information needed to connect to specific services.
Structure of an SRV Record:
An SRV record contains several pieces of information essential for the correct routing of service requests. The general structure of an SRV record includes:
- Service: The name of the service being provided, for example,
_ldap,_http,_xmpp, etc. - Proto: The protocol used by the service, such as
_tcp(Transmission Control Protocol) or_udp(User Datagram Protocol). - Name: The domain name to which this record applies.
- TTL (Time to Live): The time in seconds that the record can be cached before requiring a new resolution.
- Priority: When multiple SRV records exist for a service, the priority determines the order of use. The server with the lowest priority is contacted first.
- Weight: Used to determine the load distribution among servers of equal priority. A higher weight means a greater probability of being selected.
- Port: The TCP or UDP port on which the service is listening.
- Target: The canonical name of the host providing the service, which should have a corresponding A or AAAA record to resolve to an IP address.
Applications of SRV records:
SRV records are extremely useful in environments where multiple servers offer the same service under a single domain. For example:
- Directory services like LDAP: In corporate environments where directory services like LDAP are distributed across multiple servers, SRV records help clients find an available domain controller.
- Messaging and collaboration systems: Applications such as Microsoft Exchange and XMPP servers for instant messaging use SRV records to direct users to their specific servers.
- SIP (Session Initiation Protocol): In VoIP and other real-time communication systems, SRV records are used to identify SIP servers.
Importance of SRV records:
SRV records are fundamental to the operation of distributed and redundant services, providing a way to manage traffic to multiple servers and facilitate redundancy and load balancing without continuous manual intervention. By specifying priorities and weights, administrators can precisely configure how and when resources are accessed, which improves network efficiency and service availability. In addition, they improve scalability and infrastructure management by allowing additional services to be added or reconfigured without disruptive or significant changes for end users.