gunicorn + nginx: Server via socket or proxy?

后端 未结 5 1304
春和景丽
春和景丽 2021-01-30 08:46

I\'ve seen two strategies for hosting a django application with gunicorn and nginx.

One strategy is to run gunicorn on a network port. For example (from http://goodcode

5条回答
  •  自闭症患者
    2021-01-30 09:21

    Socket traffic will be an easy choice if both your webserver and app server(wsgi) exist on the same machine. However you will need network ports over network connections as sockets cannot work over network so..

    1. If webserver and appserver lie on same machine - GO SOCKET
    2. If webserver and appserver are on network - GO PORTS

提交回复
热议问题