25

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

hashlash
  • 897
  • 8
  • 19
  • 1
    There's some documentation here that says it's not so bad to use whitenoise considering there are a lot of configuration that should be done on nginx side which is usually not done for smaller projects: https://whitenoise.readthedocs.io/en/stable/index.html#infrequently-asked-questions – GabLeRoux Nov 29 '18 at 13:55

2 Answers2

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.

D. Evans
  • 3,242
  • 22
  • 23
0

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

run_the_race
  • 1,344
  • 2
  • 36
  • 62