I am building a service that is servicing a lot of audio files. The issue is that I need to keep a record on what files are being accessed. My initial thought was to use BackBlaze B2 with CloudFlare but I don't really know if I will be able to get statistics out of this.
Do you have any general advice for someone that wants to keep track of downloads when using third party CDNs and hosting services? Do you have any specific tips for the setup I am thinking of using?
-
Your goals to cache the files and to get accurate statistics are are opposed to each other. You'll have to find a suitable balance. This could mean using front-end analytics (unreliable but you get full caching), or using Cloudflare Workers for statistics (requires you to suppress CF caching), or using full caching but accepting low-quality statistics.amon– amon10/02/2019 12:15:06Commented Oct 2, 2019 at 12:15
-
@amon That is what I was afraid of, I just need to log the request. My initial thought was host it all on my own servers so I can cache the actual content and do some logging beforehand during the request which is not cached. Unfortunately, caching on the front end won't work since the files will be hotlinked from multiple sources.Ms01– Ms0110/02/2019 12:32:30Commented Oct 2, 2019 at 12:32
-
1I wonder if you can buy the stats data from the CDN. They definitely must have the data.9000– 900010/02/2019 16:32:52Commented Oct 2, 2019 at 16:32
-
Hmm, any reason you can't receive the request yourself, log it, then hand it off to the third party to be serviced?candied_orange– candied_orange10/03/2019 07:47:11Commented Oct 3, 2019 at 7:47
-
While this question currently has 2 close votes for being too broad, I think this question is off topic because the current answers seem to be referring to a tool or documentation. It is hard to see how this question can be edited to be on topic.Greg Burghardt– Greg Burghardt10/03/2019 12:22:12Commented Oct 3, 2019 at 12:22
1 Answer 1
You can do this with AWS Cloudflare via logs to S3 buckets.