Re: Cherrypy horizontal scaling
David Allouche <[email protected]>
| Newsgroups | gmane.comp.python.cherrypy |
|---|---|
| Message-ID | <[email protected]> |
> On 14 Apr 2016, at 19:11, Benj <[email protected]> wrote: > > Hi i read that cherry y can launch several http servers. > Can this be used to scale horizontally? > > Have 2 or more servers running each with their process and threads, and use nginx in front to distribute traffic alternatively to each one. > > Is this a viable concept and a good way to scale cherry py? Not really. The first scaling hurdle you will meet with Cherrypy will be Python GIL contention. The way solve it is to use multiple python processes. That is multiple Python interpreter processes, each running cherrypy servers on different ports. Typically, behind nginx or Apache reverse proxy with load distribution. That is different from running multiple http servers within a single Python interpreter. The latter is just useful if you want (for whatever reason) to handle requests on several ports, but it is neutral to scalability. -- You received this message because you are subscribed to the Google Groups "cherrypy-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to cherrypy-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] To post to this group, send email to cherrypy-users-/JYPxA39Uh5TLH3MbocFF+G/[email protected] Visit this group at https://groups.google.com/group/cherrypy-users. For more options, visit https://groups.google.com/d/optout.