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.
mesh mode you can form a cluster in two ways:
- Define static
peers(host:port) - Enable
discoverywith one of:kubernetes,dns,udp,consul,etcd,mdns
Minimal Runnable Configs
- non-empty
peers, or discovery.enabled: true
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
Inbroker 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.
-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-method deep dives and deployment patterns, see Enterprise Clustering.

