lundi 28 décembre 2015

How to measure traffic (bandwith) of static files on web

I am not sure how to keep track of bandwidth for a static file like imgur does (see pic below). I currently use node.js behind nginx. I consider two options. First one is; parsing nginx log file daily and writing to a database. Second one is; streaming the file via node.js and calculating the bytes send and writing the data on every instance.

The static files are video and image files with various sizes.

Is there another way that i can't think of yet?

imgur bandwidth statistics




Aucun commentaire:

Enregistrer un commentaire