Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ccmtaylor
Copy link
Contributor

the target of SRV queries must be an absolute DNS name (ending
with a .). If the dtab specifies a relative name, treat it as
absolute.

Copy link
Member

@adleong adleong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⭐ Without really knowing much about SRV records, this seems reasonable to me

@ccmtaylor
Copy link
Contributor Author

ccmtaylor commented Sep 14, 2017

I can think of two improvements:

  1. add an optional search domain setting to the plugin (default to .), and resolve relative records relative to that. This would have the advantage of of removing some duplication, e.g. if my org serves SRV records under srv.dc-1.example.com, we could use something like (cf. the example from add Namer for DNS SRV records #1611):
routers:
- protocol: http
  dtab: |
    /dnssrv => /#/io.l5d.dnssrv;
    /svc => /dnssrv;
    /svc/myservice =>
               /dnssrv/myservice | // relative to search domain
               /dnssrv/myservice.srv.dc-2.example.org.; // absolute records also work

namers:
- kind: io.l5d.dnssrv
  experimental: true
  domain: srv.dc-1.example.org.
  1. resolve relative names according to the host's DNS settings (e.g. /etc/resolv.conf on linux). The advantage here would be that it's "least surprise" from a DNS/networking point of view. OTOH, hosts often have multiple search domains, so this might involve multiple DNS queries. In addition, the system resolver is OS-specific (e.g. macOS provides a resolv.conf for compat, but doesn't use it internally; and windows does something completely different), and I'd like to avoid re-implementing it.

the target of SRV queries must be an absolute DNS name (ending
with a `.`). If the dtab specifies a relative name, treat it as
absolute.
@ccmtaylor
Copy link
Contributor Author

I've thought about this some more; I quite like option (1) from my comment above. I'll push it as a separate commit in this PR, let me know what you think (or if I should submit it as a separate PR).

this allows for considerably more concise dtabs. If, for example, an
organization hosts SRV addresses under `srv.<datacenter>.example.org`,
users can configure the namer like this:

```yaml
namers:
- kind: io.l5d.dnssrv
  experimental: true
  domain: srv.dc-1.example.org
```

and then use a dtab:

```
  /dnssrv => /#/io.l5d.dnssrv
  /svc => /dnssrv
  /svc/myservice =>
    /dnssrv/myservice |
    /dnssrv/myservice.srv.dc-2.example.org.;
```

which will expand `myservice` into all hosts under
`myservice.srv.dc-1.example.org.`, and fall back to
`myservice.srv.dc-2.example.org.`.

`/svc/other` expands to `other.srv.dc-1.example.org`.
@ccmtaylor ccmtaylor force-pushed the ensure-absolute-dnssrv-addresses branch from d946eef to 9c89fe6 Compare September 15, 2017 12:13
the metrics are already namespaced by the plugin prefix, so the
addidional "dnssrv" scope is redundant.
@adleong
Copy link
Member

adleong commented Sep 15, 2017

I'm going to go ahead and merge this, but option 1 above sounds good to me.

@adleong adleong merged commit 3d4ce08 into linkerd:master Sep 15, 2017
@hawkw hawkw mentioned this pull request Oct 6, 2017
hawkw added a commit that referenced this pull request Oct 6, 2017
## 1.3.0 2017-10-06

* **Breaking Change**: All HTTP engines are now Netty 4; `engine:` configuration key is no longer valid.
* Upgraded to Finagle 7.1
* Kubernetes
  * Added a workaround for an issue where Kubernetes namers fail to update because watches are not correctly restarted due to a regression in some versions of Kubernetes (#1636).
  * Fixed `io.l5d.k8s.configMap` interpreter failing to update after receiving an invalid dtab (#1639).
  * Performance improvements for Kubernetes namers.
* Prometheus
  * Added an optional `prefix:` configuration key to add a prefix to all metrics reported by Linkerd (#1655).
* DNS SRV Record namer
  * Ensured that DNS names in SRV queries are absolute (#1637).
  * Added an optional `domain` config key for relative DNS lookups (#1637).
  * Removed redundant `dnssrv` metrics scope from SRV record namer metrics (#1637).
* Consul
  * Consul namers no longer watch the entire list of services, improving performance significantly when there are large numbers of services (#1646).
* Curator
  * Added support for `ServiceInstance` objects with custom payloads (#1272).
Tim-Brooks pushed a commit to Tim-Brooks/linkerd that referenced this pull request Dec 20, 2018
I find the tap and top icons a bit strange.  Using the filter icon for tap is weird because we already use the filter icon for filtering columns.  The caret-up icon looks weird to me for top because it looks like something that is click to expand.

Change the tap icon to the Font Awesome microscope.  Change the top icon to the Font Awesome stream.

Signed-off-by: Alex Leong <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants