TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Making AWS News stupid fast with smart caching

50 pointsby tatersolid6 months ago

8 comments

redrove5 months ago
In case anyone is wondering, AWS News is not an AWS service but a third party news website about AWS (<a href="https:&#x2F;&#x2F;aws-news.com" rel="nofollow">https:&#x2F;&#x2F;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.
评论 #42318505 未加载
评论 #42316088 未加载
hshshshshsh5 months ago
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.
评论 #42319010 未加载
评论 #42324254 未加载
palsecam5 months ago
See also: the `stale-while-revalidate` and `immutable` HTTP Cache-Control directives.<p>Stale-while-revalidate: see <a href="https:&#x2F;&#x2F;web.dev&#x2F;articles&#x2F;stale-while-revalidate" rel="nofollow">https:&#x2F;&#x2F;web.dev&#x2F;articles&#x2F;stale-while-revalidate</a> &amp; <a href="https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;HTTP&#x2F;Headers&#x2F;Cache-Control#stale-while-revalidate" rel="nofollow">https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;HTTP&#x2F;Headers&#x2F;Ca...</a><p>Immutable: <a href="https:&#x2F;&#x2F;datatracker.ietf.org&#x2F;doc&#x2F;html&#x2F;rfc8246" rel="nofollow">https:&#x2F;&#x2F;datatracker.ietf.org&#x2F;doc&#x2F;html&#x2F;rfc8246</a> &amp; <a href="https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;HTTP&#x2F;Headers&#x2F;Cache-Control#stale-while-revalidate" rel="nofollow">https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;HTTP&#x2F;Headers&#x2F;Ca...</a><p>And if, like in the article, you’re using a CDN, `s-maxage` (<a href="https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;HTTP&#x2F;Headers&#x2F;Cache-Control#s-maxage" rel="nofollow">https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;HTTP&#x2F;Headers&#x2F;Ca...</a>) is quite useful. Set it to a long time, and purge the CDN cache on deploy.
tuan5 months ago
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 &quot;sparse&quot; 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&#x27;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.
tuan5 months ago
&gt; 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.
SideburnsOfDoom5 months ago
&gt; 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 &quot;segregate data by mutability&quot; as it&#x27;s about more than caching. More than once I&#x27;ve seen pain caused by a design that failed to do this.
ravishar3135 months ago
Very easy to read props to the author
Ayesh5 months ago
I now wonder how the author didn&#x27;t get a C&amp;D and&#x2F;or a UDPR take down because of the domain name.