<div dir="ltr">Hi Raimo,<br><br>We use `erlang:set_cookie/2` with a remote node in Erlang LS, too. Things can probably be refactored to avoid that, but the existing API proved to be handy over the years.<br>Looking at GitHub, other projects use that API, too (e.g. redbug).<br>I have always been thinking (maybe erroneously) of the cookie as a property of the "connection" between two nodes (with a default one), not a property of the single node.<br>With that mindset, the `erlang:set_cookie/2` API made sense. This was useful when building "topologies" of nodes (e.g. nodes A, B and C where B can connect to A and C but A cannot connect to C), especially during tests.<br>Reflecting on this, what seems inconsistent in the API is the lack of a `get_cookie/1` which would return the current cookie for the "connection" from the current node's perspective (or alternatively a `erlang:get_cookies/0` which returns all of them).<br><br>Roberto<br><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 9 Aug 2021 at 18:21, Raimo Niskanen <<a href="mailto:raimo%2Berlang-questions@erlang.org">raimo+erlang-questions@erlang.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello Community.<br>
<br>
Regarding a GitHub Issue in progress:<br>
    <a href="https://github.com/erlang/otp/issues/5063" rel="noreferrer" target="_blank">https://github.com/erlang/otp/issues/5063</a>,<br>
and a corresponding pull request:<br>
    <a href="https://github.com/erlang/otp/pull/5062" rel="noreferrer" target="_blank">https://github.com/erlang/otp/pull/5062</a><br>
<br>
There is an apparently rarely known API call<br>
erlang:set_cookie(Node, Cookie) that allows you to configure<br>
a cookie to use when communicating with a different node.<br>
<br>
This/these set cookie/s may/should be different from the node's<br>
normal (default) cookie, and the functionality exists<br>
to make it possible to connect nodes that have different<br>
default cookies.<br>
<br>
The feature is probably rarely used; almost nobody in the<br>
OTP group knew that it existed nor how it is supposed<br>
to be used.  Connecting only nodes with the same cookie<br>
seems to be the norm.<br>
<br>
The question is now, is this an essential feature / how<br>
important is this feature?<br>
<br>
To completely remove this feature would simplify the code,<br>
but if that should destroy an important use case; removing<br>
would not be an option.<br>
<br>
The Issue and PR is about how it is supposed to work; if and<br>
how it should be fixed.<br>
<br>
<br>
So, what says the Community?  How important feature is it<br>
to be able to connect nodes with different cookies?<br>
<br>
Cheers<br>
-- <br>
<br>
/ Raimo Niskanen, Erlang/OTP, Ericsson AB<br>
</blockquote></div>