Spyke
ani.social

Update: I'll postpone this for a week as it seems like the issue comes from a Chinese datacenter in Singapore that's scraping the site very aggressively.

I'll block the IP range and see if that solves the problem.

10
wjs018reply
ani.social

Damn AI scraper bots (probably)! Thanks for the backend work!

Out of curiosity, are they just hitting the lemmy-ui frontend and not hitting the others?

5
hitagireply
ani.social

They only seem to be scraping the lemmy-ui frontend and not the others. I'm actually not 100% sure if it's scraping but this is what it looks like:

All from the same IP range in Singapore. A huge spike in requests (up to almost 5k per minute) matches the time when Lemmy-UI crashed last night.

I captcha'd the ASN (it's Alibaba btw) for now (I don't know if that's okay to do, hopefully I'm not blocking real people) but perhaps there are better solutions like ratelimiting.

Anyway, let me know if you're still having trouble accessing the site. The filter should only cover that particular ASN for now.

6
ani.social

Whoa. Was there anything else going down in that time frame? I'd be interested to have some profile on the attacker. Do you have any information about where the majority of ani.social's traffic came from before that?

2
hitagireply
ani.social

Nothing else went down. After blocking the ASN, I found out that they've been scraping the site from Hong Kong too but not as aggressively with Singapore. Or rather, the Hong Kong servers are more consistent but not as frequent bursty (I don't know how best to describe it lol). The only info I have is the ASN which points to the Alibaba Group. It also doesn't disclose what it is other than "Microsoft Edge Windows" which is not very nice in my opinion.

Cloudflare only gives me logs for the past 24 hours but most of ani.social's traffic comes from other instances federating in (unsurprisingly, Lemmy.World is #1).

::: spoiler Some graphs if you're interested:

The green line is Singapore. This happened a few hours after the crash the other night.

This is a closer look of the spike. The lines are 5 of their IP addresses. You can see that they're dormant then suddenly they start hammering the instance with requests.

These are the top countries for the past 6 hours that use GET after filtering out Alibaba. United States is high because they have a lot of web crawlers/scrapers like Open AI (at least they're honest) but I might block the AI ones too.

:::

5
ani.social

May I suggest https://www.crowdsec.net/ for those pesky scrappers? I've been using their free service for about 3 years on my personal server and it's very good for dealing with these kind of problems.

4
hitagireply
ani.social

Thanks! I've used this before but decided not to set it up for this server because of Fediverse things. I'm afraid I might break federation with it. But I'll see if I can work around that.

3
ani.social

Update after trying to use the site for a bit:

It seems like something got messed up. My mobile apps can't connect to ani.social any longer and the alternative frontends are throwing 500 errors. Meanwhile, in Firefox, I am getting prompted occasionally by cloudflare to verify that I am a human.

I am guessing that some cloudflare setting is causing it to block certain consumers of the api. Federation still seems to be working, so ActivityPub is alive and well. Similarly, I was able to connect via @[email protected], so she should still be ok. However, I am getting 403's most other ways to connect to the site.

2

My bad. I think I messed up somewhere but I'll turn off the filter I made in the meantime. I'll figure it out again when I get home from class.

3

That's actually really cool. Maybe I should put something up like this too. I've been curious about our stats lately

2

You reached the end

[Cancelled] Server Maintenance - Feb ~~14~~ 21 at 22:00 UTC | Spyke