nginx+uwsgi framework

nginx: A http server acts like apache.  It is a portal to handle every request from URL and response to client;

uwsig:  A background framework runs working processes behind nginx. nginx transfer http request to uwsig. uwsgi dispatch these request to worker process. After processing, it return result to nginx.

Why nginx+uwsgi

1  It’s dangerous if uwsgi was directly connected by URL request because uwsgi runs program and the codes may be accessed by hacker. nginx protects uwsgi to avoid being touched by outside. For every request, nginx is the only receiver and sender.

2 There are one manger process and several worker processes in uwsgi. Manager process handles every package from nginx. After unpack package, it dispatches data to idle worker process.

3 uwsgi is a framework that designed for python.

4 nginx can response to client directly without transfer request to uwsgi when client request a static webpage. This feature helps to reduce uwsgi work load.

5, For massive web service concurrency, one machine running uwsgi with limit resource like CPU, memory  is hard to provide service in a short time. uwsgi can be deployed in multiple machines and nginx transfers requests to different uwsgi based on their work load.





Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s