2

I've never subscribed to a CDN before, and was hoping someone could share their experience. My question is: Is there a significant delay between a file being submitted via a CDN (via API), and it's availability on the network (including edge nodes)? Or does synchronisation across the network happen relatively quickly (e.g. less than a couple of seconds)?

I'm looking at MaxCDN now (so any experiences related to that CDN would be very useful).

EDIT: Sorry, I should have mentioned, I'm specifically interested in when new files are available on the network (not new versions of existing files).

UpTheCreek
  • 1,628
  • 10
  • 32
  • 48
  • BTW - I realise that is a bit of an edge question (which presumably is why the vote to close). I don't think its a perfect match for SO, Serverfault or webmasters. – UpTheCreek Mar 27 '13 at 12:55
  • 1
    You could just use origin pull, which avoids this problem entirely. – Michael Hampton Mar 27 '13 at 13:36
  • My CDN provider doesn't charge for storage - so objects expire after 24 hours after they're lasted touched on the edge node. Something to keep in mind when looking at origin pull. – Jay Mar 27 '13 at 14:16
  • @MichaelHampton - wasn't familiar with it, but yes it seems like the way to go. – UpTheCreek Mar 28 '13 at 09:51
  • @Jay - yeah good point. I checked and it seems you can override the default cache expiry time in MaxCDN (they say 'no limit' but I'm sure there must be). – UpTheCreek Mar 28 '13 at 09:52
  • @UpTheCreek - make sure to distinguish between how long *they'll* cache the object for, and how long they will tell the user to. They may well tell the user to store it forever, but they might not do so themselves... – Jay Mar 28 '13 at 10:01
  • @Jay - yeah apparently its the time before it's purged from the CDN (not just the cache headers sent to the client), according to their support. The docs are a little more ambiguous though: http://support.netdna.com/howto/custom-expiry-headers/. – UpTheCreek Mar 28 '13 at 11:28

1 Answers1

3

(This will probably be closed as off-topic since it is leaning towards shopping suggestions.)

Yes - there will be a delay.

Whether it's 1 second or 1 hour, it depends on the CDN provider. There are no hard and fast rules, unfortunately. The answer to your question you're really asking is: you should not assume a fast propagation. If anything, CDN nodes will tell your browser to cache the objects - so there is every chance users will have stale resources for days even if the edge nodes are updated instantly.

(One common way of getting around this is tagging a unique value to your resources, like logo.jpg?123456789 where the number is the last modified time of the resource, or some incrementing value - but I think this is already beyond the scope of the question.)

Jay
  • 6,544
  • 25
  • 34
  • Thanks! The files will not change, so I'm not worried about long cache rules. However there will be files added regularly, and I'm concerned about when these new files will become available to users after they are added via the API. – UpTheCreek Mar 27 '13 at 13:05
  • My personal experience is adding new files is one of the quickest operations. Replacing a file is really hit-and-miss, some nodes will get the latest object instantly, some will take an hour to get it. But, that's just my personal experience - no CDN provider will guarantee you instant propagation, it just isn't worth it. – Jay Mar 27 '13 at 13:08