Skip to content

Optional

Bandwidth sharing node pool configuration

The bandwidth sharing requirement is designed to allow node owners to form an alliance, communicate the turn transfer service internally, and modify the configuration file so that users can use the turn service across nodes. To achieve the purpose of sharing bandwidth during audio and video communication.

Configuration changes

When generating the configuration file, the current node information is added to the trusted_servers configuration item by default. as follows:


  turn:
    turn_user_lifetime: "1m"
    turn_uris: ["turn:192.168.10.242:3478?transport=udp"]
    turn_shared_secret: ""
    turn_username: "test"
    turn_password: "pwd_test"
    trusted_servers:
      - servername: self   # Any name
        host: 192.168.3.32  # Server public IP
        bandwidth: 100  # Server network bandwidth (unit: M)
        turn_uris: ["turn:192.168.3.32:3478?transport=udp"]
        salt_str: salt_str_here # Salt string used for interface parameter signature

Share configuration

When the node owner reaches a shared bandwidth consensus in private, he only needs to configure the first trusted_server under the trusted_servers configuration item of his node, that is, the The configuration is sent to each other, and then the other party appends the received configuration to trusted_servers and restarts the service. The example is as follows:


turn:
  turn_user_lifetime: "1m"
  turn_uris: ["turn:192.168.10.242:3478?transport=udp"]
  turn_shared_secret: ""
  turn_username: "test"
  turn_password: "pwd_test"
  trusted_servers:
    - servername: self # The trusted_server configuration of your own node, the name is taken by yourself
      host: 192.168.3.32 # server public network IP
      bandwidth: 100 # server network bandwidth (unit M), this configuration is temporarily useless
      turn_uris: ["turn:192.168.3.32:3478?transport=udp"]
      salt_str: salt_str_here # Salt string used for interface parameter signature

    - servername: other1 # The trusted_server configuration of the other node, the name is taken by yourself
      host: 192.168.3.30 # server public network IP
      bandwidth: 50 # server network bandwidth (unit M), this configuration is temporarily useless
      turn_uris: ["turn:192.168.3.30:3478?transport=udp"]
      salt_str: other_salt_str_here # Salt string used for interface parameter signature

2-Trusted node pool configuration

The gateway can be configured through the trusted gateway node pool to achieve cross-node communication for users within each gateway. Just modify the corresponding configuration items of chat.yaml. The example is as follows:

trusted_federation_servers: ["1111111.nxn", "2222222.nxn"] # The configuration content is the servername of the gateway
disable_federation: false

Notice

     When the file storage cleanup time period configuration of this node is modified, the chat service configuration file will be regenerated.
     This means that the shared bandwidth configuration here will be invalid, so it needs to be reconfigured