3 ms·
This is interesting since you could effectively use CloudFront as a proxy by setting the TTL to 0 and using a custom origin.
by javery 15y ago
This is interesting since you could effectively use CloudFront as a proxy by setting the TTL to 0 and using a custom origin.
- hemancuso 15y agoThat sounds like an extremely expensive proxy. Why would you want to do that?
- javery 15y agoOnly if you want to squeeze the best performance out of the web - for instance if you were serving up JavaScript that is different for each request you could have it pass through CloudFront. You see this in the widget and ad business quite a bit.
- pieter 15y agohow could this possibly be faster than a direct connection of the client to your origin server?
- deleted 15y ago[deleted]
- awj 15y agoI don't think it would be. Also, if you're constructing purpose-built javascript the best solution might be to merge that information into the url scheme so that you can cache the results.
- hemancuso 15y agoCloudfront doesn't replicate your keys out to each edge each time you invalidate. It only retrieves them from the origin as a result of a cache miss. If TTL was 0 you would miss each request, making each request slower than serving directly from the origin.
- ceejayoz 15y agoThe only reason I can imagine is if you were hitting a limit on server workers. CloudFront would fetch the file much faster than the average user, freeing up the worker for something else while CloudFront still passes the file along to the guy on dialup. It'd probably be cheaper to just get another server, though.