vendredi 28 août 2015

Python tornado web server: How to use multiprocessing to speed up web application

I have a web application that runs fine when used by one user, but as more clients start using it, it is unbearably slow. The server side is written in python and uses tornado. I noticed that while the server it's running on has 4 cores, only 1 is being used, so I've started looking at python's multiprocessing. I've seen the basic example from: http://ift.tt/1w067U1 and the tornado processors from: http://ift.tt/1LGujpn (which seems a bit more complicated), but I'm still not sure this is what I'm looking for. Will running this code with 4 processors speed it up when say 50 users are viewing it at once? And if so are one of these options the way to go for implementation when using tornado web server?

Sorry for the vague and poorly written question - my lack of experience with multiprocessing is to blame for this, even after extensive research. If any example code will help with answering this question, please let me know.

Thanks!




Aucun commentaire:

Enregistrer un commentaire