Circuit Self-managed infrastructure, programmatic monitoring and orchestration

Running Circuit servers

Circuit servers can be started asynchronously (and in any order) using the command

	circuit start -if eth0 -discover

The same command is used for all instances. The -if option specifies the desired network interface to bind to, while the -discover command specifies a desired IP address of a UDP multicast channel to be used for automatic server-server discover. The -discover option can be omitted by setting the environment variable CIRCUIT_DISCOVER to equal the desired multicast address.

Alternative advanced server startup

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

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 -j circuit://

You now have two mutually-aware circuit servers, running on two different hosts in your cluster.

A circuit system of two hosts (i.e. two circuit servers).

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.