Circus 0.1 released

3 views
Skip to first unread message

Tarek Ziade

unread,
Mar 21, 2012, 8:48:11 AM3/21/12
to servic...@mozilla.org
Hey

we released Circus 0.1 -- a process watcher used now in the token server.

Circus let you manage workers from Python via APIs, or from a remote
console via zmq.

http://circus.readthedocs.org/en/latest/index.html

Here's an example of usage in the current token server deployment: I am
asking for the stats of the crypto runners, adding a new worker,
removing one, etc:

The crypto workers are called 'python' here, they should have a more
explicit name ;)

$ bin/circusctl stats python
python:
3: 28993 python token 0 3M 266M 0.0 0.8 0:01.34
2: 28990 python token 0 4M 266M 0.0 0.9 0:01.10
4: 28996 python token 0 3M 266M 0.0 0.8 0:01.60
7: 31813 python token 0 26M 266M 0.0 5.3 0:00.44
6: 31762 python token 0 26M 266M 0.0 5.4 0:00.59

$ bin/circusctl incr python
6

$ bin/circusctl stats python
python:
3: 28993 python token 0 3M 266M 0.0 0.8 0:01.36
2: 28990 python token 0 4M 266M 0.0 0.9 0:01.20
4: 28996 python token 0 3M 266M 0.0 0.8 0:01.61
7: 31813 python token 0 26M 266M 0.0 5.4 0:00.46
6: 31762 python token 0 26M 266M 0.0 5.4 0:00.60
8: 31839 python token 0 26M 266M 0.0 5.3 0:00.45

$ bin/circusctl decr python
5

If you need to maintain several processes in your project alongside the
web app, this can be very handy because you can basically hide all
the complexity of running n commands by doing that yourself from your
own Py app when it starts, and not worry about the rest.

It's like supervisord basically, but s/xmlrpc/zmq/ + can be used
programmaticaly
Read more at
http://circus.readthedocs.org/en/latest/index.html#why-should-i-use-circus-instead-of-x
(reason #3 is mostly for benoit who wants tu use it to manage couchdb
server farms)

Cheers
Tarek

_______________________________________________
Services-dev mailing list
Servic...@mozilla.org
https://mail.mozilla.org/listinfo/services-dev

Reply all
Reply to author
Forward
0 new messages