title: What are the advantages of connecting uWSGI to NGinx using the uwsgi protocol?
body: <p>I have a <a href="https://uwsgi-docs.readthedocs.org/en/latest/" rel="nofollow noreferrer">uWSGI service</a> running the Python <a href="http://flask.pocoo.org/" rel="nofollow noreferrer">Flask framework</a> on an EC2 for some internal API. uWSGI listens on an internal port, that is blocked from the outside world.</p>
  
  <p>The server runs NGinx to serve requests from the outside on ports 80/443, and proxies these requests to uWSGI using plain http proxy to the internal port.</p>
  
  <p><a href="http://uwsgi-docs.readthedocs.org/en/latest/Nginx.html" rel="nofollow noreferrer">NGinx can also connect to uWSGI</a> using the <a href="http://uwsgi-docs.readthedocs.org/en/latest/Protocol.html" rel="nofollow noreferrer">uwsgi protocol</a>. </p>
  
  <p><a href="https://i.stack.imgur.com/E4KRl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E4KRl.png" alt="enter image description here"></a></p>
  
  <p>What are the advantages of using this protocol over plain http proxying?</p>