The Cookie Protection System

Access to a single node or set of nodes is secured by a cookie system. Each node has a single cookie, and this cookie must be the same as the cookies of any nodes to which the node talks. To ensure this, all nodes in a distributed Erlang system must have been started with the same magic cookie or have their cookie changed to the same value by evaluating erlang:set_cookie.

The set of connected nodes having the same cookie defines an Erlang cluster.

For two distributed Erlang nodes to communicate, they must have the same magic cookie. We can set the cookie in three ways.

Important: The cookie protection system was designed for building distributed systems that run on a local area network (LAN) where the LAN itself ...

Get Programming Erlang, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.