<p>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.</p>

<h1>Plan A</h1>

<ul>
<li>assign each client a unique hostname.  So you might have <code>client0001.example.com</code> and so on.</li>
<li>optionally, you can let the client create a <code>CNAME</code> 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.</li>
<li>then within the CDN have the host headers map to your client ID's</li>
<li>get regular reports from the CDN for hits/bandwidth used per client ID</li>
<li>bill accordingly</li>
</ul>

<h1>Plan B</h1>

<p>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:</p>

<ul>
<li>give each client their own directory like <code>/cli0001/</code>, <code>/cli0002/</code></li>
<li>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.</li>
</ul>

<h1>Billing plans</h1>

<p>There are different ways you can go about billing folks, but common choices are:</p>

<ul>
<li>create tiers so that the first megabyte is $X/byte and the next gigabyte is a little cheaper per byte and so on</li>
<li>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.</li>
</ul>

CC BY-SA 4.0
2018-11-02T22:04:57.507Z
2018-11-02T22:04:57.507Z
chicks
<p>My clients have the ability to download pictures I uploaded to a CDN network.
The CDN network is a PaaS service I found online.</p>

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

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

<billing><cdn>
Billing my clients for CDN usage
A-S
# Billing my clients for CDN usage

(Asked by: username_0 on 2018-11-02)

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?

**Tags:** billing, cdn


---

## 1 answers

### Answer by username_1 on 2018-11-02. Score: 3 | Accepted answer

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.


---

