Whats wrong with django development server?

1) Django's buit-in webserver translates HTTP requests to python. manage.py runserver targets development settings (e.g. by auto restarting on changes).

2) It can process only one request at a time. It is not optmized to spawn multiple worker processes to parallelize incoming requests to multiple cpu cores. (For this, we use Gunicorn)

3) They are not optimized for handling concurrent request. (For this we use Nginx)

4) The Django skeleton website created using the django-admin and manage.py tools are configured to make development easier. Many of the Django project settings (specified in settings.py) should be different for production, either for security or performance reasons.

Terminologies

1) Proxy server

Proxy is a server that intermediates the request between client and back-end server

There are two main types of proxy server, which we should be familiar for this context

1) Forward proxy :

Used by client applications like web-browsers

Browser pases the request to proxy server, which in turn sends the request to the actual URL. Thus the end server may not be able to identify the client IP.

They are usually used to bypass firewall restrictions in order to visit websites that are blocked by school, government, company etc.

2) Reverse proxy:

Used by server admins to internally map the requests to the relavant server.

A website may have several webservers running behind a reverse proxy

Nginx mainly plays the role of a reverse proxy

2) Upstream server

In computer networking, upstream server refers to a server that provides service to another server. In other words, upstream server is a server that is located higher in the hierarchy of servers. The highest server in the hierarchy is sometimes called the origin server.