1

I need to send different resources (specially images) for same urls depending on a complex logic based on different factors (cookie, IP, time, random). I want to take advantage of CDNs (cache, availability, proximity). So, I want this CDN to make a call to my server in order to decide which resource serve to any request. It is very important to not use redirects, so the user will never see a 30X status code.

For clarification:

Is it possible using any current commercial solution?

sinuhepop
  • 20,010
  • 17
  • 72
  • 107
  • 1
    If a call to your origin server must be made from the CDN each time a request for an asset is made then why use a CDN? A CDN is meant to serve a cached copy of a particular asset to a visitor without needing to check the origin server. However, if the origin server must be checked each time for the URL requested, cookies sent, and user IP then there is no savings in latency. – CodyA Jul 11 '16 at 12:15
  • 1
    @CodyA: image download won't start very soon, but, when it starts, it will download faster taking advantage of the nearest CDN node for the user. My bandwith and server management are expensive, too. – sinuhepop Jul 11 '16 at 13:05

2 Answers2

1

Yes, I think it is already supported by CDNetworks long time ago.

It is called "Origin Logic Control" now. You can check the description from http://www.cdnetworks.com/wp-content/uploads/2013/08/CDNetworks-ContentAccel-DS-EN2.pdf:

Allows a customer’s domain to require checking with the origin on every request.

You can return a special HTTP header (or special HTTP body, I am not sure now) to tell CDNetworks to return resources directly (and using cached version if available), not 30x status code.

Gea-Suan Lin
  • 598
  • 7
  • 14
1

You can enable Redirect Chasing to get what you are looking for. Alternatively, look at the Akamai blog post on Edge Redirect for a faster option.

Eric
  • 1,431
  • 13
  • 14