Skip to content

Ingestion Rate Limiting (logs/sec, MB/sec) #887

@dmitryk-dk

Description

@dmitryk-dk

Is your feature request related to a problem? Please describe

Currently, there is no way to limit the ingestion rate to VictoriaLogs. The -maxConcurrentInserts flag controls the number of concurrent insert requests but does not limit the actual throughput in terms of logs per second or data volume.

Users need the ability to limit ingestion rate to:

  • Protect VictoriaLogs from being overwhelmed by high-volume log streams
  • Control resource consumption (CPU, memory, disk I/O)
  • Ensure predictable performance under varying load conditions
  • Prevent runaway logging from impacting system stability
  • Manage bandwidth and storage costs

Describe the solution you'd like

Add configuration flags to limit the ingestion rate:

  • -insert.maxLogsPerSec - global limit for logs ingested per second (e.g., 800 logs/sec)
  • -insert.maxBytesPerSec - global limit for data volume ingested per second (e.g., 10MB/sec)

When either limit is reached, return an appropriate HTTP status code (e.g., 429 Too Many Requests) with a Retry-After header.

Both limits could work independently or together, with ingestion being throttled when any of the configured limits is exceeded.

Describe alternatives you've considered

  1. Using -maxConcurrentInserts - this only limits concurrent connections, not actual throughput
  2. External rate limiting via reverse proxy (nginx, envoy) - adds operational complexity and doesn't provide log-aware limiting; also harder to implement bytes/sec limiting accurately
  3. Client-side rate limiting - not always possible when logs come from multiple sources

Additional information

No response

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