Search code examples
cherrypy

replicating cherrypy process on multi-core server


I have a cherrypy app that is sitting behind nginx (rev-proxy) and handling CPU intensive requests. Since cherrypy's thread pool model doesn't really help with parallelism (because of GIL), how do I replicate the cherrypy process per core to utilize all my server cores? how do I handle the load balancing? I prefer not to add middleware but if its not possible otherwise I will.


Solution

  • You can either start multiple cherrypy servers based on no of cores available or use a WSGI container to deploy your cherrypy application.

    eg: uwsgi