Skip to content

feat: Bandwidth limiting #58

@Snider

Description

@Snider

Summary

Limit download bandwidth to avoid saturating connection.

Use Case

  • Don't max out shared internet
  • Be nice to source servers
  • Background collection without impact

Commands

# Limit to 1 MB/s
borg collect github repos org --bandwidth 1MB/s

# Limit to 500 KB/s
borg collect website https://example.com --bandwidth 500KB/s

# Unlimited (default)
borg collect website https://example.com --bandwidth 0

Units

  • KB/s - Kilobytes per second
  • MB/s - Megabytes per second
  • Mbps - Megabits per second

Configuration

bandwidth:
  global: 5MB/s           # Total across all connections
  per_connection: 1MB/s   # Per individual download
  
# Time-based limits
schedule:
  - time: "09:00-17:00"
    bandwidth: 1MB/s      # Work hours: low
  - time: "17:00-09:00"  
    bandwidth: 10MB/s     # Off hours: high

Implementation

Token bucket for bandwidth allocation.

Acceptance Criteria

  • Global bandwidth limit
  • Per-connection limit
  • Human-readable units
  • Scheduled limits
  • Accurate throttling

Metadata

Metadata

Assignees

No one assigned

    Labels

    julesFor Jules AI to work on

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions