Searching ALOHA 9.5

Using DNS for Service Discovery

Service discovery monitors and detects automatically devices and services on a network so that other components can stay efficient in environments subject to rapid configuration changes such as the cloud or microservices.

DNS for Service Discovery is a feature that can update an HAProxy configuration during run time, such as changes in server status, IP addresses, ports, and weights. without making explicit changes to configuration files.

DNS SRV records

This is done using DNS SRV which are resource records used to identify computers that host specific services.

Upon receiving this response, HAProxy adjusts its configuration to the number of records returned. As more records are added/removed this will change, up to the maximum number of servers specified in the server-template line.

Resolve an SRV record

With an SRV record to resolve, add the following code to the bind zone file: