Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django whitenoise drawback

There are many article describing the pros of using whitenoise instead of other configuration for serving static files. But the information about it's cons is kind of hard to find

Is there any cons or drawbacks of using whitenoise for serving static files?

If the question is to broad, I'm now using NGINX for serving my static files (I also use it and gunicorn for serving my Django Application) and I found its also quite easy to configure it

like image 703
hashlash Avatar asked May 13 '18 16:05

hashlash


People also ask

What does Django WhiteNoise do?

With a couple of lines of config WhiteNoise allows your web app to serve its own static files, making it a self-contained unit that can be deployed anywhere without relying on nginx, Amazon S3 or any other external service.


1 Answers

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.

like image 123
D. Evans Avatar answered Oct 11 '22 20:10

D. Evans