Last updated 2026-05-18

Quick Start

Start Redis and the quota service locally, then inspect service health.

1. Start the stack

docker compose up -d --build

2. Check Redis readiness

grpcurl -plaintext localhost:28080 \
quota.v1.QuotaService/GetRedisStatus '{}'

3. Validate an example limit file

docker compose run --rm quota-service \
quota-service validate-limits /app/examples/limits/workspace-email.yaml

4. Make a known-cost decision

grpcurl -plaintext -d '{
"request_id": "req_email_123",
"context": {"product": "workspace", "environment": "local"},
"action": "workspace.email.recipients",
"cost": 25,
"limits": [{
"limit_id": "user_email_recipients_daily",
"scope_key": "user:user_123",
"action": "workspace.email.recipients",
"unit": "recipients",
"algorithm": "ALGORITHM_FIXED_WINDOW_CALENDAR",
"window": {
"type": "WINDOW_TYPE_CALENDAR",
"calendar_unit": "CALENDAR_UNIT_DAY",
"timezone": "UTC"
},
"limit": 500
}]
}' localhost:28080 quota.v1.QuotaService/Consume

5. Inspect metrics

curl -s http://localhost:29090/metrics | head