Configuration Values
maelstrom-broker
supports the following configuration values:
Value | Type | Description | Default |
---|---|---|---|
log-level | string | minimum log level | "info" |
cache-root | string | cache directory | $XDG_CACHE_HOME/maelstrom/worker/ |
cache-size | string | target cache disk space usage | "1 GB" |
port | number | port for clients and workers | 0 |
http-port | string | port for web UI | 0 |
log-level
See here.
The broker always prints log messages to stderr.
cache-root
The cache-root
configuration value
specifies where the cache data will go. It defaults to
$XDG_CACHE_HOME/maelstrom/broker
, or ~/.cache/maelstrom/broker
if
XDG_CACHE_HOME
isn't set. See the XDG
spec
for information.
cache-size
The cache-size
configuration value
specifies a target size for the cache. Its default value is 1 GB. When the
cache consumes more than this amount of space, the broker will remove unused
cache entries until the size is below this value.
It's important to note that this isn't a hard limit, and the broker will go
above this amount in two cases. First, the broker always needs all of the
currently-executing jobs' layers in cache. Second, the broker currently first
downloads an artifact from the client in its entirety, then adds it to the
cache, then removes old values if the cache has grown too large. In this
scenario, the combined size of the downloading artifact and the cache may
exceed cache-size
.
For these reasons, it's important to leave some wiggle room in the cache-size
setting.
port
The port
configuration value specifies the port the broker will listen on for
connections from clients and workers. It must be an integer value in the range
0–65535. A value of 0 indicates that the operating system should choose
an unused port. The broker will always listen on all IP addresses of the host.
http-port
the http-port
configuration value specifies the port the broker will serve
the web UI on. A value of 0 indicates that the operating system should choose
an unused port. The broker will always listen on all IP addresses of the host.