[Python] Why pserve doesn't work

I decided to set up a new Web service server, but I had to decide what to do with the server for that. I didn't benchmark myself, I just gathered information on the net, but I'll make a note of what I looked up at that time.

Premise

--The service is made in Python (Pyramid) --During development, the service was started using the "pserve" command that will be automatically used when pyramid is installed (the pyramid tutorial stated that this can be used).

Question

――Is it really okay to provide services using this "pserve" command even after publication? ――Should you consider other means and use it if there is a better one?

Personal conclusion

--Use nginx + gunicorn instead of pserve

Reason

--pserve is responsible for both providing static content such as images and dynamic content such as query results. --It is better to provide static content and dynamic content by different servers (so-called reverse). Proxy)

  1. For nginx dynamic content
  2. [Separation of Web server and AP server](http://ja.stackoverflow.com/questions/18417/web%E3%82%B5%E3%83%BC%E3%83%90%E3%83] % BC% E3% 81% A8ap% E3% 82% B5% E3% 83% BC% E3% 83% 90% E3% 81% AE% E5% 88% 86% E9% 9B% A2% E3% 81% AB % E3% 81% A4% E3% 81% 84% E3% 81% A6 / 18449 # 18449)

Why nginx

--Simple and fast, specializing in processing many simultaneous requests -What is Nginx? I asked the engineer about the difference from Apache

Why gunicorn

――Somewhat fast, it has a high affinity with Pyramid and is easy to operate. -Running Pyramid on Gunicorn - vs fastcgi - vs uwsagi

Recommended Posts

[Python] Why pserve doesn't work
When matplotlib doesn't work with python2.7
Tensorflow doesn't work!
When send_keys doesn't work
When dropbox-sdk-python doesn't work
vscode doesn't recognize python
Why I chose Python
How tuples work | Python
Oh! python -m SimpleHTTPServer doesn't work on Safari and FireFox! ??
VScode intellisense doesn't work on Raspberry Pi OS 64bit! (Python)
Fcitx doesn't work on Flatpak
Search engine work with python
What to do if Python doesn't work on Git for Windows
Dtype is the reason why Numpy's assert_array_equal doesn't work as expected
Articles to read when Blender Python script code doesn't work in 2.80
module install if pip install doesn't work
5 Easy-to-Use Python Tools | Increase Work Efficiency
pygame doesn't work on macOS Mojave
Intellisense doesn't work with tensorflow2.0 + VScode