Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow limit #2311

Closed
1 of 2 tasks
kawax opened this issue Apr 22, 2017 · 11 comments
Closed
1 of 2 tasks

Follow limit #2311

kawax opened this issue Apr 22, 2017 · 11 comments

Comments

@kawax
Copy link
Contributor

kawax commented Apr 22, 2017

Some users send a lot of follow requests by API.
Please add follow limit feature.
ref : https://support.twitter.com/articles/66885

  • No limit until 2000-5000 follows.
  • Deny if follows > followers*1.1

  • I searched or browsed the repo’s other issues to ensure this is not a duplicate.
  • This bug happens on a tagged release and not on master (If you're a user, don't worry about this).
@ashfurrow
Copy link
Contributor

Interesting idea! We could let the administrators set their own limit as well.

@ashfurrow ashfurrow mentioned this issue Apr 23, 2017
2 tasks
@siuying
Copy link
Contributor

siuying commented Apr 23, 2017

How about we add following options to .env:

  • USER_FOLLOWING_BASE_LIMIT (default: 1000, 0 = unlimited)
  • USER_FOLLOWING_FOLLOWER_RATIO (default: 1.1)

when follow request is made, following check is performed:

  1. if following_count < USER_FOLLOWING_BASE_LIMIT, request is ok
  2. if following_count >= USER_FOLLOWING_BASE_LIMIT AND following_count <= USER_FOLLOWING_FOLLOWER_RATIO * follower_count, request is ok
  3. otherwise request failed

If this is good, I can prepare a PR for this.

@ashfurrow
Copy link
Contributor

That makes sense to me! What do you think @Gargron ?

@ineffyble
Copy link
Member

Do we only want total limits? I'd think you might want daily limits instead of/as well as total.

@ashfurrow
Copy link
Contributor

I think daily makes sense too.

@siuying
Copy link
Contributor

siuying commented Apr 24, 2017

Agreed. So revised the above:

  • USER_FOLLOWING_BASE_LIMIT (default: 5000, 0 = unlimited)
  • USER_FOLLOWING_DAILY_LIMIT (default: 1000, 0 = unlimited)
  • USER_FOLLOWING_FOLLOWER_RATIO (default: 1.1)
  • Counters to keep track of every user "today" following count
  • Daily tasks to reset the counters

@ashfurrow
Copy link
Contributor

@siuying Makes sense! I think having a solution where a daily task isn't necessary would be ideal, but it sounds like a lot more work. Nice solution 👍

@siuying
Copy link
Contributor

siuying commented Apr 24, 2017

Maybe we can do it with Redis. I have not read the source code of the project yet, don't sure what is best.

@S-YOU
Copy link
Contributor

S-YOU commented Apr 24, 2017

Followers can make up by creating dummy instance and creating a lot of accounts programatically.
Baseline is you can't trust remote users by stats.

@ashfurrow
Copy link
Contributor

It's definitely possible, just as circumventing anything is possible. But I think this will help with no or little downside.

@kabuakan
Copy link

kabuakan commented May 8, 2017

Good Idea!
In our Instance, some spam account automatically follows many many account using the program. because of this, our Federated Timeline unexpectedly gets faster. it exceeds the permissible of our server.
we require follow limit to protect our small server.

I also want to clean the Federated Timeline after we remove such spam account. after we remove spam account, the Federated Timeline is full of noise account(no follow and no follower on our instance). I wanna remove there account from Federated Timeline.

thanks

Gargron added a commit that referenced this issue Sep 27, 2018
Configurable soft limit of 7,500, and above that, configurable
ratio of 1.1 * followers, controlled by:

- MAX_FOLLOWS_THRESHOLD
- MAX_FOLLOWS_RATIO

Fix #2311
Gargron added a commit that referenced this issue Oct 4, 2018
Configurable soft limit of 7,500, and above that, configurable
ratio of 1.1 * followers, controlled by:

- MAX_FOLLOWS_THRESHOLD
- MAX_FOLLOWS_RATIO

Fix #2311
abcang pushed a commit to pixiv/mastodon that referenced this issue Oct 1, 2019
…todon#8807)

Configurable soft limit of 7,500, and above that, configurable
ratio of 1.1 * followers, controlled by:

- MAX_FOLLOWS_THRESHOLD
- MAX_FOLLOWS_RATIO

Fix mastodon#2311
mkody pushed a commit to im-in-space/mastodon that referenced this issue Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants