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

[Bug]: Lemmy doesnt disable federation with offline servers #3134

Closed
4 tasks done
ImLunaHey opened this issue Jun 16, 2023 · 5 comments
Closed
4 tasks done

[Bug]: Lemmy doesnt disable federation with offline servers #3134

ImLunaHey opened this issue Jun 16, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@ImLunaHey
Copy link

ImLunaHey commented Jun 16, 2023

Requirements

  • Is this a bug report? For questions or discussions use https://lemmy.ml/c/lemmy_support
  • Did you check to see if this issue already exists?
  • Is this only a single bug? Do not put multiple bugs in one issue.
  • Is this a UI / front end issue? Use the lemmy-ui repo.

Summary

If I federate with another server and then stop my lemmy instance no matter how many errors the other server gets it never stop flooding my server with lemmy traffic.

After so many failed requests the other server really should stop sending traffic.

image

Steps to Reproduce

  1. Install lemmy
  2. Search for another server on lemmy
  3. Shutdown lemmy
  4. Profit?

Technical Details

N/A

Version

N/A

Lemmy Instance URL

No response

@ImLunaHey ImLunaHey added the bug Something isn't working label Jun 16, 2023
@cperrin88
Copy link

That is a bit of a hard problem to solve. What is the right amount of time/requests to wait. It is possible that the Instance is just in maintenance mode or overloaded. Maybe the source server has network problems. It is really difficult to find out if it is intentional.

I think the best solution would be to find a way for an instance to signal that it will shut down and wants to be defederated. I don't know how the signaling works but maybe deleting all the communities and users before shutting down might work.

Apart from that maybe lemmy should have a longer back off after a while, like only retry daily or something similar.

@ImLunaHey
Copy link
Author

Would be great if I could send back a header or something to disable this from my end without needing to bring the lemmy instance back up.

@Neshura87
Copy link
Contributor

A quick retroactive fix would be to introduce some kind of timed hearbeat signal that needs to be sent once in a while in the future. The heartbeat could then be sent in the following scenarios:

  • new federated instance
  • graceful shutdown
  • random time window before heart beat expires (ie for a weekly heartbeat maybe sometime between 1-2 days before heartbeat expiration)

Since the heartbeat is not frequent it should not impact load too much, the time window with revalidation before expiration would also allow for network outages and maintenance windows without de-federating from the majority of lemmy. Plus even in the case of a de-federation occuring resending the heartbeat could be used to catch up that instance more quickly

@Nutomic
Copy link
Member

Nutomic commented Jun 30, 2023

Duplicate of #2221

@Nutomic Nutomic marked this as a duplicate of #2221 Jun 30, 2023
@Nutomic Nutomic closed this as completed Jun 30, 2023
@ImLunaHey
Copy link
Author

@Nutomic this is not a duplicate. That talks about checking if instances are live.

This is about requests that're sent without backing off on errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants