Skip to content

Add configurable distribution modes for federation delivery #2672

@pfefferle

Description

@pfefferle

Summary

Add a setting to allow site administrators to choose how aggressively the plugin distributes activities to remote servers. This helps manage server load from HTTP signature verifications on both the sending server and receiving instances.

Proposed Modes

  1. Default — Deliver activities as fast as possible (current behavior)
  2. Balanced — Moderate pace with reasonable pauses between batches
  3. Eco Mode 🌱 — Take your time, gentle on server resources
  4. Custom — Configure batch size and delay manually

Technical Details

Each mode adjusts these parameters:

Parameter Default Balanced Eco Mode Custom
Batch size 100 50 20 User-defined
Pause between batches 30s 60s 300s (5min) User-defined

Key filters involved:

  • activitypub_dispatcher_batch_size
  • activitypub_scheduler_async_batch_pause

Use Cases

  • Shared hosting — Use "Eco Mode" to avoid hitting resource limits
  • High-traffic sites — Use "Default" when server can handle the load
  • Large follower counts — Use "Balanced" to spread load over time
  • Fine-tuned setups — Use "Custom" for specific requirements

Settings Location

Add to ActivityPub settings page, possibly under "Advanced" or new "Performance" section.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions