U
U
undeadter2015-10-25 21:26:46
Python
undeadter, 2015-10-25 21:26:46

Is it possible to set up an http server using python?

Good afternoon! There was a task to lift http the server means of the python. The load is planned to be up to 10,000 (approximately (-x^2) per month) users per day with uneven and not large traffic - max. 10Mb per user per day, even much less - 5Mb on average. But the problem is that python will be used to generate the page, and then there was a choice problem - to facilitate the installation and use of the software, raise the http server using python, or bundle the software with apache and mod_python. Please advise what would be the best way?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Cheremisin, 2015-10-26
@undeadter

If the application is completely in python, then I recommend either www.tornadoweb.org
Or www.cyclone.io
The latter I myself use in conjunction with twisted. It is actually no different from a tornado.
Both one and the second hold very good loads of 10K, the built-in template system and everything. Lots of examples and documentation, very easy to develop. But! Applications should be asynchronous, at least the part that is responsible for the web. You can get out, for example, through message queues, but everything depends on the tasks.
Well, the traditional nginx + gunicorn / uwsgi path, if you need flasks, django, etc.

D
Dimonchik, 2015-10-25
@dimonchik2013

Big discoveries are waiting for you)
Apache and mod_python - this is from the world of PHP Python can be, for example ,
its own server: https://docs.python.org/3.5/library/http.server.html
Python is doing [Django/Flask]+[Gunicorn/uWSGI]+[Nginx/Apache]
usually uWSGI+Nginx + framework or your app
see:
https://www.digitalocean.com/community/tutorials/h...
https: //www.digitalocean.com/community/tutorials/h...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question