Inter-Server Communication - Mesh

Diarkis servers can communicate with each other to fetch information or synchronize data from other servers, and execute specific operations.

Mesh Configuration

Configuration is performed for each HTTP/TCP/UDP server.

Specify the path of the JSON file when executing diarkisexec.SetupDiarkis() on each server, and describe the MARS server address and settings as follows. If the path or JSON file keys are empty, the default settings will be used.

{
  "nic": "eth0",
  "marsAddress": "mars.base.svc.cluster.local",
  "marsPort": "6779",
  "marsAddressCacheTTL": 60,
  "retryInterval": 1000,
  "reliableRetryTimeout": 3000
}
KeyDefaultDescription

nic

"eth0"

Name of the interface to obtain the address. Used when the address is not specified.

marsAddress

"127.0.0.1"

Address of the UDP server to bind.

marsPort

"6779"

Port for the UDP server to bind. The UDP server automatically finds an available port starting from the specified port.

marsAddressCacheTTL

60

TTL of the MARS address cache.

retryInterval

1000

Interval for retrying mesh packets (milliseconds).

reliableRetryTimeout

3000

Timeout for mesh packets (milliseconds).

Last updated