gabboman / wafrn

Wafrn is a small social media that respects you. No alt right, no nazis, no terfs. Join us and have fun
https://app.wafrn.net/dashboard/explore
96 stars 24 forks source link

Queuing delivery #81

Closed ShadowJonathan closed 2 days ago

ShadowJonathan commented 1 month ago

I'm seeing that https://github.com/gabboman/wafrn/blob/d7aa97d38a23af0a546a59e0ff4da26ab02aa8d9/packages/backend/utils/activitypub/postPetitionSigned.ts#L8 is basically sending the AP object in the same HTTP call as some activities (such as accepting follow requests), and i think it would be more useful to put that kind of stuff in queuing, or at least, to make sure it retries if it fails.

This'll make wafrn more resilient, especially against offline instances.

gabboman commented 1 month ago

I hate offline instances but youre right

ShadowJonathan commented 1 month ago

Some instances might be offline for 10 minutes or an hour, or maybe a day, as the admin gets prompted.

Sometimes some network failures happen (like DNS or TCP being fucked), or there being a DDoS attack on that server.

Mastodon effectively keeps retrying for a week, with 16 retries over exponential backoff, so maybe thats something to look at.

I assume you're already using queued delivery when making posts, so maybe this could hook into that?

gabboman commented 2 days ago

It has been fixed on the latest updates. It caused some conmotion on the code and a few bugs, but all fixed

gabboman commented 2 days ago

PR going stale. merging...