teolives
teolives

Reputation: 83

Windows azure relationship between bandwidth and CDN

What is the relationship between bandwidth and CDN in Windows Azure? Let's say I have 3 MB of content seen by 100000 users monthly = 300 GB bandwidth without a CDN. If I want to use their CDN how does this work? Is the bandwidth calculated to feed the various CDN nodes (i.e. 3MB * (number of nodes))? From there on is the price calculated as CDN price?

Regards,

Matteo

Upvotes: 1

Views: 1009

Answers (1)

dunnry
dunnry

Reputation: 6868

The CDN bills for egress in two locations - first to fill the cache, and secondly to serve the resource. You are also billed for transactions. Here is an example:

  • You have a icon, 'icon.png' that will be served from the CDN. It is 1K and cached for long time. 1M users hit it from every location in the world.

In this scenario, you would be billed for the bandwidth from blob storage to each CDN location used (there were 26+ or so locations not too long ago). That would be 26x 1K or 26K of egress + 26 transactions from blob storage to each location. Now, you would serve the file 1M times - 1 GB of bandwith and 1M transactions. Your total charge would be 1GB of bandwidth (broken up by region prices) + 1M transactions + 26 transactions to fill cache + 26K of bandwith (again, by region).

The CDN is good for serving data that does not change frequently. This is not a bad deal at all and great use of CDN. However, if you introduce the added complexity of frequently expired objects, you will then hit the case where you need to repopulate the cache. Final example: you have 1MB that changes frequently (every 15 mins) and 100K users requesting it over month from around the world. Here is what you would be billed:

  • 1MB x 26 CDN x 4 update/hr x 24 hrs (2.5GB/day, 73GB/month) egress to populate caches
  • 100K x 1MB = 97GB of bandwidth to serve actual file.
  • 100K transactions for serving + transactions for filling cache

In this case, you can see that you actually spend a fair amount of money filling the cache and almost as much just serving it. It might be better to just serve from blob storage here assuming latency was not a huge factor.

Upvotes: 5

Related Questions