

Mozilla Circus 0.10 released - rbanffy
https://blog.mozilla.org/services/2013/11/05/circus-0-10-released/

======
gio
All the web console screenshots are missing

[http://circus.readthedocs.org/en/latest/for-
ops/circusweb/#c...](http://circus.readthedocs.org/en/latest/for-
ops/circusweb/#circushttpd)

~~~
tarekmoz
Yes thanks - I have fixed this and triggered a build - it should appear in a
little bit

~~~
acron0
Still not seeing 'em here.

~~~
tarekmoz
yeah the build is staled on readthedocs ... trying to see how to fix that.
They will eventually show up sorry. You can find them in the docs/ directory
in the repo

------
acron0
Total noob question here. I am not from an ops background...

To paraphrase the docs, it's possible to manage a process and specify how many
of that process I want to spawn (i.e. numprocesses = 5). I can also manage
sockets and pass the managed sockets' fd to the managed processes.

First question, what is a typical use case for wanting multiple instances of a
specific process?

Second question, if I am running multiple managed processes, how can they all
bind to the same managed socket?

I guess there are some fundamental gaps in my understanding.

~~~
tarekmoz
> First question, what is a typical use case for wanting multiple instances of
> a specific process?

distribute the load. For example I can run several "redis workers" that gets
jobs to do in a redis queue.

> Second question, if I am running multiple managed processes, how can they
> all bind to the same managed socket?

if you bind a socket and then forks 10 child processes, they can all accept
connections on that socket and let the operating system do the load-balancing.

This is exactly how the Apache pre-fork model works.

~~~
acron0
Awesome, thanks for answering my questions.

------
ubercore
We've been using circus in production for nearly 6 months, and I've been very
impressed. Configuration makes sense, and it's been rock solid for us. If
you've ever found yourself frustrated by supervisord, or upstart, I'd
recommend it.

------
samirk
What is the major difference between circus and tools like supervisor?

~~~
tarekmoz
Author of Circus here.

Major differences:

* Circus uses ZeroMQ, Supervisor uses XML-RPC. * Circus is Python 3 compatible, Supervisor is Python 2 only * Circus will let you manage sockets - see [http://circus.readthedocs.org/en/latest/for-ops/sockets/](http://circus.readthedocs.org/en/latest/for-ops/sockets/)

~~~
samirk
Thanks for the clarifications. Just for the record it seems that Supervisor
will roll out Python 3 support soon
[https://github.com/Supervisor/supervisor/issues/110](https://github.com/Supervisor/supervisor/issues/110).
It's good to have it here and now though.

~~~
tarekmoz
That's great to see Supervisor is moving forward on the Python 3 support.

Scott is actually the person who ported Circus to Python 3, so double kudos
for him.

------
mayhew
What are the benefits of using something like this if your OS comes with a
modern init like systemd?

~~~
SEJeff
I use both! systemd starts and ensures circusd is running at all times. Then I
can have circus running as an unprivileged user and have jenkins not need to
be root to manage deployments. Look up a bit for my other comment describing
(from a high level) how this is setup.

------
jessaustin
I really appreciate the emphasis on collaboration, especially with new
contributors. I might be replacing some of my cobbled-together _monit_ setups.

------
damm
So you password protect the HTTP interface; is there anything that protects
the 0mq interface?

I used to for a PaaS and we made a mistake allowing one component to run any
command what so ever. This can seem appealing; but it's a security risk
extraordinaire.

Security keeps taking a back seat to useability :(

~~~
tarekmoz
zeromq is not secured - but they are working on adding security in the
protocol.

In the meantime the safest way to avoid any security issue is to run IPC-only
zeromq sockets _or_ to set properly a firefwall and to use an SSH tunnel.
There's such an option in Circus, where you can pass the ssh server to
circusctl.

also, read up
[http://circus.readthedocs.org/en/latest/design/security](http://circus.readthedocs.org/en/latest/design/security)

------
jimfuller
just noticing the comment 'When a server is being stopped, we need to make
sure we don’t lose any incoming data.'... the potential for data lose is
already present with the use of redis server ?

I guess I am missing something.

~~~
tarekmoz
I don't know all the details on the project and if there are some single point
of failures, but as far as Circus is concerned, a properly working graceful
shutdown is a must-have when your app is getting data to process.

e.g. 1/ notify the world you don't accept data anymore 2/ process what you
have enqueued 3/ shutdown. In Fabien's use case 1 -> 3 can last for over 5
minutes.

~~~
jimfuller
thx, I think I understand what you are saying,

my (perhaps snarky) comment was more to do with 'why be so careful' with the
potential data failure (that circus handily addresses) when data is being
placed in a 'leaky bucket' (redis) in the first place.

------
elithrar
Circus looks great, although there doesn't appear to be an email alert plugin
(yet?). I use this with Supervisor to alert me of restarts/crashes.

The web interface is certainly pretty, though.

~~~
tarekmoz
Yeah we did not ship a plugin for e-mail alerting - the builtin plugins are :
[http://circus.readthedocs.org/en/latest/for-ops/using-
plugin...](http://circus.readthedocs.org/en/latest/for-ops/using-
plugins/#plugins)

But writing a new plugin is very easy, see :
[http://circus.readthedocs.org/en/latest/for-devs/writing-
plu...](http://circus.readthedocs.org/en/latest/for-devs/writing-plugins/)

We would be happy to add in the built-in collection new useful plugins
contributed by the community

------
earless1
Does anyone here know of a comparable project in Ruby?

~~~
tarekmoz
There's one called BluePill: [https://github.com/bluepill-
rb/bluepill](https://github.com/bluepill-rb/bluepill)

------
carlchenet
really nice project, can't wait to use it for my own needs

