Re: Proper cherrypy config to run multiple sites on same server
Andrew Maizels <[email protected]> Sun, 6 Nov 2016 15:29:28 +1100
| Newsgroups | gmane.comp.python.cherrypy |
|---|---|
| Message-ID | <CACETAqhmhzWzRvoSApaoFiALjttAp4GjKPDX8A275QA8rpfNpg@mail.gmail.com> |
The easy solution is to write and test your application using CherryPy's built-in web server, and then deploy using an application server like Green Unicorn or uWSGI. You just need a few lines of wrapper code to tell the server how to run your app, and the server will take care of maintaining the necessary processes and threads. On Sun, Nov 6, 2016 at 7:35 AM, Johan Hartzenberg <[email protected]> wrote: > > 1 Cherrypy process for all the sites (with thread pool taking advantage >> of multi core) >> > or >> >> Python thread pools cannot use multiple cores effectively because of the >> Python GIL >> >> I have heard this alluded to before. I would like to understand this > limitation better - where can I read about it and about what can and cannot > be done about it? > > >> > 1 Cherrypy process for each site ? >> > or >> > 1 Cherrypy process per core ? >> >> 1 server process per core is right. > > > Are you saying one process per site and one process per core? That would > assume that every "site" is equally busy and that no site ever needs more > than one core. I would start by saying one process per SITE and then tune > the number of threads based on the load each site gets, but this may run > into these Python-WSGI serialisation and/or Python GIL thread-pool > issues... In that case you need to start looking at multiple processes per > SITE for the sites with a heavier demand. > > -- > 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. > -- Ahh... We are all heroes; you and Boo and I. Hamsters and rangers everywhere, rejoice! Read Peopleware! http://www.amazon.com/Peopleware-Productive-Projects-Teams-Second/dp/0932633439 -- 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.