Skip to main content
RLaaS Users Service is configured through two files: 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.
All environment variables marked as required below must be set. The service will fail to start if REDIS_URL is not set.

Rate limiter settings

These properties live in application.yaml and control which algorithm is active and how the rate limit window behaves.
PropertyDefaultDescription
rate-limiter.use-algosliding-window-algoActive algorithm. Values: fixed-window-algo, sliding-window-algo
rate-limiter.max-requests5Maximum requests allowed per window
rate-limiter.window-size60Window duration in seconds

Environment variables

These variables are read at startup via application.properties. Set them in your shell, in a .env file loaded by your process manager, or as container environment variables.
VariableRequiredDescription
REDIS_URLYesRedis connection URL, e.g. redis://localhost:6379
OTEL_EXPORTER_OTLP_METRICSNoOTLP endpoint URL for metrics push
OTEL_AUTHORIZATIONNoAuthorization header value for OTLP
GRAFANA_CLOUD_ZONENoGrafana Cloud zone for OTLP
GRAFANA_CLOUD_INSTANCE_IDNoGrafana Cloud instance ID
GRAFANA_CLOUD_API_KEYNoGrafana Cloud API key

Example: switching to the fixed-window algorithm

To switch from the default sliding-window algorithm to fixed-window, update application.yaml:
application.yaml
rate-limiter:
  use-algo: fixed-window-algo
  max-requests: 10
  window-size: 60
Restart the service after changing application.yaml. No Redis flush is needed — each algorithm uses its own key structure.
Use sliding-window-algo (the default) for strict per-user fairness. Use fixed-window-algo for slightly lower Redis memory usage at the cost of potential burst behavior at window boundaries.

Full application.yaml reference

The complete default configuration shipped with the service:
application.yaml
rate-limiter:
  use-algo: sliding-window-algo
  max-requests: 5
  window-size: 60

management:
  otlp:
    metrics:
      export:
        url: ${OTEL_EXPORTER_OTLP_METRICS}
        headers:
          Authorization: ${OTEL_AUTHORIZATION}
        step: 30s
  endpoints:
    web:
      exposure:
        include: health, info, prometheus, metrics
  endpoint:
    prometheus:
      enabled: true
  metrics:
    tags:
      application: ${spring.application.name}
Prometheus metrics are exposed at /actuator/prometheus. OTLP metrics are pushed every 30 seconds when OTEL_EXPORTER_OTLP_METRICS is set.

Build docs developers (and LLMs) love