Deploying Nginx + Cherrypy + Flask in Windows platform
It’s hard to get an one stop article that contains all the information to implement these in Windows.
Nginx is used as a load balancer, with its reverse proxy server.
Nginx config
The upstream servers where the incoming requests will be redirected need to be mentioned like below:
upstream backend {server <IP1>:<port1>;server <IP2>:<port2>;server <IP3>:<port3>;}
You can add as many servers as you like depending on the load. It’s recommended the upstream servers need to be in separate machines. However same IP also can be mentioned.
Configuring HTTPS changes
Nginx server can be SSL supported. This is a sample code.
You can follow this link to run Nginx as a service in windows.
Here the app from Flask is used to route the API URLs we get as HTTP requests. As Flask server is highly recommended to not use in production server, Cherrypy is doing the purpose here.