Circuit servers can be started asynchronously (and in any order) using the command
circuit start -if eth0 -discover 18.104.22.168:7711
The same command is used for all instances. The
-if option specifies the
desired network interface to bind to, while the
specifies a desired IP address of a UDP multicast channel to be used for automatic
-discover option can be omitted by setting the environment variable
CIRCUIT_DISCOVER to equal the desired multicast address.
To run the circuit server on the first machine, pick a public IP address and port for it to listen on, and start it like so
circuit start -a 10.0.0.1:11022
The circuit server will print its own circuit URL on its standard output. It should look like this:
Copy it. We will need it to tell the next circuit server to “join” this one in a network, i.e. circuit.
Log onto another machine and similarly start a circuit server there, as well.
This time, use the
-j option to tell the new server to join the first one:
circuit start -a 10.0.0.2:11088 -j circuit://10.0.0.1:11022/78517/Q56e7a2a0d47a7b5d
You now have two mutually-aware circuit servers, running on two different hosts in your cluster.
You can join any number of additional hosts to the circuit environment in a similar fashion, even billions. The circuit uses a modern expander graph-based algorithm for presence awareness and ordered communication, which is genuinely distributed; It uses communication and connectivity sparingly, hardly leaving a footprint when idle.