0

I'm evaluating Azure CDN, which seems like it can be a great solution... but for some reason they tried to make it as complex as possible to use...

So, I was thinking to create a Windows service that uses something like FileSystemWatcher to monitor specific folders, that way, maybe I can make it transparent to the programmer, so every image that is being added / uploaded through FTP / uploaded by a web user will automatically be uploaded to the Azure CDN through their super complex APIs...

Assuming every file is created/updated/deleted on the Azure CDN as well, I'm thinking I could use the reference to the Azure CDN in order to render the image.

I also wonder how can I use a fallback for images - for example, lets say an image was uploaded but it takes 10 seconds for it to get to the CDN and maybe more time to replicate to all geographic locations - in that case, maybe I can load it locally for the first 10 seconds and then use the CDN URL... any suggestions?

  1. Is there a solution that already does that synchronization?
  2. Can you think of any issues with implementing something like that?
  3. How long it would take for the images to get published before it is safe to use them?
BenMorel
  • 34,448
  • 50
  • 182
  • 322
Yovav
  • 2,557
  • 2
  • 32
  • 53

1 Answers1

0

The Azure CDN is filled automatically by the first request (pull model) at each CDN location, so to answer your questions:

  1. Azure does this automatically
  2. You could send a request from different locations around the world to pre populate, difficult to implement
  3. Image's are directly available, although the first request could take some extra time as the image is not yet in the CDN location, so a call to the source (storage/website/cs) is done

Filling all the CDN without knowing if there is traffic coming from these regions could be more expensive, read my old blog post on this: http://blogs.infosupport.com/using-azure-cdn-and-bing-maps-and-cache/

Erik Oppedijk
  • 3,496
  • 4
  • 31
  • 42
  • Thanks. your blog is interesting... I did not think I'm going to get charged by the traffic that the redundant geo locations are generating... however, I don't think you understand my question - Azure won't sync my folders from my server to the Azure CDN location automatically... (for example, if a web user uploads an image to my web site it will not get replicated to the CDN) that is what I'm trying to resolve right now. – Yovav Nov 13 '14 at 05:38
  • The CDN is pull based, so there is no replication to the CDN. If you have mapped the CDN to an Azure WebSite, you will need the CDN URL to access the same content, the CDN will fetch the file on the first request. If this is not working, check the CDN URL, is this correct? – Erik Oppedijk Nov 13 '14 at 08:29
  • Erik - the CDN URL is fine, as mentioned above - I'm looking for a solution that can sync the folders at the web site to the Azure CDN seamlessly... – Yovav Nov 14 '14 at 17:01