Skip to content

feat: support DNS SD URLs#5034

Merged
x1unix merged 5 commits intomainfrom
x1unix/feat/3174-support-dnssrvnoa
Dec 11, 2025
Merged

feat: support DNS SD URLs#5034
x1unix merged 5 commits intomainfrom
x1unix/feat/3174-support-dnssrvnoa

Conversation

@x1unix
Copy link
Member

@x1unix x1unix commented Dec 9, 2025

PR Description

This PR introduces support of DNS SD URL format for --cluster.join-addresses flag.

Following formats are supported:

  • dns+hostname.example.com
  • dnssrv+_alloy-memberlist._tcp.service.consul
  • dnssrvnoa+_alloy-memberlist._tcp.service.consul
Demo - Alloy cluster using members list from Consul DNS image

Which issue(s) this PR fixes

Fixes: #3174

Notes to the Reviewer

PR Checklist

  • CHANGELOG.md updated
  • Documentation added
  • Tests updated
  • Config converters updated

_, addresses, err := srvLookup("", "", addr)
result := make([]string, 0, len(addresses))
for _, a := range addresses {
result = append(result, a.Target)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there anything in spec about randomizing the order here? for clustering purposes, it may be useful to have the addresses in random order :)

Copy link
Member Author

@x1unix x1unix Dec 9, 2025

Choose a reason for hiding this comment

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

@thampiotr IIRC spec doesn't mention this, but some DNS servers return items in a random order - this was the case with Consul, and Alloy worked perfectly fine with that during my test run.

Do you know if Loki and Tempo do any explicit randomization?

@x1unix x1unix force-pushed the x1unix/feat/3174-support-dnssrvnoa branch from 44b3d6f to 26c90fa Compare December 10, 2025 20:31
@x1unix x1unix marked this pull request as ready for review December 10, 2025 22:24
@x1unix x1unix requested review from a team and clayton-cornell as code owners December 10, 2025 22:24
@github-actions
Copy link
Contributor

github-actions bot commented Dec 10, 2025

💻 Deploy preview deleted (feat: support DNS SD URLs).

Copy link
Contributor

@dehaansa dehaansa left a comment

Choose a reason for hiding this comment

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

LGTM, though one nit on the changelog.

Co-authored-by: Sam DeHaan <sam.dehaan@grafana.com>
@x1unix x1unix enabled auto-merge (squash) December 11, 2025 02:52
@x1unix x1unix merged commit d2fda91 into main Dec 11, 2025
44 of 45 checks passed
@x1unix x1unix deleted the x1unix/feat/3174-support-dnssrvnoa branch December 11, 2025 03:15
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Please support DNS service discovery modes similar to Mimir, Loki, Tempo, and Pyroscope

3 participants