Hacker News new | ask | show | jobs
by alanfranz 1856 days ago
Sidenote: unless you think you can get really, REALLY popular, you won't hit a CDN-deserving load.

My own homepage/blog is hosted on a cheap 100mbps box on OVH (the server has 16gb of RAM but the CPU is from ~10 years ago or so); I use self-hosted Ghost with a caching nginx reverse proxy. Cache expiration is around 30 minutes (I think). The price for such box is around 20 EUR/month for the whole server.

In order to crash such an instance I'd need an insane amount (of course now that I need the hard numbers I cannot find the log I had dumped at the time with Locust) of simultaneous users - something that never got close to happening, not even in those couple of times where I reached the frontpage on HN. My best posts got the box/bandwidth at around 1% the load that was needed to start dropping a significant number of requests.

Don't optimize for the problems you wish you had.

3 comments

> Sidenote: unless you think you can get really, REALLY popular, you won't hit a CDN-deserving load.

I don’t agree. A few months ago my blog post on CRDTs got 100k views within a week after landing on the top of HN. It’s just hosted on ghost with some poorly written custom theme that loads a ton of CSS for some reason. The VPS I host it from wouldn’t have dealt with the traffic - it served over 50 gigs within a week; and that’s over my VPS’s monthly cap iirc.

I have the whole site behind Cloudflare’s free plan and it handled the load flawlessly. And cloudflare also makes the webpage load faster for everyone. It seems like a no brainer to me.

100k hits over a week isn't much all things considered.

A static blog post that requires ~0,5 MB of transfer can be easily served from low powered server in an hour. That's only slightly above 100 Mbps and 27 rps. Servers are fast, much much faster than that.

Of course, poorly written code might make any solution too slow.

Agree, that's not much. Since I submitted this I saw up to 2K concurrent users at some point when I was 1st. Would be nice to have this sort of traffic for a week! :p
Yeah it’s not much, but I’d rather have cloudflare think about that than me. Especially if the only cost is 15 minutes of DNS configuration, it seems very cheap for the peace of mind.
Friendly reminder that the CDN doesn't just protect the origin server from excessive load, it can also drastically improve end-user latency.
Sure.

But is the added complexity worth the whole thing? For a personal blog?

I think you may be overestimating the complexity; fronting a blog with a CDN is trivial, even enabled by default on modern platforms.
That's possible. But a lot of people overestimate their traffic/load needs.
Totally, that's a very important reason to use a CDN.
Hi! The Kubernetes cluster is managed by myself so I have a pretty amount of resources for just 70e/month, and I can scale with one click. I plan on writing about the infra. Of course I'd like to think that this project will work, so I was happy to prepare for it. I enjoy devops besides coding so I am happy to do this. I need to consider what would happen if, say, a couple of my users hit the front page of HN at the same time or things like that. Already myself I have seen a peak of 2K concurrent users since I posted this, so I don't want to crash easily. :) As for the CDN, it's also for performance/reduced latency.