Peerage v1.0.3 Peerage.Via.Dns
Use Dns-based service discovery to find other Nodes.
Example
config :peerage, via: Peerage.Via.Dns,
dns_name: "localhost",
app_name: "myapp"
Will look up the ip(s) for ‘localhost’, and then try to
connect to myapp@$IP
.
Kubernetes
Kubernetes supports this out of the box for ‘headless
services’ — if you have a service named myapp
, doing
nslookup myapp
in a deployed container will return a
list of IP addresses for that service.
More context and resources for using DNS for this:
- This project’s README
- SkyDNS announcement
- Kubernetes DNS for services
Summary
Functions
Callback implementation for Peerage.Provider.poll/0
Functions
Callback implementation for Peerage.Provider.poll/0
.