Gunicorn + Django deployment

Source: Internet
Author: User

1. Download gunicorn

PIP install gunicorn

2. Run

Gunicorn autosa. wsgi: Application # autosa is the name of my project.

-B listens to IP addresses and ports. The default value is 127.0.0.1: 8000, for example, 0.0.0.0: 80.
-W: enable multiple processes, for example,-W 8.
-K gunicorn uses the network model (-K sync) for synchronization blocking by default. It may not be good for High-concurrency access. It also supports other better modes, such as gevent or meinheld.
First Pip install gevent and then use the gevent model-K gevent
-C configuration files can be used
Finally, nohup-B 0.0.0.0: 80-W 4-K gevent gunicorn autosa. wsgi: Application

 

3. gunicorn can be used with Apache and nginx for running. nginx and apachehi only need a proxy.

 

Reference: http://www.isaced.com/post-248.html

Http://rfyiamcool.blog.51cto.com/1030776/1276364

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.