Ask HN: Why does HN not use any CDN?

5 points by vinay_ys ↗ HN
I see periodic slow-downs and hung page loads on HN. This got me curious. I see HN is served from a M5 hosting IP address without any CDN in front of it. Is it a conscious choice to not use CDN even to this day?

p.s: I also saw an old post by pg about /unban?ip=. I tried that and got an unbanned/sorry response. But that didn't make any difference to the slowness I see. If my IP was indeed banned, I'm even more curious. I don't believe there's any abuse traffic coming my IP.

9 comments

[ 3.2 ms ] story [ 26.4 ms ] thread
Try sending an email to the mods hn@ycombinator.com
If the platform runs fine 99% of the time without a CDN, why add another layer to complicate things?
> Is it a conscious choice to not use CDN even to this day?

Hackernews is very lean and minimal which is why it can absorb huge amounts of traffic without a whimper. It doesn't serve images, mostly text instead, and I imagine the codebase is minimal too.

HackerNews is basically just text and links, so... I don't see how a CDN would only complicate things, honestly
So what could be cached on CDN? Front page? Every thread and page therefore? Some other pages?

Now how to keep these up-to-date as new posts comes and ensure that they stay in sync? What about pages if you have comments there? Looking at code it seems "1 hours ago" is in the html, so would need some javascript or something to dynamically calculate that too..

Seems, much more fragile and error prone system compared to what is in use.

In my experience this site is way more reliable and responsive than almost any other site on the internet. I often click the comment link instead of the main link because the main link is going to send me to some overstuffed landing page with ads and crap like that. Hacker News superpower is it's leanness and kiss approach. I say if it ain't broke, don't fix it.
Hah, exactly. I always check out the first couple of comments before diving into the 10+ MB website.
Hacker News is a relatively lightweight site. It has no images and only serves text.

Adding a CDN would also complicate things, especially for logged in users. HN is server side rendered so they’d need to implement someway to bypass the cache for these users.

Plus, as the site is very discussion heavy, it’d need a very low TTL for cache expiry which would reduce the benefit.