Run Rune
One image for a single node or a cluster. Configuration is environment variables. Authentication is on: every node needs the cluster key.
Single node
Run with --network host: same latency as bare metal, while the Docker bridge adds about 35 µs at p50 and published ports make p99 about 10× worse. Linux only in practice; Docker Desktop goes through its VM (add -e RUNE_IO_BACKEND=portable there, and on Rosetta). Three one-time steps: a cluster key, a formatted data volume, a first admin.
then, once: the first admin and the topics
Throw-away development only: -e RUNE_AUTH=disabled instead of the key. The broker warns every 5 minutes and refuses to start with more than one peer.
The default ports sit in the Linux ephemeral range, and the broker warns at start. Reserve them: sysctl -w net.ipv4.ip_local_reserved_ports=40111,40200,40222.
3-node cluster
Same image, same key and same RUNE_PEERS on every node; only RUNE_NODE_ID and the client port differ. Use 1 node, or an odd count of 3 or more. One host: all three on the host network with distinct ports, reserved with ip_local_reserved_ports=40111-40113,40200-40202,40222-40224.
One node per host: same ports on every host, real addresses in RUNE_PEERS. On a bridge, publish the client port and the node's shard block (8200 + 192 × id, 192 ports); published ports cost p99.
Environment
Everything else has a default derived from the host.
RUNE_NODE_IDThis node's id, 0-based.RUNE_PEERSAll nodes asid@host:consensusPort:clientPort:replicationPort, identical on every node. A single node needs onlyid@host:consensusPort.RUNE_CLIENT_ENDPOINTRawhost:portclients connect to, e.g.0.0.0.0:40200.RUNE_DATA_DIRLogs, checkpoints and views. Mount a volume.RUNE_CLUSTER_KEY_FILEThe shared cluster key, mounted read-only. Required unlessRUNE_AUTH=disabled. Rotate withRUNE_CLUSTER_KEY_FILE_NEXTin three rolling restarts.RUNE_AUTHenabled(default) ordisabled: single-node development only.RUNE_STORAGE_FORMATnew,joinorauto. Read only on an empty data directory; unset refuses to start and prints the command.RUNE_WORKERSPartition workers per node. Default 1.FLIGHT_RECORDER_ENABLEArms the flight recorder.FLIGHT_RECORDER_OUTis the report directory;SIGUSR1dumps one.RUNE_TLS_CERT_FILE / _KEY_FILEPEM files; reloaded onSIGHUP.RUNE_REQUIRE_TLS1rejects plaintext clients. TLS needs an image built with-DRUNE_TLS=ON(the shipped one is).
Names & data
Topics exist only through DDL (rune ql). Same rules for topics and views.
- Names1–249 of
A–Z a–z 0–9 . _ -.__*is reserved.Ordersandorderscan't coexist. - Bad nameDDL answers 40 InvalidTopicName.
- Name taken25 TopicExists, including case-only clashes. DDL runs one at a time, so one of two racing creates wins.
- View over a view41 ViewSourceIsView.
- New topicServes once its definition commits. Until then, produce and subscribe get a retriable 2 NotLeader.
- Leader change mid-DDLAnswered 6 Internal. Retry on the new leader.
- Boot topicsNone.
RUNE_TOPICSis gone: a broker that finds it set refuses to start. - Unclaimed dirsBoot moves them to
dataDir/quarantine/<name>-<ts>/. Only an empty, never-committed create is deleted. - RestoreStop, keep the same partition count,
mvthe dir back todataDir/topics/<name>, start.
Ports
All UDP; with --network host they are the host's ports. Pass --shm-size=256m and a high nofile ulimit.
40111/udpConsensus between nodes.40200/udpClients.40222/udpReplication between nodes, and the catalog.8200 + 192 × idPer-worker block (192 ports), derived from the node id: ingress, +64 replication, +128 egress control. Clients reach the ingress ports.