-
Notifications
You must be signed in to change notification settings - Fork 3
Description
A command to supervise programs and respond to cluster changes
bbox supervise [program args]
Supervisor starts as a client of the cluster and spawn child process giving rest arguments, once the child process terminates, it restart it.
If child process terminates abnormally too frequently, the supervisor stops spawning child processes and exit.
Supervisor watchs the change of shared config and boxes, on any difference the supervisor writes the cluster info(including boxes and configs) to a temp file and send SIGUSR1 to child process. Child process can choose to handle SIGUSR1 to reload cluster informations. Supervisor set the temp file path to env variable BBOX_CLUSTER_PATH on each spawning.
Supervisor can also allocate a free bind in form of host:port from the cluster and set it to BBOX_BIND so that child process can listen to the bind address.