Erlang epmd学习笔记

Erlang的epmd是端口映射守护进程,用于集群节点间的连接和DNS服务。epmd在启动分布式节点时自动开启,通过4369端口运行。可以自定义epmd端口,限制监听IP和端口范围。当新节点加入,它查找epmd以注册和通信。kill epmd进程需单独操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

什么是epmd?

Erlang是Erlang Port Mapper Daemon的缩写,是erlang集群节点间端口映射的守护进程,默认绑定在4369端口上。

集群是依靠epmd维护的,epmd负责维护集群内的节点连接,提供节点名称到IP地址及端口的解析服务,相当于一个内置的DNS服务。

在linux上它使用select,它只建短连接。

在linux上,节点的监听端口使用poll,指定+K true参数以后,会使用epoll,需要编译时打开开关。

什么时候启动epmd?

The daemon is started automatically by command erl(1) if the node is to be distributed and no running instance is present.

—— Erlang Run-Time System Application (ERTS)

run on each of the computers that are part of your Erlang cluster. EPMD will act as a name server that lets nodes register themselves, contact other nodes by name rather than port numbers, and warn you about any name clashes.

——《Learn You Some Erlang for Great Good》

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值