Skip to content

Conversation

@bornakapusta
Copy link
Contributor

Summary

  • Configure global and per-route rate limiters
  • Token bucket with total_rps, per_ip_rps, burst settings
  • Automatic cleanup of stale per-IP entries
  • Returns HTTP 429 with Retry-After header when exceeded
  • New metric: gatekeeper_rate_limited_total{route,limiter,reason}

Test plan

  • Run make test to verify all tests pass
  • Test rate limiting with config-based settings
  • Verify 429 response with Retry-After header when limit exceeded

Closes #14

- Configure global and per-route rate limiters
- Token bucket with total_rps, per_ip_rps, burst settings
- Automatic cleanup of stale per-IP entries
- Returns HTTP 429 with Retry-After header when exceeded
- New metric: gatekeeper_rate_limited_total{route,limiter,reason}

Closes #14
@bornakapusta bornakapusta marked this pull request as draft January 27, 2026 22:22
@codecov
Copy link

codecov bot commented Jan 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@sonarqubecloud
Copy link

@github-actions
Copy link

Docker Images Built

Images are available for testing:

# gatekeeperd
docker pull ghcr.io/tight-line/gatekeeperd:pr-18-f45e35b

# gatekeeper-relay
docker pull ghcr.io/tight-line/gatekeeper-relay:pr-18-f45e35b

docker-compose.yml

GATEKEEPERD_IMAGE=ghcr.io/tight-line/gatekeeperd:pr-18-f45e35b \
RELAY_IMAGE=ghcr.io/tight-line/gatekeeper-relay:pr-18-f45e35b \
docker-compose --profile relay up

Helm (values override)

image:
  repository: ghcr.io/tight-line/gatekeeperd  # or gatekeeper-relay
  tag: "pr-18-f45e35b"

Images expire ~15 days after PR closes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Add rate limiting support (global and per-route)

2 participants