37👍
The downside of WhiteNoise is that if you use it without a CDN like Cloudfront or Cloudflare it will definitely not perform as well as nginx. WhiteNoise is best either when used with a CDN (as most production sites ought to be doing) or for low-traffic sites where ease of configuration trumps performance.
If you already have nginx correctly configured and don’t plan on using a CDN for some reason then you’re probably better off just sticking with nginx.
- [Django]-How do you include a csrf token when testing a POST endpoint in django?
- [Django]-Django: Display Choice Value
- [Django]-Django Admin: Using a custom widget for only one model field
0👍
So as long as you’re using a (dependable) CDN, you should be fine. If not, this is a VERY BAD IDEA.
Let me create a sceanrio! Suppose you use Whitenoise without CDN, and you upload a large file of like 10mb or so on your server which is meant to be downloaded by the end-users. If anyone of your end-users has a poor(mobile) connection and starts to download that file. YOUR SERVER WILL STOP SERVING ALL OTHER TRAFFIC. WHY SO?
The web application server will be squashed serving that poor connection and no other traffic will be entertained untill that file is served. Application Server Processes are a precious resource. They should be utilised very carefully.
- [Django]-Failing to install psycopg2-binary on new docker container
- [Django]-How use Django with Tornado web server?
- [Django]-Django ModelAdmin – fieldsets … field 'date' missing from the form