4 ms·
The problem with just using a simple CDN (i.e. one without proper ESI support like CloudFront) is that for dynamic content is cached at a fixed TTL per URI, whi
by ukd1 14y ago
The problem with just using a simple CDN (i.e. one without proper ESI support like CloudFront) is that for dynamic content is cached at a fixed TTL per URI, which for 'apps' is likely to be very short. This means your content will expire and then be retried from the origin...which would be down.
However for static or near static sites, it's perfect - just make sure your TTL is correct :-)
- bifrost 14y agoI guess I should've included the advice of "make your main page static and use a good CDN", because they both help you a lot in the long run.
- aaronblohowiak 14y ago>This means your content will expire and then be retried from the origin...which would be down. I don't think ESI is necessarily a requirement to configure your cdn to serve stale content in case of the backend being unreachable.
- bifrost 14y agoThats correct, often times most people don't even set page cache times in their dynamic content.
- fredsters_s 14y agoI think it's because most web developers don't ever have to understand how this stuff works. It's sometimes easier to just throw hardware at a problem than engineer it better. However, understanding what you can do is key imho.
- tedunangst 14y agoIsn't the point that dynamic content is changing and you don't want to cache it? What would be a good cache time for HN for instance?
- ukd1 14y agoNo, but it's a likely requirement of a nontrivial app. You can emulate it on AWS if you're using something like backbone, but only for public content.