In case anyone is wondering, AWS News is not an AWS service but a third party news website about AWS (<a href="https://aws-news.com" rel="nofollow">https://aws-news.com</a>) run by the author.<p>These days you never know, just plop down any word after AWS and you’re likely to win AWS bingo.
Very interesting. First thought is do you even need caching? How many users do you have? Why do you think aws rinvent will cause people to start using this site? First time hearing about aws-news.com.
See also: the `stale-while-revalidate` and `immutable` HTTP Cache-Control directives.<p>Stale-while-revalidate: see <a href="https://web.dev/articles/stale-while-revalidate" rel="nofollow">https://web.dev/articles/stale-while-revalidate</a> & <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#stale-while-revalidate" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Ca...</a><p>Immutable: <a href="https://datatracker.ietf.org/doc/html/rfc8246" rel="nofollow">https://datatracker.ietf.org/doc/html/rfc8246</a> & <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#stale-while-revalidate" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Ca...</a><p>And if, like in the article, you’re using a CDN, `s-maxage` (<a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#s-maxage" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Ca...</a>) is quite useful. Set it to a long time, and purge the CDN cache on deploy.
The UX mitigations section is interesting. The shifting of the layout after the first render is mitigated by CSS animations. That works when you have a "sparse" design like what they currently have. For sites with high density such as Hacker News, too many CSS animations happening after the first render could be a bad user experience.<p>I'm also wondering how to deal with scenario where we introduce sorting by popularity. With the current design, User might see articles swap places after the first render.
> Separating them into different calls will introduce some additional complexity, but in the long run it will make your applications much more scalable and maintainable.<p>I agree with the scalability benefits, but not sure about maintainability. In fact introducing additional complexity usually leads to higher maintenance costs.
> Classifying data by cacheability ... Notice how we’re combining the three types of data in the first iteration?<p>This is the key insight. But I would phrase it more as "segregate data by mutability" as it's about more than caching. More than once I've seen pain caused by a design that failed to do this.