peers must include self, and must list at least 2 nodes (otherwise it panics at boot).socket.bind (default 0.0.0.0); the advertised address is self. Behind a firewall/NAT, self should be the address other nodes can actually reach.self. In cluster mode, the PORT environment variable is ignored, and the port from self becomes the listen port.peers is the promotion priority (the first entry has the highest priority).# ticketing.toml on 10.0.0.1
[cluster]
self = "10.0.0.1:5225"
peers = ["10.0.0.1:5225", "10.0.0.2:5225"]# ticketing.toml on 10.0.0.2 — peers is identical, only self differs
[cluster]
self = "10.0.0.2:5225"
peers = ["10.0.0.1:5225", "10.0.0.2:5225"]Clients (brokers) register both addresses so they can fail over automatically:
TicketBroker::connect(&["10.0.0.1:5225", "10.0.0.2:5225"]);For generating actual deployment commands, see the Ticketing Server Deployment page.