application.yaml for rate-limiter settings and observability, and application.properties (via environment variables) for infrastructure connections. Most values have sensible defaults, but you must supply the Redis connection URL before the service will start.
Rate limiter settings
These properties live inapplication.yaml and control which algorithm is active and how the rate limit window behaves.
| Property | Default | Description |
|---|---|---|
rate-limiter.use-algo | sliding-window-algo | Active algorithm. Values: fixed-window-algo, sliding-window-algo |
rate-limiter.max-requests | 5 | Maximum requests allowed per window |
rate-limiter.window-size | 60 | Window duration in seconds |
Environment variables
These variables are read at startup viaapplication.properties. Set them in your shell, in a .env file loaded by your process manager, or as container environment variables.
| Variable | Required | Description |
|---|---|---|
REDIS_URL | Yes | Redis connection URL, e.g. redis://localhost:6379 |
OTEL_EXPORTER_OTLP_METRICS | No | OTLP endpoint URL for metrics push |
OTEL_AUTHORIZATION | No | Authorization header value for OTLP |
GRAFANA_CLOUD_ZONE | No | Grafana Cloud zone for OTLP |
GRAFANA_CLOUD_INSTANCE_ID | No | Grafana Cloud instance ID |
GRAFANA_CLOUD_API_KEY | No | Grafana Cloud API key |
Example: switching to the fixed-window algorithm
To switch from the default sliding-window algorithm to fixed-window, updateapplication.yaml:
application.yaml
application.yaml. No Redis flush is needed — each algorithm uses its own key structure.
Full application.yaml reference
The complete default configuration shipped with the service:
application.yaml
/actuator/prometheus. OTLP metrics are pushed every 30 seconds when OTEL_EXPORTER_OTLP_METRICS is set.