mirror of
https://github.com/status-im/consul.git
synced 2025-01-14 15:54:40 +00:00
More heavy-handed reorg of content for flow.
This commit is contained in:
parent
7a0515817a
commit
fbbb765bf9
@ -15,15 +15,15 @@ discovery without any high-touch integration with Consul.
|
|||||||
For example, instead of making HTTP API requests to Consul,
|
For example, instead of making HTTP API requests to Consul,
|
||||||
a host can use the DNS server directly via name lookups
|
a host can use the DNS server directly via name lookups
|
||||||
like "redis.service.east-aws.consul". This query automatically
|
like "redis.service.east-aws.consul". This query automatically
|
||||||
translates to a lookup of nodes that provide the redis service
|
translates to a lookup of nodes that provide the redis service,
|
||||||
are located in the "east-aws" datacenter and have no failing health checks.
|
are located in the "east-aws" datacenter, and have no failing health checks.
|
||||||
It's that simple!
|
It's that simple!
|
||||||
|
|
||||||
There are a number of [configuration options](/docs/agent/options.html) that
|
There are a number of configuration options that are important for the DNS interface,
|
||||||
are important for the DNS interface. They are `client_addr`, `ports.dns`, `recursors`,
|
specifically `client_addr`, `ports.dns`, `recursors`, `domain`, and `dns_config`. By default,
|
||||||
`domain`, and `dns_config`. By default, Consul will listen on 127.0.0.1:8600 for DNS queries
|
Consul will listen on 127.0.0.1:8600 for DNS queries in the "consul." domain, without support
|
||||||
in the "consul." domain, without support for DNS recursion. All queries are case-insensitive,
|
for further DNS recursion. Please consult the [documentation on configuration options](/docs/agent/options.html)
|
||||||
so a lookup of `PostgreSQL.node.dc1.consul` will find all nodes named `postgresql`.
|
for more details.
|
||||||
|
|
||||||
There are a few ways to use the DNS interface. One option is to use a custom
|
There are a few ways to use the DNS interface. One option is to use a custom
|
||||||
DNS resolver library and point it at Consul. Another option is to set Consul
|
DNS resolver library and point it at Consul. Another option is to set Consul
|
||||||
@ -35,6 +35,9 @@ You can experiment with Consul's DNS server on the command line using tools such
|
|||||||
|
|
||||||
$ dig @127.0.0.1 -p 8600 redis.service.dc1.consul. ANY
|
$ dig @127.0.0.1 -p 8600 redis.service.dc1.consul. ANY
|
||||||
|
|
||||||
|
Note that in DNS, all queries are case-insensitive. A lookup of `PostgreSQL.node.dc1.consul`
|
||||||
|
will find all nodes named `postgresql`.
|
||||||
|
|
||||||
## Node Lookups
|
## Node Lookups
|
||||||
|
|
||||||
To resolve names, Consul relies on a very specific format for queries.
|
To resolve names, Consul relies on a very specific format for queries.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user