> For the complete documentation index, see [llms.txt](https://help.diarkis.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.diarkis.io/en/diarkis-server/mesh.md).

# 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.

When executing [diarkisexec.SetupDiarkis()](https://docs.diarkis.io/docs/server/v1.0.0-rc1/diarkis/diarkisexec/index.html) on each server, specify the path to the JSON file 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.

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

<table><thead><tr><th width="234">Key</th><th width="119">Default</th><th>Description</th></tr></thead><tbody><tr><td>nic</td><td>"eth0"</td><td>The name of the interface from which to obtain the address. Used when an address is not specified.</td></tr><tr><td>marsAddress</td><td>"127.0.0.1"</td><td>The address to bind the UDP server to.</td></tr><tr><td>marsPort</td><td>"6779"</td><td>The port for the UDP server to bind to. The UDP server will automatically find an available port starting from the specified port.</td></tr><tr><td>marsAddressCacheTTL</td><td>60</td><td>The TTL for the MARS address cache.</td></tr><tr><td>retryInterval</td><td>1000</td><td>Interval for retrying Mesh packets (milliseconds).</td></tr><tr><td>reliableRetryTimeout</td><td>3000</td><td>Timeout for Mesh packets (milliseconds).</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.diarkis.io/en/diarkis-server/mesh.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
