<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 10, 2016 at 1:19 PM, Mads Kiilerich <span dir="ltr"><<a href="mailto:mads@kiilerich.com" target="_blank">mads@kiilerich.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On 11/10/2016 11:46 AM, Jan Heylen wrote:<br>
> Hi,<br>
><br>
> I've got a horizontal scaling question:<br>
><br>
> The Kallithea docs state: "If celery is used each instance should run a separate Celery instance, but the message broker should be common to all of them"<br>
<br></span>
That is on the stable branch.<br>
<br>
We added <a href="https://kallithea-scm.org/repos/kallithea/changeset/d6942b2b421c#docsusageperformancerst_o43" rel="noreferrer" target="_blank">https://kallithea-scm.org/repo<wbr>s/kallithea/changeset/d6942b2b<wbr>421c#docsusageperformancerst_<wbr>o43</a> on the default branch. I think it applies to stable too. It was old confusing wording.<br></blockquote><div>Ok, thx, very useful to change this, although I do have the default branch checked out, I didn't noticed this info. I was reading it on the 'readthedocs': (version 0.3.1, so stsble branch I assume)</div><div><a href="http://kallithea.readthedocs.io/en/0.3.1/usage/performance.html">http://kallithea.readthedocs.io/en/0.3.1/usage/performance.html</a></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
It should perhaps be clarified even more: It should be perfectly fine that multiple web server instances share the same celery worker (in addition to using the same queue).<br>
<br>
(There could perhaps be concerns about single point of failure that could cause a desire for multiple celery workers and multiple queues. I doubt that will have any benefit unless you have special needs and *really* have everything under control.)<span class="gmail-"><br>
<br>
> Is this true for uwsgi and how could I accomplish this with one shared kallithea.ini config file? (is it possible to have uwsgi start a separate celercy e.g.?)<br>
<br></span>
All wsgi instances should (in my opinion) send to the same queue and should thus use the same .ini settings.<br>
<br>
The celery worker has to be launched and managed somehow. It is possible that uwsgi can do that is good at it - I don't know. But the point with celery is that it is 100% decoupled from the web serving and only communicate through the queue (and the database and the file system). It is thus not obvious that it should be managed through uwsgi.</blockquote><div>Ok, thx for the info, we will probably have paster still start celery, and use uwsgi to scale Kallithea horizontally it's instances.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-"><br>
<br>
> I've already set instance_id to '*' as @kiilerix indicated in some old bitbucket issue thread:<br>
<br></span>
That is only relevant for the repository cache and expiration - not related to celery.</blockquote><div>indeed, just wanted to mention it as source of my information.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-HOEnZb"><font color="#888888"><br>
<br>
/Mads<br></font></span></blockquote><div><br></div><div>Jan </div></div><br></div></div>