You can add a follower node to the cluster after the leader node has been started, by specifying the --follower flag for the follower Dgraph process.
Before starting a Dgraph process that will serve as a follower node, ensure that the leader node has been started, and the Cluster Coordinator service is running on the leader node. Note the host name and port of your Cluster Coordinator service, so that you can specify them when starting the Dgraph process as the follower node.
The Dgraph flag --follower <node_name> specifies the follower node, where <node_name> is the name of the follower node. This name must be unique across the cluster. The name must also be a valid directory name (characters such as slashes (/) are not allowed).
Note that for follower nodes, you do not need to use the create-ds command to create the follower data store. Instead, you use the attach-ds command with a unique data store name, and use the same data files location as the leader node.
To attach the data store and start the Dgraph process as a follower node:
If a follower node fails, the cluster continues to run. Once you identify a follower node failure, restart the follower node with the same name and the node will join the cluster.