My clients have the ability to download pictures I uploaded to a CDN network. The CDN network is a PaaS service I found online.

I want to be able to distinguish between clients who download those pictures, so I can bill them by their usage.

Does anyone know such CDN service, that allows to bill (or at least measure) the clients of their (the CDN's) users?

1 Answer 1


I did something similar with Akamai a few years ago that might work for you and I have a Plan B in case this doesn't fit your needs.

Plan A

  • assign each client a unique hostname. So you might have client0001.example.com and so on.
  • optionally, you can let the client create a CNAME within their domain. I was doing this for ad creatives so I wanted blame for content to go the originators of the content. Since it looks to end users like they were serving it from their own domain and my org was just in the middle of a CNAME chain that most people wouldn't notice I'm guessing the grief went where it belonged.
  • then within the CDN have the host headers map to your client ID's
  • get regular reports from the CDN for hits/bandwidth used per client ID
  • bill accordingly

Plan B

If you don't want to do all of that mucking with DNS or if your provider won't do the sort of mapping described there's still a way to make this work:

  • give each client their own directory like /cli0001/, /cli0002/
  • write your own reporting that downloads the raw logs from the CDN provider and then pulls the client ID's out of each directory name and totals it all up for you.

Billing plans

There are different ways you can go about billing folks, but common choices are:

  • create tiers so that the first megabyte is $X/byte and the next gigabyte is a little cheaper per byte and so on
  • give everyone a quota for a fixed fee or call it "free" within a broader service. Then charge for going over the quota at a reasonable rate.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.