Skip to content

Rate Limits Configuration

NORA implements rate limiting to protect the registry from excessive load. This guide covers default values, tuning guidelines, and monitoring.

VariableDefaultDescription
NORA_RATE_LIMIT_UPLOAD_RPS200Upload requests per second
NORA_RATE_LIMIT_UPLOAD_BURST500Maximum burst for uploads
NORA_RATE_LIMIT_GENERAL_RPS500General requests per second
NORA_RATE_LIMIT_GENERAL_BURST1000Maximum burst for general requests
Terminal window
docker run -d \
--name nora \
-p 5000:5000 \
-v /data/nora:/data \
-e NORA_RATE_LIMIT_UPLOAD_RPS=2000 \
-e NORA_RATE_LIMIT_UPLOAD_BURST=5000 \
-e NORA_RATE_LIMIT_GENERAL_RPS=1000 \
-e NORA_RATE_LIMIT_GENERAL_BURST=2000 \
ghcr.io/getnora-io/nora:latest serve
services:
nora:
image: ghcr.io/getnora-io/nora:latest
environment:
NORA_RATE_LIMIT_UPLOAD_RPS: 2000
NORA_RATE_LIMIT_UPLOAD_BURST: 5000
NORA_RATE_LIMIT_GENERAL_RPS: 1000
NORA_RATE_LIMIT_GENERAL_BURST: 2000
rate_limits:
upload:
rps: 2000
burst: 5000
general:
rps: 1000
burst: 2000
Terminal window
nora serve \
--rate-limit-upload-rps 2000 \
--rate-limit-upload-burst 5000 \
--rate-limit-general-rps 1000 \
--rate-limit-general-burst 2000

Default values are sufficient:

Terminal window
NORA_RATE_LIMIT_UPLOAD_RPS=200
NORA_RATE_LIMIT_UPLOAD_BURST=500
NORA_RATE_LIMIT_GENERAL_RPS=500
NORA_RATE_LIMIT_GENERAL_BURST=1000

Use case: Low-frequency builds, manual pushes, small CI/CD pipeline


Moderate increase recommended:

Terminal window
NORA_RATE_LIMIT_UPLOAD_RPS=1000
NORA_RATE_LIMIT_UPLOAD_BURST=2000
NORA_RATE_LIMIT_GENERAL_RPS=750
NORA_RATE_LIMIT_GENERAL_BURST=1500

Use case: Regular CI/CD, multiple parallel builds, active development


Significant increase for high throughput:

Terminal window
NORA_RATE_LIMIT_UPLOAD_RPS=2000
NORA_RATE_LIMIT_UPLOAD_BURST=5000
NORA_RATE_LIMIT_GENERAL_RPS=1000
NORA_RATE_LIMIT_GENERAL_BURST=2000

Use case: Continuous deployment, matrix builds, high-frequency pushes


Custom tuning based on load:

Terminal window
NORA_RATE_LIMIT_UPLOAD_RPS=5000
NORA_RATE_LIMIT_UPLOAD_BURST=10000
NORA_RATE_LIMIT_GENERAL_RPS=2000
NORA_RATE_LIMIT_GENERAL_BURST=5000

Use case: Multiple teams, 24/7 CI/CD, global deployments


  • Definition: Average sustained rate of requests allowed
  • Example: RPS=200 means 200 requests per second on average
  • Effect: Requests exceeding this rate will be rate-limited
  • Definition: Maximum spike of requests allowed temporarily
  • Example: BURST=500 allows up to 500 requests in a short burst
  • Effect: Handles traffic spikes without immediate rate limiting
  • Upload limits: Apply to image push operations (PUT, POST to /v2/)
  • General limits: Apply to all other operations (pulls, catalog, tags)

Check /metrics for rate limit statistics:

Terminal window
curl http://localhost:4000/metrics | grep rate_limit

Key metrics:

  • nora_rate_limit_hits_total{type="upload"} - Upload rate limit violations
  • nora_rate_limit_hits_total{type="general"} - General rate limit violations
  • nora_requests_total - Total requests processed
# Rate limit hit rate over 5 minutes
rate(nora_rate_limit_hits_total[5m])
# Percentage of requests rate-limited
(rate(nora_rate_limit_hits_total[5m]) / rate(nora_requests_total[5m])) * 100
groups:
- name: nora_rate_limits
rules:
- alert: NoraHighRateLimitHits
expr: rate(nora_rate_limit_hits_total[5m]) > 10
for: 5m
labels:
severity: warning
annotations:
summary: "NORA experiencing high rate limit violations"
description: "{{ $value }} rate limit hits per second"
- alert: NoraRateLimitCritical
expr: (rate(nora_rate_limit_hits_total[5m]) / rate(nora_requests_total[5m])) > 0.1
for: 10m
labels:
severity: critical
annotations:
summary: "Over 10% of requests are being rate-limited"
description: "Consider increasing rate limits"

Symptom: “429 Too Many Requests” errors

Section titled “Symptom: “429 Too Many Requests” errors”

Cause: Rate limits exceeded

Solution:

  1. Check current rate limit configuration
  2. Monitor /metrics to identify which limit is hit (upload vs general)
  3. Increase appropriate limits based on your workload
  4. Restart NORA to apply new limits

Cause: Upload rate limits too restrictive for parallel builds

Solution:

Terminal window
# Increase upload limits
NORA_RATE_LIMIT_UPLOAD_RPS=2000
NORA_RATE_LIMIT_UPLOAD_BURST=5000

Cause: General rate limits blocking metadata requests

Solution:

Terminal window
# Increase general limits
NORA_RATE_LIMIT_GENERAL_RPS=1000
NORA_RATE_LIMIT_GENERAL_BURST=2000

  1. Start Conservative - Begin with default limits and increase based on metrics
  2. Monitor Continuously - Set up Prometheus alerts for rate limit hits
  3. Plan for Spikes - Set BURST values higher than RPS to handle traffic spikes
  4. Separate Upload/General - Tune independently based on usage patterns
  5. Document Changes - Keep track of limit adjustments and reasons
  6. Load Testing - Test new limits in staging before production

Rate limiting in NORA is very efficient:

  • Overhead: < 1ms per request
  • Memory: Negligible (token bucket algorithm)
  • CPU: Minimal impact even at high RPS

Increasing limits has virtually no performance penalty on NORA itself. Limits exist purely to protect the server from excessive client load.