Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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 :-)



I 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.


>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.


No, 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.


Thats correct, often times most people don't even set page cache times in their dynamic content.


I 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.


Isn'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?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: