Cluster rippled Servers
If you run multiple rippled
servers in the same data center, you can configure them in a cluster to maximize efficiency. To configure clustering:
For each of your servers, note the IP address of the server.
For each of your servers, generate a unique seed using the validation_create method.
For example, using the commandline interface:
$ rippled validation_create Loading: "/etc/rippled.cfg" Connecting to 127.0.0.1:5005 { "result" : { "status" : "success", "validation_key" : "FAWN JAVA JADE HEAL VARY HER REEL SHAW GAIL ARCH BEN IRMA", "validation_public_key" : "n9Mxf6qD4J55XeLSCEpqaePW4GjoCR5U1ZeGZGJUCNe3bQa4yQbG", "validation_seed" : "ssZkdwURFMBXenJPbrpE14b6noJSu" } }
Save the
validation_seed
andvalidation_public_key
parameters from each response somewhere secure.On each server, edit the config file, modifying the following sections:
In the
[ips_fixed]
section, list the IP address and port of each other member of the cluster. For each of those servers, the port number should match theprotocol = peer
port (usually 51235) from that server'srippled.cfg
. For example:[ips_fixed] 192.168.0.1 51235 192.168.0.2 51235
This defines specific peer servers to which this server should always attempt to maintain a direct peer-to-peer connection.
Note: If you omit the port number, the server uses port 2459, the IANA-assigned port for the XRP Ledger protocol.
In the
[node_seed]
section, set the server's node seed to one of thevalidation_seed
values you generated using the validation_create method in step 2. Each server must use a unique node seed. For example:[node_seed] ssZkdwURFMBXenJPbrpE14b6noJSu
This defines the key pair the server uses to sign peer-to-peer communications, excluding validation messages.
In the
[cluster_nodes]
section, set the members of the server's cluster, identified by theirvalidation_public_key
values. Each server should list the public keys of all other members of the cluster here. Optionally, add a custom name for each server. For example:[cluster_nodes] n9McNsnzzXQPbg96PEUrrQ6z3wrvgtU4M7c97tncMpSoDzaQvPar keynes n94UE1ukbq6pfZY9j54sv2A1UrEeHZXLbns3xK5CzU9NbNREytaa friedman
This defines the key pairs the server uses to recognize members of its cluster.
After saving the config file, restart
rippled
on each server.# systemctl restart rippled
To confirm that each server is now a member of the cluster, use the peers method. The
cluster
field should list the public keys and (if configured) the custom names for each server.For example, using the commandline interface:
$ rippled peers Loading: "/etc/rippled.cfg" Connecting to 127.0.0.1:5005 { "result" : { "cluster" : { "n9McNsnzzXQPbg96PEUrrQ6z3wrvgtU4M7c97tncMpSoDzaQvPar": { "tag": "keynes", "age": 1 }, "n94UE1ukbq6pfZY9j54sv2A1UrEeHZXLbns3xK5CzU9NbNREytaa": { "tag": "friedman", "age": 1 } }, "peers" : [ ... (omitted) ... ], "status" : "success" } }
See Also
- Concepts:
- Tutorials:
- References: