Skip to main content
cluster_config is an enterprise capability. OSS builds ignore this section.
cluster_config enables multi-node Bifrost enterprise clustering. The type field selects how nodes form a cluster:
  • mesh (default) - peer-to-peer membership over gossip, with optional automatic discovery. Requires nodes to reach each other directly.
  • broker - every node makes a single outbound connection to a central broker that relays messages between nodes. Use this on platforms without peer-to-peer connectivity (e.g. Google Cloud Run). See Broker Mode below.
In mesh mode you can form a cluster in two ways:
  • Define static peers (host:port)
  • Enable discovery with one of: kubernetes, dns, udp, consul, etcd, mdns
In mesh mode, at least one of peers or discovery.enabled: true must be configured when cluster_config.enabled is true. In broker mode, broker.address is required and peers/discovery/gossip are ignored.

Minimal Runnable Configs

Use this for local testing. At startup, cluster init requires either:
  • non-empty peers, or
  • discovery.enabled: true
If neither is set, cluster initialization fails.

Static Peers

For version 1.4.x - you will need to expose 10102 TCP port and 10101 UDP port for cluster discovery.

Discovery Example (etcd)


Broker Mode

In broker mode, nodes do not connect to each other. Each node opens a single outbound stream to a central broker process, which relays every message to all other connected nodes and pushes roster updates. Because nodes only need outbound connectivity, broker mode works on platforms where peer-to-peer networking is unavailable, such as Google Cloud Run.
The same Bifrost binary runs as the broker when started with -mode=broker (or BIFROST_MODE=broker). The broker process reads cluster_config.broker from the same config.json and serves on broker.listen_port (default 50051); it runs no database, providers, or HTTP gateway.
All nodes must connect to the same broker process. Run the broker as a single instance (for Cloud Run, a service pinned to one instance with HTTP/2 enabled). See Enterprise Clustering → Broker Mode for the full deployment guide.

Field Reference

cluster_config

cluster_config.broker

cluster_config.gossip

cluster_config.discovery

For discovery.type: "mdns", service_name is sufficient for most setups. When mdns_service is omitted, Bifrost derives the mDNS service type as "_<service_name>._tcp". If you set mdns_service, it overrides the derived value and is used for both mDNS registration and browsing.
For discovery.type: "udp", configure both udp_broadcast_port and allowed_address_space.

For discovery-method deep dives and deployment patterns, see Enterprise Clustering.