When the Erlang program was started, the Erlang process suddenly increased.

Source: Internet
Author: User

Symptom: in ErlangProgramAfter the startup, as long as an external Erlang program is accepted through gen_server: Call or other accesses, many unknown Erlang processes will appear.

Analysis: At the beginning, I thought something went wrong. During the local test, there was no such phenomenon. Check these unknown Erlang processes and find that each of them has a port, then we can find through the nodes () function that the Erlang program and many modules have established links. When the Erlang program is started, the default value isTransitiveFully connected,That is, when node A is connected to Node B and Node B is connected to node C, node A is also connected to node C, thus forming a fully connected network.

Reprinted as follows:

But sometimes we want to connect to a node instead of other nodes (for example, a node is only used to view some information about the cluster ), in this case, you can specify this node as the hidden node (specify the-hidden parameter when the node starts). The hidden node is not added to the fully connected network of the cluster. The hidden node can also reduce the number of TCP/IP connections: Because if the number of nodes in a cluster is N, the number of TCP/IP connections is: N * (N-1)/2. Therefore, if you set a node that does not need to be fully connected to a den node, the node will be removed from the fully connected network, this reduces the number of TCP/IP connections. 

Note that by default, nodes () does not return the hidden node. You can specify the hidden or connected parameter (that is, node (hidden) or node (connected) To return the information of the hidden node.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.