Skip to content

SLOs & SLIs

Service Level Objectives define the reliability targets for OsuRender API.

Service Level Indicators

SLIMetricCalculation
API Availabilityosurender:api_availability:ratio_5m1 - (5xx rate / total rate)
Render Success Rateosurender:render_success_rate:ratio_5mcompleted / (completed + failed)
Dispatch Latencydispatch_latency_secondsP99 of event creation → Celery dispatch
Render Durationrender_duration_secondsP95 end-to-end render time

Service Level Objectives

SLOTargetAlert ThresholdAlert Duration
API Availability99.9%< 99.9%15 min
Queue Dispatch99% within 60sP99 > 60s10 min
Render Start95% within 5 minMonitored
Render Completion95% within 15 minP95 > 300s10 min
Data Durability99.99%No lost jobs

Prometheus Recording Rules

yaml
# API availability ratio (5-minute window)
- record: osurender:api_availability:ratio_5m
  expr: >
    1 - (
      rate(http_requests_total{status=~"5.."}[5m]) /
      rate(http_requests_total[5m])
    )

# Render success rate (5-minute window)
- record: osurender:render_success_rate:ratio_5m
  expr: >
    rate(jobs_completed_total[5m]) / (
      rate(jobs_completed_total[5m]) +
      rate(jobs_failed_total[5m])
    )

Error Budget

With a 99.9% API availability SLO:

  • Monthly budget: 43.8 minutes of downtime
  • Weekly budget: 10.1 minutes of downtime

When the error budget is exhausted, prioritize reliability work over features.

Key Dashboards

Monitor these Grafana panels to track SLO compliance:

  1. API Availability — 5-minute rolling availability ratio
  2. Queue Depth Over Time — Trend of queued/rendering/downloading jobs
  3. Dispatch Latency — P50/P95/P99 histograms
  4. Render Duration — P50/P95 with SLO target line
  5. Error Rate — 5xx responses per second

Built with VitePress