What is an SRV record?
Short answer
An SRV (Service) record states on which server and on which port a service runs (RFC 2782); the record name is in the _service._protocol.domain format (e.g. _sip._tcp.example.com). Each row carries priority, weight, port and the target server name: the client first tries the servers with the lowest priority value and distributes the load among the servers with the same priority according to weight. Protocols such as SIP, XMPP and directory services find their servers with this record. In TR7 GTM, SRV is selected from the Record Type list and entered in the Record cell with four sub-fields: Priority, Weight, Port (each 0–65535) and Domain Name ending with a dot (record type specific fields).
Where It Is Used in TR7
| Where | Field / label | What for |
|---|---|---|
| GTM → GTM Services → service name → Records → Add | Record Name = e.g. _sip._tcp; Record Type = SRV | Defining the service name and the record type |
| Same form, the pencil icon in the Record cell | Priority, Weight, Port, Domain Name (record type specific fields) | Stating the server, port, priority and weight of the service |
| Load Balancer → Profiles → Health Checks (DNS) | DNS Record Type = SRV | Checking the DNS server with an SRV query |
- Example:
_sip._tcp.example.com.→10 60 5060 sip1.example.com.; priority 10, weight 60, port 5060. - The record name consists of lowercase letters, digits and the
_ . -characters and can start with_; for this reason SRV names are entered directly (Record Name). - The priority and weight in the SRV row steer the client's choice; GTM's Balance Algorithm and Weight column, on the other hand, are separate settings that determine which rows are returned in the answer.
Common Misconceptions
- "Every application uses the SRV record." Only the protocols that support SRV lookup use it; browsers do not look at SRV for websites.
- "Weight replaces priority." Weight distributes only among the servers that have the same priority.
- "The Weight in the SRV row is the same as GTM's Weight column." The SRV Weight is the content of the record and is interpreted by the client; GTM's Weight column determines the rate at which rows are selected for the answer in the Weighted Round Robin and Weighted random algorithms.
How it is done in the documentation
Related questions
