w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Flask + Nginx proxy: Does it matter which one serves static files?

Yes, it counts.

nginx is written in C and handles all what shall web server handle for your static files.

Apart from speed, you will also get lower load on your Python code.

Regarding caching - if you like, nginx can serve for your app also as a cache, see NGINX doc. But if the request is to be processed by Flask, there is nothing nginx would speed up apart of offloading your app by e.g. serving static files.

The extra effort for configuring nginx for static files might not be necessary while developing an app, but for production use I would recommend it.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.