<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>集群功能 :: NJET文档</title>
    <link>https://docs.njet.org.cn/docs/v4.0.1/reference/cluster/index.html</link>
    <description></description>
    <generator>Hugo</generator>
    <language>zh</language>
    <lastBuildDate>Fri, 15 Aug 2025 10:42:07 +0800</lastBuildDate>
    <atom:link href="https://docs.njet.org.cn/docs/v4.0.1/reference/cluster/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>集群说明</title>
      <link>https://docs.njet.org.cn/docs/v4.0.1/reference/cluster/cluster_introduce/index.html</link>
      <pubDate>Thu, 14 Aug 2025 17:19:25 +0800</pubDate>
      <guid>https://docs.njet.org.cn/docs/v4.0.1/reference/cluster/cluster_introduce/index.html</guid>
      <description>Njet 集群通用配置 1.功能描述 组播（Multicast）是一种网络通信模式，其中一台计算机向多个目标计算机同时发送数据。这是一种一对多通信模式，其中发送方将数据发送到一个组播地址，然后所有订阅该组播地址的计算机都可以接收到该数据。例如，在视频会议或流媒体传输中，发送方可以使用组播将音频和视频数据发送到所有参与者，而不是向每个参与者发送单独的数据流。 基于gossip实现njet集群同步功能：&#xA;stream模块指定d类ip地址，增加gossip指令开启集群同步功能 同一个集群采用cluster_name指令指定标识 不同节点采用node指令指定标识，并需要额外的woker0进程的pid标识，原因是reload会先启动新节点发online消息，旧woker退出发offline消息，这样为了进行正确区分，需要额外的woker0进程pid标识 新节点上线发送组播online消息，集群其他节点收到online消息，记录到自己的共享内存记录已经上线节点信息 节点下线发送组播offline消息，集群其他节点收到offline消息，更新自己的共享内存记录下线该节点信息 reload会先启新woker，后下线旧woker，其他节点需要能够正确识别 可以指定心跳超时时间和节点清理超时时间（防止某些节点故障没发送心跳信息，需要强制下线该节点信息） 其他消息类型，新上线节点会发送msg同 2.依赖模块 无&#xA;3.指令说明 3.1 Listen 配置 需要配置d类组播ip， eg:&#xA;listen 238.255.253.254:5555 udp; 3.2 指令配置： gossip zone=test:1m heartbeat_timeout=100ms nodeclean_timeout=1s local_ip={local_ip} sync_port={sync_port} ctrl_port={ctrl_port}; 参数说明&#xA;参数 取值 默认值 必填 说明 zone {name}:{size} - Y 共享内存名称以及大小 heartbeat_timeout 时间单位， 比如100ms 100ms N 心跳间隔时间配置小于10ms,则设置为默认值100ms nodeclean_timeout 时间单位， 比如1s 1s N 节点检测时间间隔，将该间隔内没发送心跳的节点清理掉最小值1s， 同时会结合心跳时间间隔，保证至少两倍于心跳间隔时间 local_ip Y NJet 本节点的 ip, 该ip 需要能够被集群内其它njet 节点访问 ctrl_port N 如果是集群必须配置 NJet 控制面监听端口 sync_port N NJet rsync daemon进程监听的端口，供远程同步配置文件使用 heartbeat_timeout与nodeclean_timeout 规则：</description>
    </item>
    <item>
      <title>集群配额限制</title>
      <link>https://docs.njet.org.cn/docs/v4.0.1/reference/cluster/cluster_quota/index.html</link>
      <pubDate>Thu, 14 Aug 2025 17:50:35 +0800</pubDate>
      <guid>https://docs.njet.org.cn/docs/v4.0.1/reference/cluster/cluster_quota/index.html</guid>
      <description></description>
    </item>
    <item>
      <title>集群路由一致</title>
      <link>https://docs.njet.org.cn/docs/v4.0.1/reference/cluster/cluster_route/index.html</link>
      <pubDate>Fri, 15 Aug 2025 09:27:13 +0800</pubDate>
      <guid>https://docs.njet.org.cn/docs/v4.0.1/reference/cluster/cluster_route/index.html</guid>
      <description></description>
    </item>
    <item>
      <title>配置同步</title>
      <link>https://docs.njet.org.cn/docs/v4.0.1/reference/cluster/config_sync/index.html</link>
      <pubDate>Fri, 15 Aug 2025 10:42:07 +0800</pubDate>
      <guid>https://docs.njet.org.cn/docs/v4.0.1/reference/cluster/config_sync/index.html</guid>
      <description></description>
    </item>
  </channel>
</rss>