akkoma/lib/pleroma/workers
Oneric 4011d20dbe federation/out: tweak publish retry backoff
With the current strategy the individual
and cumulative backoff looks like this
(the + part denotes max extra random delay):

attempt  backoff_single   cumulative
   1      16+30                16+30
   2      47+60                63+90
   3     243+90  ≈ 4min       321+180
   4    1024+120 ≈17min      1360+300  ≈23+5min
   5    3125+150 ≈20min      4500+450  ≈75+8min
   6    7776+180 ≈ 2.1h    12291+630   ≈3.4h
   7   16807+210 ≈ 4.6h    29113+840   ≈8h
   8   32768+240 ≈ 9.1h    61896+1080  ≈17h
   9   59049+270 ≈16.4h   120960+1350  ≈33h
  10  100000+300 ≈27.7h   220975+1650  ≈61h

We default to 5 retries meaning the least backoff runs with attempt=4.
Therefore outgoing activiities might already be permanently dropped by a
downtime of only 23 minutes which doesn't seem too implausible to occur.
Furthermore it seems excessive to retry this quickly this often at the
beginning.
At the same time, we’d like to have at least one quick'ish retry to deal
with transient issues and maintain reasonable federation responsiveness.

If an admin wants to tolerate one -day downtime of remotes,
retries need to be almost doubled.

The new backoff strategy implemented in this commit instead
switches to an exponetial after a few initial attempts:

attempt  backoff_single   cumulative
   1      16+30              16+30
   2     143+60             159+90
   3    2202+90  ≈37min    2361+180 ≈40min
   4    8160+120 ≈ 2.3h   10521+300 ≈ 3h
   5   77393+150 ≈21.5h   87914+450 ≈24h

Initial retries are still fast, but the same amount of retries
now allows a remote downtime of at least 40 minutes. Customising
the retry count to 5 allows for whole-day downtimes.
2025-03-17 19:37:54 +01:00
..
cron Prune old Update activities 2024-02-17 16:57:40 +01:00
attachments_cleanup_worker.ex Delay attachment deletion 2025-01-03 20:49:11 +01:00
background_worker.ex Spin off imports into n oban jobs 2022-11-27 21:45:41 +00:00
backup_worker.ex and i yoink (#275) 2022-11-14 15:07:26 +00:00
mailer_worker.ex elixir 1.18 formatting 2025-03-02 11:54:00 +00:00
mute_expire_worker.ex elixir 1.18 formatting 2025-03-02 11:54:00 +00:00
nodeinfo_fetcher_worker.ex Don't enqueue a plethora of unnecessary NodeInfoFetcher jobs 2025-01-07 20:27:27 +01:00
poll_worker.ex PollWorker defensive checks 2021-07-18 11:10:22 -05:00
publisher_worker.ex federation/out: tweak publish retry backoff 2025-03-17 19:37:54 +01:00
purge_expired_activity.ex and i yoink (#275) 2022-11-14 15:07:26 +00:00
purge_expired_filter.ex and i yoink (#275) 2022-11-14 15:07:26 +00:00
purge_expired_token.ex and i yoink (#275) 2022-11-14 15:07:26 +00:00
receiver_worker.ex receiver_worker: log processes crashes 2025-02-14 18:46:19 +01:00
remote_fetcher_worker.ex only consider :op and :id args in duplicate checks 2024-04-19 11:39:27 +01:00
rich_media_expiration_worker.ex RichMedia refactor 2024-06-09 17:33:48 +01:00
scheduled_activity_worker.ex fix for scheduled post with poll 2021-02-01 18:22:26 +03:00
search_indexing_worker.ex Don't create noop SearchIndexingWorker jobs for passive index 2025-01-07 20:27:27 +01:00
web_pusher_worker.ex Bump Copyright to 2021 2021-01-13 07:49:50 +01:00
worker_helper.ex federation/out: tweak publish retry backoff 2025-03-17 19:37:54 +01:00