From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Status: No, score=-0.7 required=3.0 tests=AWL,BAYES_00,FREEMAIL_FROM, URIBL_BLOCKED shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: unicorn-public@bogomips.org Received: from mail-oi0-f53.google.com (mail-oi0-f53.google.com [209.85.218.53]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 33F7D1F89E for ; Thu, 9 Oct 2014 12:24:49 +0000 (UTC) Received: by mail-oi0-f53.google.com with SMTP id v63so2415153oia.40 for ; Thu, 09 Oct 2014 05:24:42 -0700 (PDT) X-Received: by 10.182.29.234 with SMTP id n10mr22436313obh.67.1412857482464; Thu, 09 Oct 2014 05:24:42 -0700 (PDT) MIME-Version: 1.0 Sender: brauliobo@gmail.com Received: by 10.202.68.11 with HTTP; Thu, 9 Oct 2014 05:24:02 -0700 (PDT) From: =?UTF-8?Q?Br=C3=A1ulio_Bhavamitra?= Date: Thu, 9 Oct 2014 09:24:02 -0300 X-Google-Sender-Auth: OJE66V73KRSS2ufGbx0ycMjHhjA Message-ID: Subject: Reserved workers not as webservers To: unicorn-public Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: Hello all, I'm quite amazed of how preloading and fork and reduce memory usage. Making it use even less memory and restarting the app faster, the next step would be incorporate other daemons (also part of the app, in my case delayed_job and feed-updater) AS unicorn workers. This would be very interesting as restarting unicorn would also restart these daemons. Another benefit of incorporating daemons into unicorn is sharing pidfile. For it to work properly I would have to reserve some workers for these daemons. Today, I would simple do a condition on worker.nr and apply a specific code to start the daemon. Maybe better would be to have a different type of worker designed for this. But something I don't know how to do is to disable http requests to be forwared to these workers. How could I do it? Have you ever thought in doing this? best regards, br=C3=A1ulio