Remix.run Logo
storus 5 hours ago

Is there any cheap way to run personal websites without getting cooked by bots these days, degrading the performance? A $5/month VPS won't cut it anymore.

jerf 4 hours ago | parent | next [-]

"A $5/month VPS won't cut it anymore."

Are you speaking from experience, or inferring from articles like this?

I serve a static site on the lowest Linode $5/month VPS and it is grotesquely overprovisioned for that use case. It is not the case that every site is getting slammed every second by hundreds of requests per second.

Now, if you have some sort of dynamically-computed website that is generated by a slow scripting language that is poorly optimized and hits the database too many times for a single page, yeah, it doesn't take many RPS to take you out. But that isn't the only option; it's the slowest of the slow options. Realistic, there are plenty of sites that match that description, but I concatenated that many clauses on purpose. Drop any one of them and your personal site will be fine.

marginalia_nu 4 hours ago | parent [-]

It's almost always the DBMS that's the bottleneck when websites drop from traffic. As long as you don't do anything fancier than primary key look-ups you're probably fine though.

I survived handling the search search traffic generated by this thread[1] on PC hardware off a residential broadband connection without any sort of degradation. Only time I've gone offline from traffic was when Elon Musk tweeted a link to one of my blog posts, and that was just a short temporary blip.

[1] https://news.ycombinator.com/item?id=28550764

allthetime 4 hours ago | parent | next [-]

For a “personal website” or any relatively simple static content site, the DB should not be getting hit much at all. Cache is your friend. For my sites I have a map of all relevant queries and when we do updates we run the relevant queries one time and cache them to both memory and file system.

marginalia_nu 4 hours ago | parent [-]

Should being the operative word. In practice it's both easy and common to have a database do unnecessary work when generating a page, a problem that often only rears its head when under unusual load.

jerf 4 hours ago | parent | prev [-]

Yeah, IIRC my django site was 3 queries, all correctly indexed, for a main page hit, and 2 for the actual posts. I don't recall the exact perf numbers, but I'm pretty sure it was easily in the 50/rps range for a small dual-CPU host... which doesn't sound like much in "requests per second" but is enough to cover a front-page-HN'ing just fine. And that "rps" was just the database-backed pages, all the static content was served over nginx, so that 50rps is a "real", 50 humans per second rps, not something getting consumed by only two or three humans.

marginalia_nu 4 hours ago | parent | prev | next [-]

Static files on literally any hardware from the last 15 years on modern server software simply won't get cooked by bots. The network switch will bottleneck you before the server will. Your ephemeral port range will run out before the server will.

throwaway219450 4 hours ago | parent [-]

Bandwidth is still not free, if you cloud host.

I had a client ask me to look into why their bill spiked 5x (admittedly not by much - from a few dollars to tens). They run a static site, and it turned out someone had inadvertently replaced an image with a massive uncompressed photo. Every unique visitor was caching O(25MB) when they loaded the homepage. Also funny because now everyone has 100Mb+ internet, nobody noticed a few extra seconds on load.

There are lots of solutions to this if you actually need to serve a lot of bytes, but you can get stung even with very simple deployments. Not everyone wants to put Anubis or Cloudflare in front of their site.

kube-system 4 hours ago | parent [-]

Only at the top few cloud providers. Search "Unmetered VPS" and you can find $5 VPSes with no bandwidth bill

speak_plainly 4 hours ago | parent | prev | next [-]

Cloudflare offers a free plan that's fantastic. The free plan gives you effectively unlimited DNS/CDN traffic for a normal site, while the main practical cap is 100,000 Worker invocations per day, with 10 ms CPU per Worker request and a 100 MB request body limit. (If that means anything to you).

The next tier up from free is $25/month or $240 per year.

https://www.cloudflare.com/plans/ https://www.cloudflare.com/plans/free/

matsemann 3 hours ago | parent | next [-]

I use this. Buy a domain, set up a cloud flare pages that builds an Astro page on git push, served statically for free.

everybodyknows 3 hours ago | parent | prev [-]

Does the free tier support geo-blocks? I'm experimenting with it -- running only a "hello, world" site thus far -- but haven't come across any offer of geo-block capability.

Athas 5 hours ago | parent | prev | next [-]

I run my personal website (and a bunch of other websites and services) off a somewhat more expensive but still reasonable VPS (I think 20€ at TransIP - it's so little that I forgot). Load is basically nil most of the time anyway. I think the bot problem is not so bad for personal websites.

inigyou 4 hours ago | parent | prev | next [-]

Yeah, you just make sure your site is fast enough to handle more than 1 RPS.

But if you want them to actually stop, you can also just serve a little JavaScript page that sets a cookie and refreshes, to anyone who hasn't set the cookie. The DDOS attacker doesn't run JavaScript.

npilk 3 hours ago | parent | prev | next [-]

GitHub Pages, GitLab Pages, and Cloudflare Pages are all free. If you have a static site, you don't need to worry about lock-in, since your files are easily portable to a different provider.

I made this tool to try and make it easier for beginners to get something up on the public web for free: https://weejur.com

coldpie 4 hours ago | parent | prev | next [-]

I host a couple WordPress blogs on Lithium Hosting. It's like $5/mo, fixed cost, and I've never had any issues. If I somehow hit a transfer usage cap, they would just shut my site down until the next month, but I've never had that happen.

hk__2 4 hours ago | parent | prev | next [-]

All my personal websites are on a single $5/mo OVH VPS and it works perfectly fine.

somehnguy 4 hours ago | parent | prev | next [-]

A $5/month VPS should cut it completely fine unless you're doing something very complicated.

cdrnsf 4 hours ago | parent | prev | next [-]

My site's built in Go on a reasonably priced VPS and holds up well. I do geoblock traffic from China and a few other countries as well as IP ranges maintained by Spamhaus.

bigbuppo 4 hours ago | parent | prev | next [-]

Static site. If you do go for a WCM of some sort you should make sure that if it has a calendar view of some sort it isn't unbounded but that it only goes as far back as your first post, and only goes as far forward as your latest. That's one of the many ways the poorly-implemented AI systems get stuck.

strenholme 4 hours ago | parent | prev | next [-]

I have a low cost VPS (actually two in two different pre-AI datacenters) and it runs fine. I use nginx to serve the web pages, and the content is about 99% static content.

The vBulletin and PHPbb style forums have issues with slowdown (I haven’t had a forum since 2015; even back then those forums were overrun with spambots), but static content on a nginx site can be served lightning fast.

kube-system 4 hours ago | parent | prev | next [-]

If you have a static site, GitHub pages is free

strenholme 4 hours ago | parent [-]

As someone who is moving my static sites over to GitHub pages: While they are free and work really nice, the problem is that GitHub frequently doesn’t deploy updates to the pages.

I have frequently have had to update a GitHub page, push the change, and then GitHub’s actions puke instead of deploying the change. The workaround is that I have a .txt file with a list of GitHub actions which failed, and when GitHub actions fails, I update that .txt file and push the updated site, which GitHub actions will hopefully successfully deploy.

GitHub pages are OK for pages which aren’t updated very frequently, but they are not OK for pages which update frequently.

allthetime 4 hours ago | parent | prev | next [-]

A $5/month VPS is fine for mostly static content. I’ve got a site that has been pulling millions of viewers and sits at the top of google for its niche for a decade. It is now hammered with bot traffic constantly. But everything is cached so it’s fine.

rglover 5 hours ago | parent | prev | next [-]

All of my boxes are cheap VPS. Highly recommend people throw Cloudflare in front of their stuff. I switched all of my load balancers over to there and all of that bot crap went away. That combined with a proper UFW setup keeps the weather clear for me.

inigyou 4 hours ago | parent [-]

Highly do not recommend centralising the internet.

esseph 4 hours ago | parent [-]

Build a better service or better technology.

If you can't, well then... We're stuck.

inigyou 3 hours ago | parent [-]

Until proven otherwise in your specific case, the better technology is just hosting directly on a VPS without Cloudflare. And if your 5$ VPS is maxed out, while serving any less than 10 requests per second, then you need to optimize your software before considering an upgrade.

esseph 2 hours ago | parent [-]

Okay but the bots are loose and you have a bandwidth cap on most VPSs.

Because you have no CDN, all the bots are coming directly to you.

Because that's no CDN or distributed WAF, they're hammering your box.

Because your IP is directly exposed, you're also showing up on Shodan.

Your server may have enough CPU and RAM to handle the load, but does your monthly bandwidth allocation with your provider?

Many are finding previous bandwidth limits (starting around 10TB/month) are no longer enough.

inigyou 13 minutes ago | parent [-]

Bandwidth is cheap at places that don't call themselves "cloud". You can even get unmetered. 10TB/month is usually enough, even with bots. If you're serving large files, put a simple bot test on the page before the files.

HaloZero 3 hours ago | parent | prev | next [-]

I have a very low traffic blog and I just use the nearlyfreespeech to host it. So far it’s been less than $1

ashton314 5 hours ago | parent | prev | next [-]

I'm on a $4/mo droplet on Digital Ocean and my static site has been just fine. I'm using Caddy and it seems to handle the load like a champ. My site is very lightweight though, so ymmv.

ashu1461 4 hours ago | parent | prev | next [-]

Cloudfare has a very generous plan usually for hobby projects. The article did mention that cloudfare did not work for them, but they have recently introduced few features to block AI crawling as well.

archerx 5 hours ago | parent | prev | next [-]

A lot of my sites are on $5 vps and run very well.

yoursred 5 hours ago | parent | prev | next [-]

Sef-host with tailscale or something similar

dmux 4 hours ago | parent [-]

Exactly. I've been hosting a site from a spare M1 Macbook Pro with Ngrok. An equivalent bare metal server would be much more expensive.

esseph 4 hours ago | parent | prev | next [-]

My sites run on cloudflare workers and static pages for free

stefantalpalaru 4 hours ago | parent | prev [-]

[dead]