[erlang-questions] escript: faster startup and connect to TargetNode

Frank Muller <>
Mon Dec 19 07:17:44 CET 2016

Hi everyone,

I’ve an escript which connects to a TargetNode using this code (snippet
from Basho's nodetool):

    %% See if the node is currently running  -- if it's not, we'll bail
    case {net_kernel:hidden_connect_node(TargetNode),
          net_adm:ping(TargetNode)} of
        {true, pong} ->
        {false,pong} ->
            io:format("Failed to connect to node ~p .\n", [TargetNode]),
        {_, pang} ->
            io:format("Node ~p not responding to pings.\n", [TargetNode]),

It works perfectly well, but it’s kind of slow. I mean the connection is a
bit slow to be established even it the TargetNode is running on the same
Can we make it faster? Is there another way to connect to a TargetNoode
without using net_kernel module?

Finally, what kind of escript's options can make the startup faster in
I found this one:

Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20161219/a9048a4d/attachment.html>

More information about the erlang-questions mailing list