API Gateway Community v1.4

Older version: v1.4

Released on June 10, 2021

Document updated on

SD with DNS SRV (e.g., Consul, k8s)

The DNS SRV is a market standard used by systems such as Kubernetes, Mesos, Haproxy, Nginx plus, AWS ECS, Linkerd, and more.

To integrate Consul as the Service Discovery or any other DNS SRV compatible systems you only need to set two keys:

  • "sd": "dns": To set service discovery = DNS SRV
  • "host": []: The list of all the names providing the resolution

These keys need to be added in the backend section of your configuration. The host key can be skipped if there is another host key in the root level of the configuration.

For instance:

...
"backend": [
        {
          "url_pattern": "/foo",
          "sd": "dns",
          "host": [
            "api-catalog.service.consul.srv"
          ],
          "disable_host_sanitize": true
        }
      ]
...