Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support SRV records #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Support SRV records #8

wants to merge 1 commit into from

Conversation

feld
Copy link

@feld feld commented Nov 2, 2023

Would you be willing to entertain supporting SRV records so hostnames are used for the node connections instead of IP addresses?

There is no use for the priority field in the SRV records but it would be nice if we could automagically leverage the port field. Unfortunately it appears Erlang doesn't allow you to specify the port when making a connection and you need to use ERL_EPMD_PORT environment variable or maybe a vm.args setting to modify it?

Priority is not taken into consideration at this time and ports are ignored as there is no mechanism to specify the port used when connecting to a node with net_kernel:connect_node/1
@krainboltgreene
Copy link

Hey I would love to help get this in, as we use this at work. In fact this is the suggested path for Fargate containers (although they also suggest a records).

@krainboltgreene
Copy link

This is the payload from a srv record:

{:ok,
 {:hostent, ~c"x.local", [], :srv, 3,
  [
    {1, 1, 4369, ~c"sfasdfsadfaes4f4.x.local"},
    {1, 1, 4369, ~c"3fq32r23fa3fa23f.x.local"},
    {1, 1, 4369, ~c"aw3faw34r234234r.x.local"}
  ]}}

@josevalim
Copy link
Member

This looks good to me but we should make the types of queries customizable, with the default of :a or :aaaa. WDYT?

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.

3 participants