akkoma/lib/pleroma
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
..
activity Fix tests 2024-06-09 18:28:00 +01:00
akkoma
captcha
collections Don't return garbage on failed collection fetches 2025-02-14 18:49:51 +01:00
config Remove proxy_remote vestiges 2024-06-16 01:21:52 +02:00
conversation
docs
ecto_type
emails Set customize_hostname_check for Swoosh.Adapters.SMTP 2024-12-18 14:37:27 -05:00
emoji cosmetic/emoji/pack: fix spelling 2025-02-14 22:10:25 +01:00
helpers
http Add pool timeouts 2024-06-09 17:20:29 +01:00
instances nodeinfo: lower log level of regular actions to debug 2025-01-07 20:27:28 +01:00
mfa
migration_helper
migrators Support elixir1.15 2023-08-03 17:44:09 +01:00
object Prevent key-actor mapping poisoning and key take overs 2025-02-14 22:10:25 +01:00
password
reverse_proxy
search Don't create noop SearchIndexingWorker jobs for passive index 2025-01-07 20:27:27 +01:00
tests
upload strip_metadata: skip BMP files 2024-06-27 18:29:45 +02:00
uploaders
user signing_key: don't retrieve superfluous fields when loading ap_id 2025-02-21 19:37:27 +01:00
web Merge pull request 'Test lowest and highest language versions, elixir 1.18 support' (#875) from ci-testing-all-versions into develop 2025-03-11 20:47:54 +00:00
workers federation/out: tweak publish retry backoff 2025-03-17 19:37:54 +01:00
activity.ex meilisearch: respect meili’s result ranking 2024-05-29 23:17:27 +00:00
announcement.ex
announcement_read_relationship.ex
application.ex fix oembed test 2024-06-09 21:17:12 +01:00
application_requirements.ex Rename StripLocation to StripMetadata for temporal-proofing reasons 2024-04-16 20:37:00 +02:00
bookmark.ex
caching.ex
captcha.ex
clippy.ex
config.ex
config_db.ex
constants.ex Don't try to handle non-media objects as media 2024-05-22 20:30:23 +02:00
conversation.ex
counter_cache.ex
data_migration.ex
delivery.ex
ecto_enums.ex
emoji-test.txt
emoji.ex
filter.ex
following_relationship.ex
formatter.ex
frontend.ex Convert all raw :zip usage to SafeZip 2025-02-14 22:10:25 +01:00
hashtag.ex
healthcheck.ex
html.ex Fix tests 2024-06-09 18:28:00 +01:00
http.ex Convert rich media backfill to oban task 2024-06-11 18:06:51 +01:00
instances.ex
iso639.ex
job_queue_monitor.ex Use fully qualified function capture for telementry event 2024-02-12 01:59:18 +01:00
jwt.ex
list.ex
logging.ex
maintenance.ex Support elixir1.15 2023-08-03 17:44:09 +01:00
maps.ex
marker.ex
mfa.ex
moderation_log.ex
notification.ex
object.ex cosmetic/object: drop is_ prefix from is_tombstone_object? 2025-02-14 22:10:25 +01:00
object_tombstone.ex
otp_version.ex
pagination.ex
password.ex
password_reset_token.ex
prometheus_exporter.ex
registration.ex
release_tasks.ex
repo.ex
report_note.ex
reverse_proxy.ex Sanitise Content-Type of media proxy URLs 2024-03-18 22:33:10 -01:00
safe_zip.ex Add SafeZip module 2025-02-14 22:10:25 +01:00
scheduled_activity.ex Restrict media usage to owners 2024-05-22 20:30:18 +02:00
search.ex
signature.ex signature: refetch key upon verification failure 2025-02-21 19:37:27 +01:00
stats.ex stats: estimate remote user count 2025-01-07 20:27:28 +01:00
thread_mute.ex
upload.ex Drop activity_type override for uploads 2024-05-22 20:30:23 +02:00
user.ex signature: drop unecessary round trip over user 2025-02-14 22:10:25 +01:00
user_invite_token.ex
user_note.ex
user_relationship.ex
utils.ex
web.ex Migrate to phoenix 1.7 (#626) 2023-08-15 10:22:18 +00:00
xml_builder.ex