I have an Azure storage account that hosts 20 MB files. Users download the files directly from the storage account, and there is no CDN or anything monitoring the traffic. I'm concerned that users can download mass amounts of data, leading to high egress costs for us. Preferably, I want to use a service that costs less than the amount that we would save by using such service.
There are two possible ways I want to solve this:
- Limit an IP to 50 downloads a day. This is ideal but might take some time to set up.
- Limit an IP to a reasonable rate, like 5 per second. This sounds like something that Azure DDoS Protection is designed to do, though that service costs a lot.
Is there a good solution to enable us to rate limit downloads to our Azure Storage account?
Would the free tier of Cloudflare work for this use case?