add a "sockets" option in Circus #142

tarekziade opened this Issue Jun 4, 2012 · 2 comments


None yet
2 participants

tarekziade commented Jun 4, 2012

Configuration files and API, will gain a 'sockets' option, which is a list of sockets.

Each socket is defined by :

  • unique name (likely the section name)
  • host
  • port
  • family (default: AF_INET)
  • type (default: SOCK_STREAM)
  • options (default SOL_SOCKET, SO_REUSEADDR)


host = localhost
port = 8080

When Circus starts, it creates and bind + listen on the defined sockets.

Each socket is accessible by any process under any watchers, as long as the watcher section has the "use_sockets" flag enabled

Seeing a socket means that the process will be able to get a list of FDs with the socket name, and decide what to do.

Circus will also let the watchers use a socket fd value in the cmd line. example:


use_sockets = true
cmd = someserver --fd {SOCKET:web}

One use case -- a web worker - see, so Circus can act as a pre-fork web server

@ghost ghost assigned tarekziade Jun 6, 2012


tarekziade commented Jun 6, 2012

Chaussette, uWsgi and Meinheld trunk have the fd feature that makes them compatible.

myroslav commented Jun 6, 2012

I'd suggest looking into systemd socket activation ( to borrow ideas or build upon them.

The python approach to systemd socket activation support can be looked up at

IMHO there is some overlap between Circus functionality and systemd --user mode functionality.

@tarekziade tarekziade referenced this issue Jun 13, 2012


Socket #154

@tarekziade tarekziade closed this Jun 14, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment