You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to be able to specify the cookie used when connecting to a certain remote node.
My use case: I have a LAN setup with two separate, distributed applications running. I am currently using standard rpc and pg2 to manage the distributed aspects of both, but now one node in cluster_A needs to make an RPC to a node in cluster_B. I would like to write code like:
gen_rpc:set_cookie(RemoteNode, RemoteCookie), %% Set once per runtime, or in configgen_rpc:call(RemoteNode, mod, fun, []).
The other alternatives I've considered:
expose some other external API (TCP, REST, etc.)
set all the nodes to use the same cookie.
Both of those work, but don't seem to scale particularly well, nor meet my threshold for elegance. An external API increases complexity (not to mention work!), and adds more surface area for testing and attack vectors. Using the same cookie is far less work, but now my two distributed applications have merged into one amorphous app.
Thoughts?
The text was updated successfully, but these errors were encountered:
I could enable an option in the same manner as the tcp/ssl driver options and you could provide a map in there with the node names and the cookies that you wish to use. If you want to update it dynamically, you simply application:set_env and connect to the node. What do you think?
I would like to be able to specify the cookie used when connecting to a certain remote node.
My use case: I have a LAN setup with two separate, distributed applications running. I am currently using standard
rpc
andpg2
to manage the distributed aspects of both, but now one node incluster_A
needs to make an RPC to a node incluster_B
. I would like to write code like:The other alternatives I've considered:
Both of those work, but don't seem to scale particularly well, nor meet my threshold for elegance. An external API increases complexity (not to mention work!), and adds more surface area for testing and attack vectors. Using the same cookie is far less work, but now my two distributed applications have merged into one amorphous app.
Thoughts?
The text was updated successfully, but these errors were encountered: