ServerAPIv1.1.0

多服Multi-server

多台伺服器共用同一個 Redis/資料庫,以 server-id 隔離資料; 同一 cluster-id 的伺服器會互相發現,可由 /network 取得全網彙整。

鍵名   {namespace}:{cluster-id}:{server-id}:{type}[:{id}]
單機   serverapi:::history
多服   serverapi:main:survival:history
server-id 預設為 global,代表未指定、視為單機。 多台共用同一個 Redis 時務必各設唯一值,否則資料會互相覆蓋。啟動時會警告這個狀態。

Several servers can share one Redis and database, separated by server-id. Servers on the same cluster-id discover each other, and /network aggregates the whole network.

Key      {namespace}:{cluster-id}:{server-id}:{type}[:{id}]
Single   serverapi:::history
Network  serverapi:main:survival:history
server-id defaults to global, meaning unset and treated as standalone. When several servers share one Redis each must get a unique value, otherwise they overwrite each other's data. The plugin warns about this at startup.