What is the Windows Azure Content Delivery Network (CDN)?
The Windows Azure CDN is a global solution for delivering high-bandwidth content hosted on Windows Azure
. The CDN caches publicly available objects at strategically placed locations to provide maximum bandwidth for delivering content to users.
What is Windows Azure billing in general?
The Windows Azure CDN is a pay-per-use service. As a subscriber, you pay for the "amount" of content delivered. This article will discuss how customers are billed for using the Windows Azure CDN. We'll cover the differences in geographies (regions), what incurs cost, and some specialized billing cases.
What is a billing region?
A billing region is a geographic area used to determine what rate is charged for delivery of objects from the CDN. The current billing regions are:
- United States
- Rest of World
for more details.
How are delivery charges calculated by region?
The CDN billing region is based on the location of the source server delivering the content to the end user. The destination (physical location) of the client is not
considered the billing region.
For example, if a user located in Mexico issues a request and this request is serviced by a server located in a US point of presence (for example Los Angeles) due to peering or traffic conditions, the billing region will be US.
What is a billable CDN transaction?
Any HTTP(S) request that terminates at the CDN is a billable event. This includes all response types, success, failure, or other. However, different responses may generate very different traffic amounts. For example, 304 NOT MODIFIED (and other header-only) responses generate very little transfer since they are a small header response; similarly, error responses (e.g., 404 NOT FOUND) are billable but incur very little cost because of the tiny response payload.
What other Windows Azure costs are associated with CDN use?
Using the Windows Azure CDN also incurs some usage charges on the services used as "origin" for your objects. These costs are typically a very small fraction of the overall CDN usage cost.
If you are using blob storage as "origin" for your content, you also incur charges for cache fills for:
- Storage - actual GB used (the actual storage of your source objects),
- Storage - transfer in GB (amount of data transferred to fill the CDN caches), and
- Storage - transactions (as needed to fill the cache. Read this blog post for more information.)
If you are using "hosted service delivery" (available as of SDK 1.4) you will incur:
If your client uses byte-range requests (regardless of "origin" service):
- Windows Azure Compute time (the compute instances that act as origin), and
- Windows Azure Compute transfer (the data transfer from the compute instances to fill the CDN caches)
How much transfer is incurred to support the cache?
- A byte-range request is a billable transaction at the CDN. When a client issues a "byte-range" request, this is a request for a subset (range) of the object. The CDN will respond with only the partial content requested. The "partial" response is a billable transaction and the transfer amount is limited to the size of the range response (plus headers).
- When a request comes in for only part of an object (by specifying a byte-range header), the CDN may fetch the entire object into its cache. That means that although the billable transaction from the CDN is for a partial response, the billable transaction from the origin may involve the full size of the object.
How do I manage my costs most effectively?
- Each time a CDN point of presence needs to fill its cache, it will make a request to the origin for the object being cached. This means the origin will incur a billable transaction on every cache miss. How many cache misses you have depends on a number of factors:
- How "cacheable" content is: If content has high TTL/expiration values and is accessed frequently so it stays popular in cache, then the vast majority of the load is handled by the CDN. A typical "good" cache-hit ratio is well over 90%, meaning that less than 10% of client requests have to return to origin (either for a cache miss or object refresh).
- How many nodes need to load the object: Each time a node loads an object from the origin, it incurs a billable transaction. This means that more global content (accessed from more nodes) results in more billable transactions
- Influence of TTL: A higher TTL (Time-To-Live) for an object means it needs to be fetched from the origin less frequently. It also means clients (like browsers) can cache the object longer, which can even reduce the transactions to the CDN.
Set the longest TTLs possible.