django - Best way to store and serve static content in bulk -
i have application generates static pages. around 10 html pages/min. these pages going served users. on server side, using django development framework gunicorn run app server , using nginx 'reverse proxy'.
with stack, have few doubts regarding design storing , serving content. not sure, if approach cause performance penalty not able guess now. here thoughts on this:
storagei thinking of flat file based scheme store content. stored according timestamp can clear/delete them in future in case content expired or it's not required. path typical file /var/www/project/content/timestamp/file/path
.
i checked django flatpages (app available in django) allows easy maintains of flatpages using admin panel , api. looks more promising for,
fixed number of pages ,(for me, it's huge , varying)
if have editing requirement pages. (i don't need this)
serving for serving content planing of exposing '/var/www/content/' folder nginx can straight served nginx without delay app server. in case, see performance hit. can utilize static file caching engine varnish.
any suggestion or thought helpful. thanks..
i offload responsibility of storing these static files s3, , serve them via cloudfront.
django caching nginx varnish django-flatpages
No comments:
Post a Comment