by spiderfarmer · 10mo ago · 0 comments
If I don’t block, 95% of my resources will be spent on feeding bots.
I had to block all “official” AI useragents and entire countries like Singapore and China. But there are so many unofficial bots which spread their work over dozes of IP addresses that it seems impossible to block on the reverse proxy level. How do you block those?
Okay, but why should you care? Resource usage for a regular website that isn't doing some heavy dynamic stuff or video streaming tends to be rather negligible. You can easily serve 100k+ requests per second on servers that costs less than $100/mo.
It really shouldn't be worth your time to do anything about the bots unless you're doing something unusual.
A very important question which deserves a good answer.
> Okay, but why should you care?
Not that kind of answer - this is bad manners or worse. The counter-question "Why do you ask that" isn't an honest or meaningful answer - it's indefensible defense of allowing meaningless traffic without any defenses.
> Resource usage for a regular website that isn't doing some heavy dynamic stuff or video streaming tends to be rather negligible.
Maybe it is doing video streaming, or audio, or lots of images or very dynamic, or written in Python - the trend is to use more and more bandwidth to make the sites more attractive.
> You can easily serve 100k+ requests per second on servers that costs less than $100/mo.
Maybe $100/mo isn't a trivial amount for a site that has no video, isn't dynamic, etc - your assumptions contradict themselves and reality.
Without any maybe, the prices of RAM, bandwidth and hosting are going up while usage limits are going down - inflation. There's no reason to sacrifice $100/mo to hostile bot daemons which are sure to ask for more and more in the future.
It's absolutely clear that giving a free reign to bots will encourage more bots and more sinister behavior because the boundary between bot scraping and ddos is blurry, you're essentially arguing for allowing soft ddos which can be turned up at times just to make a site ineffective when it's needed.
Nah. Based on years of experience, the typical person asking this question is asking because they're bothered by log entries. They're not asking it because the requests are actually being somehow disruptive. The correct answer is "don't stress out about normal background noise".
>Maybe $100/mo isn't a trivial amount for a site that has no video, isn't dynamic, etc - your assumptions contradict themselves and reality.
$100/mo is a trivial amount for anything that is visited hundred thousand times in a second.
>It's absolutely clear that giving a free reign to bots will encourage more bots and more sinister behavior because the boundary between bot scraping and ddos is blurry, you're essentially arguing for allowing soft ddos which can be turned up at times just to make a site ineffective when it's needed.
Not really. The bots have a strong incentive to not be disruptive.
>Without any maybe, the prices of RAM, bandwidth and hosting are going up while usage limits are going down - inflation. There's no reason to sacrifice $100/mo to hostile bot daemons which are sure to ask for more and more in the future.
Prices of bandwidth and hosting are not going up, usage limits are not going down. This is not a real thing that's happening. Servers (and bandwidth) are in fact cheaper than ever, except perhaps for the RAM.
If the resource usage of a website is a concern, either your code is straight up broken or you're doing something rather unusual. While doing unusual things, it's normal to encounter unusual problems. However, when encountering an unusual problem it's good to stop for a moment and consider if your approach is wrong.
At some point the only good way to stop scraping becomes paywalls. You can't defeat sophisticated scrapers through any other means.
A very good and important question. I was thinking about some combination of proof of work and a dynamic list of offending IPs which servers would update periodically, similar to how such lists are used by ad-blockers.
It would be ideal to have some legislative protection from ddos together with technical means of disclosure and prevention, bot scraping is a from of soft ddos.