moxzid referencealpha
Every moxzid command-line option and environment variable.
moxzid --help prints the same information. The HTTP endpoints are in moxzid HTTP API.
Actors and state#
| Option | Default | Effect |
|---|
-m, --manifest FILE | actors.json | The actors to host |
-s, --state DIR | none | Where to keep actor state. Without it, state is in memory only |
--snapshot-below BYTES | 50 MB | Snapshot actors this size or smaller after every message; larger actors rely on the log. 0 never snapshots after messages |
--live-cap N | 0 (off) | Keep at most N actors loaded; unload the least recently used. Requires -s |
--upgrade-policy refuse|warn | refuse | What to do with an upgrade that changes stable variables when moxzi isn't available to check it |
Network and security#
| Option | Default | Effect |
|---|
-l, --listen ADDR | 127.0.0.1:7000 | Address to listen on |
--auth-token TOKEN | $MOXZID_TOKEN | Bearer token required on protected endpoints |
--insecure | | Allow listening on a non-loopback address without a token |
--web ACTOR | | Serve this actor's http_request at / |
--project DIR | | Serve source closures from DIR at /mops/closure/ |
Execution limits#
| Option | Default | Effect |
|---|
--instruction-limit N | 40,000,000,000 | Instructions per message. A message that exceeds it traps and is rolled back |
--cycles N | 100,000,000,000,000 | Each actor's starting cycles. 0 turns charging off |
--heartbeat-ms MS | 1000 | Heartbeat interval. 0 turns heartbeats off |
--timer-ms MS | 100 | How often to check for due timers. 0 turns timers off |
--grant-http-public | | Let actors make HTTPS outcalls to any public host on port 443. Without a grant, outcalls fail with this host cannot make HTTP requests |
--outcall-public-host HOST | | Let actors reach this public host over HTTPS. Repeat for more hosts |
--outcall-development-origin ORIGIN | | Let actors reach this exact origin, port included, such as http://127.0.0.1:8080. For local development |
--outcall-timeout-secs S | 30 | Time limit for one outcall |
--outcall-max-response-bytes BYTES | 16 MiB | Host ceiling for one response body; actors may request less |
Tensor device#
See GPU math for actors.
| Option | Default | Effect |
|---|
--device KIND | off | Give hosted actors a tensor device: burn:metal, burn:cuda[:N], burn:vulkan or burn:cpu |
--device-listen ADDR | off | Serve this device's exports to other machines on ADDR (HOST:PORT) |
--device-url URL | http://ADDR | The URL other machines use to reach --device-listen |
--device-cycles-per-ms N | 100,000,000 | Cycles a device call costs per millisecond, when cycles are charged |
--device-checkpoint-secs SECS | 30 | With -s, copy the whole device once the recorded device calls took this much device time; startup re-runs about this much. 0 = by size only |
--device-checkpoint-mb MB | 64 | With -s, copy the whole device after this many MB of recorded device calls |
Logging#
| Option | Default | Effect |
|---|
-v, --verbose | | Print actors' Debug.print output on stderr |
--log-json | | Log one JSON object per event instead of text |
--history N | 50 | Recent messages kept per actor for /history. 0 turns it off |
Environment variables#
| Variable | Effect |
|---|
MOXZID_TOKEN | The bearer token, if --auth-token isn't given |
MOXZI_BIN | The moxzi binary used to check upgrades. Default: next to moxzid, then on PATH |
The manifest#
actors.json
{
"actors": [
{ "name": "counter", "wasm": "counter.wasm" }
]
}
| Field | Required | Meaning |
|---|
name | Yes | Name used in URLs |
wasm | Yes | Module path, relative to the manifest |
id | No | A fixed actor id, in hex |
Signals#
| Signal | Effect |
|---|
SIGTERM, SIGINT | Finish the current message, save every actor, exit with status 0 |
SIGKILL | Exit immediately. State is recovered from the log on the next start |