mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 03:35:51 +00:00
Reorg peering-related tutorials
This commit is contained in:
@@ -1,87 +0,0 @@
|
||||
# rippledサーバーのクラスター化
|
||||
|
||||
1つのデータセンターで複数の`rippled`サーバーを稼働している場合は、これらのサーバーを[クラスター](clustering.html)に構成して、効率を最大化できます。クラスター構成の設定は次のとおりです。
|
||||
|
||||
1. 各サーバーのIPアドレスをメモします。
|
||||
|
||||
2. [validation_createメソッド][]を使用して各サーバーの一意のシードを生成します。
|
||||
|
||||
コマンドラインインターフェイスを使用する場合の例を以下に示します。
|
||||
|
||||
$ 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"
|
||||
}
|
||||
}
|
||||
|
||||
各応答の`validation_seed`パラメーターと`validation_public_key`パラメーターを安全な場所に保存します。
|
||||
|
||||
3. 各サーバーで[構成ファイル](https://github.com/ripple/rippled/blob/master/cfg/rippled-example.cfg)を編集し、以下のセクションを変更します。
|
||||
|
||||
1. `[ips_fixed]`セクションに、クラスターの _その他の_ 各メンバーのIPアドレスとポートを記入します。各サーバーのポート番号は、サーバーの `rippled.cfg`に指定されている`protocol = peer`ポート(通常は51235)と一致している必要があります。例:
|
||||
|
||||
[ips_fixed]
|
||||
192.168.0.1 51235
|
||||
192.168.0.2 51235
|
||||
|
||||
この例では、このサーバーがダイレクトピアツーピア接続の維持を常に試みる先のピアサーバーを特定しています。
|
||||
|
||||
2. `[node_seed]`セクションでは、サーバーのノードシードを、ステップ2で[validation_createメソッド][]を使用して生成した`validation_seed`の値の1つに設定します。各サーバーは一意のノードシードを使用する必要があります。例:
|
||||
|
||||
[node_seed]
|
||||
ssZkdwURFMBXenJPbrpE14b6noJSu
|
||||
|
||||
この例では、ピアツーピア通信(検証メッセージを除く)の署名にサーバーが使用するキーペアを定義しています。
|
||||
|
||||
3. `[cluster_nodes]`セクションでは、サーバーのクラスターのメンバーを設定します。これらのメンバーは`validation_public_key`の値で識別されます。各サーバーのクラスターの _その他の_ すべてのメンバーをここに記入する必要があります。任意で、各サーバーのカスタム名を追加します。例:
|
||||
|
||||
[cluster_nodes]
|
||||
n9McNsnzzXQPbg96PEUrrQ6z3wrvgtU4M7c97tncMpSoDzaQvPar keynes
|
||||
n94UE1ukbq6pfZY9j54sv2A1UrEeHZXLbns3xK5CzU9NbNREytaa friedman
|
||||
|
||||
この例は、サーバーがクラスターのメンバーを認識するために使用するキーペアを定義しています。
|
||||
|
||||
4. 構成ファイルを保存した後、各サーバーで`rippled`を再起動します。
|
||||
|
||||
# systemctl restart rippled
|
||||
|
||||
5. 各サーバーがクラスターのメンバーになっていることを確認するには、[peersメソッド][]を使用します。`cluster`フィールドに、各サーバーの公開鍵とカスタム名(構成している場合)のリストが表示されます。
|
||||
|
||||
コマンドラインインターフェイスを使用する場合の例を以下に示します。
|
||||
|
||||
$ 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"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
<!--{# common link defs #}-->
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
{% include '_snippets/tx-type-links.md' %}
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
@@ -1,95 +0,0 @@
|
||||
# Cluster rippled Servers
|
||||
|
||||
If you run multiple [`rippled` servers](the-rippled-server.html) in the same data center, you can configure them in a [cluster](clustering.html) to maximize efficiency. To configure clustering:
|
||||
|
||||
1. For each of your servers, note the IP address of the server.
|
||||
|
||||
2. 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` and `validation_public_key` parameters from each response somewhere secure.
|
||||
|
||||
3. On each server, edit the [config file](https://github.com/ripple/rippled/blob/master/cfg/rippled-example.cfg), modifying the following sections:
|
||||
|
||||
1. 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 the `protocol = peer` port (usually 51235) from that server's `rippled.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.
|
||||
|
||||
2. In the `[node_seed]` section, set the server's node seed to one of the `validation_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.
|
||||
|
||||
3. In the `[cluster_nodes]` section, set the members of the server's cluster, identified by their `validation_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.
|
||||
|
||||
4. After saving the config file, restart `rippled` on each server.
|
||||
|
||||
# systemctl restart rippled
|
||||
|
||||
5. 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:**
|
||||
- [Peer Protocol](peer-protocol.html)
|
||||
- **Tutorials:**
|
||||
- [Install rippled](install-rippled.html)
|
||||
- **References:**
|
||||
- [validation_create method][]
|
||||
- [peers method][]
|
||||
|
||||
<!--{# common link defs #}-->
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
{% include '_snippets/tx-type-links.md' %}
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
@@ -1,51 +0,0 @@
|
||||
# Configure Peer Connections
|
||||
|
||||
The XRP Ledger's peer-to-peer protocol automatically manages peer connections in most cases. In some cases, you may want to manually adjust which peers your server connects to, to maximize your server's availability and connectivity with the rest of the network.
|
||||
|
||||
If you run multiple servers in the same datacenter, you may want [to cluster them](cluster-rippled-servers.html) to improve efficiency. You can use reserved peer slots for servers you don't run but want to stay connected to, such as important hubs in the topology of the peer-to-peer network. For other peers, the server can automatically find peers and manage its connections, although you may occasionally want to intervene to block a peer that's behaving undesirably.
|
||||
|
||||
***TODO: steps for the tasks below***
|
||||
|
||||
## Configure Firewall
|
||||
|
||||
Having 10-11 peers probably means your firewall is blocking incoming connections. Open the peer protocol port (51235 by default) to allow incoming peer connections.
|
||||
|
||||
|
||||
## Set Maximum Number of Peers
|
||||
`[peers_max]` config setting (restart required)
|
||||
|
||||
## Add a Reserved Peer Slot
|
||||
|
||||
[peer_reservations_add method][]
|
||||
|
||||
|
||||
## Remove a Reserved Peer Slot
|
||||
|
||||
[peer_reservations_del method][]
|
||||
|
||||
|
||||
## Check Reserved Peer Slots
|
||||
|
||||
[peer_reservations_list method][]
|
||||
|
||||
|
||||
## Manually Connect to a Specific Peer
|
||||
|
||||
[connect method][] (by IP and port)
|
||||
|
||||
|
||||
## Disconnect an Unwanted Peer
|
||||
|
||||
No API for this but you can use a software firewall to block peers making excessive requests or on the wrong network chain. (see RBH script for examples)
|
||||
|
||||
|
||||
## Check Peer Bandwidth Usage
|
||||
|
||||
[peers method][]
|
||||
|
||||
|
||||
|
||||
<!--{# common link defs #}-->
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
{% include '_snippets/tx-type-links.md' %}
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
@@ -1,71 +0,0 @@
|
||||
# Configure the Peer Crawler
|
||||
|
||||
By default, [`rippled` servers](the-rippled-server.html) provide statistics publicly to anyone who asks using the [peer crawler API](peer-crawler.html), to make it easier to track the health and topology of [the XRP Ledger's peer-to-peer network](consensus-network.html). You can configure your server to provide more or less information, or to reject peer crawler requests entirely. [New in: rippled 1.2.0][]
|
||||
|
||||
This document contains steps for two options:
|
||||
|
||||
- [Change the Information Reported by the Peer Crawler](#change-the-information-reported-by-the-peer-crawler)
|
||||
- [Disable the Peer Crawler](#disable-the-peer-crawler)
|
||||
|
||||
## Change the Information Reported by the Peer Crawler
|
||||
|
||||
To configure how much information your server provides in response to peer crawler requests, complete the following steps:
|
||||
|
||||
1. Edit your `rippled`'s config file.
|
||||
|
||||
vim /etc/opt/ripple/rippled.cfg
|
||||
|
||||
{% include '_snippets/conf-file-location.md' %}<!--_ -->
|
||||
|
||||
2. Add or update the `[crawl]` stanza in your config file, and save the changes:
|
||||
|
||||
[crawl]
|
||||
overlay = 1
|
||||
server = 1
|
||||
counts = 0
|
||||
unl = 1
|
||||
|
||||
The fields in this stanza control which fields the server returns in the [peer crawler response](peer-crawler.html#response-format). The names of the config fields match the fields of the API response. A setting with a value of `1` means to include the field in the response. A value of `0` means to omit that field from the response. This example shows the default values for each setting.
|
||||
|
||||
3. After saving the changes to the config file, restart your `rippled` server to apply the updated configuration:
|
||||
|
||||
systemctl restart rippled
|
||||
|
||||
|
||||
## Disable the Peer Crawler
|
||||
|
||||
To disable the peer crawler API on your server, so it does not respond to peer crawler requests at all, complete the following steps:
|
||||
|
||||
1. Edit your `rippled`'s config file.
|
||||
|
||||
vim /etc/opt/ripple/rippled.cfg
|
||||
|
||||
{% include '_snippets/conf-file-location.md' %}<!--_ -->
|
||||
|
||||
2. Add or update the `[crawl]` stanza in your config file, and save the changes:
|
||||
|
||||
[crawl]
|
||||
0
|
||||
|
||||
Remove or comment out all other contents of the crawl stanza.
|
||||
|
||||
3. After saving the changes to the config file, restart your `rippled` server to apply the updated configuration:
|
||||
|
||||
systemctl restart rippled
|
||||
|
||||
|
||||
## See Also
|
||||
|
||||
- **Concepts:**
|
||||
- [Peer Protocol](peer-protocol.html)
|
||||
- **Tutorials:**
|
||||
- [Manage the rippled Server](manage-the-rippled-server.html)
|
||||
- **References:**
|
||||
- [server_info method][]
|
||||
- [peers method][]
|
||||
- [Peer Crawler](peer-crawler.html)
|
||||
|
||||
<!--{# common link defs #}-->
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
{% include '_snippets/tx-type-links.md' %}
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
Reference in New Issue
Block a user