[Django]-Django whitenoise drawback

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.

0👍

Nginx supports automatica SSL renewal via Certbot, this is a big advantage to me.

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.

Leave a comment