phoenixframework/dns_cluster
关于
为分布式 Elixir 节点提供简单的 DNS 集群功能
系统与基础设施实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文DNSCluster
Simple DNS clustering for distributed Elixir nodes.
Installation
The package can be installed by adding dns_cluster to your list of dependencies in mix.exs:
def deps do
[
{:dns_cluster, "~> 0.2"}
]
end
Next, you can configure and start the cluster by adding it to your supervision
tree in your application.ex:
children = [
{Phoenix.PubSub, ...},
{DNSCluster, query: Application.get_env(:my_app, :dns_cluster_query) || :ignore},
MyAppWeb.Endpoint
]
Then in your config file, add:
config :my_app, :dns_cluster_query, ["app.internal"]
If you are deploying with Elixir releases, the release must be set to support longnames and
the node must be named, using their IP address by default. These can be set in your
rel/env.sh.eex file:
#!/bin/sh
export RELEASE_DISTRIBUTION=name
export RELEASE_NODE="myapp@fully-qualified-ip"
By default, nodes from the same release will have the same cookie. If you want different
applications or releases to connect to each other, then you must set the RELEASE_COOKIE,
either in your deployment platform or inside rel/env.sh.eex:
#!/bin/sh
...
export RELEASE_COOKIE="my-app-cookie"
探索相关项目
加载中…