processone / ejabberd

Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server)
https://www.process-one.net/ejabberd/
Other
6.11k stars 1.51k forks source link

Support ERL_DIST_PORT option to work without epmd #3832

Closed badlop closed 2 years ago

badlop commented 2 years ago

This PR implements an option to disable EPMD and use instead a fixed distribution port. This feature is optional, and disabled by default. The proposed port could be 5210, for example.

It would be great if that feature gets tested, and also the current implementation gets reviewed in case there's a simpler way to achieve the required changes in ejabberdctl.template.

Additionally, this PR includes a commit that enables this feature in the container published in the Github Package registry. It would be great if people with experience in containers mention if that feature is worth enabling, if it makes administration easier, or if it introduces more troubles for administering and clustering than benefits...

Notice:

Successfully tested with:

Reference: https://www.erlang.org/blog/otp-23-highlights/ https://blog.erlware.org/epmdlessless/

coveralls commented 2 years ago

Coverage Status

Coverage increased (+0.02%) to 33.624% when pulling f8ec654d0154f2db0ab6f8e5b915380c6715284e on badlop:erldistport into fbf43f2a310bc011c5d4a4df0b9b786a55a14207 on processone:master.

RomanHargrave commented 2 years ago

RE your comments in #3896, I am not currently experiencing any difficulty related to epmd in a containerized and clustered configuration. With that having been said (and having read the erlware blog post), I think this could certainly simplify containerized deployments.

badlop commented 2 years ago

Aha. I guess the safest path is to keep the option disabled by default in the container, prepare it to be supereasy to enable, and announce this option in the next ejabberd release, so people may experiment with it and provide feedback.

badlop commented 2 years ago

Ok, in the end I've comitted support for ERL_DIST_PORT, disabled by default in ejabberd itself (30f1e284681db482ef78da6d865ccc79120e4ca3) and also disabled by default in the container (5ee1dc9e8d80d52ec9f3dd3f043dfdd4c90c303a).