Eventing Platform SLO Document
Overview
This document defines Service Level Objectives (SLOs) for an eventing platform (e.g., a distributed pub/sub system like Kafka or NATS-inspired architecture). The platform handles high-throughput, asynchronous event streaming with guarantees on latency, durability, ordering, and monitoring.
SLOs are measured over a 28-day rolling window unless specified. Error budgets are calculated as (1 - SLO target). Alerts fire when error budget burn rate exceeds sustainable levels (e.g., 0.5x monthly budget per week).
Key assumptions:
- Streams/Topics: Logical partitions (e.g., sharded by tenant or key) for ordering.
- Publishers/Consumers: At-least-once delivery semantics.
- Measurement: Aggregated across all streams, with per-stream breakdowns for alerting.
1. Latency SLOs
Latency measures end-to-end time from event publish acknowledgment to consumer acknowledgment (including network, queuing, and processing).
| Metric | Description | SLO Target | Measurement |
|---|
| P50 End-to-End Latency | Median latency for 99% of successful deliveries. | ≤ 50 ms | Histogram of timestamps (publish ACK to consume ACK). |
| P95 End-to-End Latency | 95th percentile. | ≤ 100 ms | Same as above. |
| P99 End-to-End Latency | 99th percentile. | ≤ 500 ms | Same as above; alert on >1s spikes. |
| P99.9 Publish Latency | Time to durable publish ACK. | ≤ 100 ms | Publisher-side metric. |
Error Budget: 0.1% for P99 (allows ~50k violations/month at 10k EPS).
Alerting: PagerDuty on 5-min burn >10% budget; investigate tail latency (GC, network).
2. Durability SLOs
Durability ensures events are not lost (persisted to disk/replicated before ACK).
| Metric | Description | SLO Target | Measurement |
|---|
| Event Delivery Success Rate | % of published events successfully delivered to all subscribers. | ≥ 99.99% (0.01% loss) | (delivered_events / published_events) * 100; track undelivered via dead-letter queue (DLQ). |
| Replication Durability | % of events replicated to ≥3 nodes (or quorum). | 100% | Per-event replication lag < 1s; monitor via leader-follower offsets. |
Error Budget: 0.01% (~10k losses/month at 10k EPS).
Alerting: Critical if >0.1% loss in 1h; DLQ size >1k events.
3. Ordering SLOs
Ordering guarantees events within a stream/partition are delivered in publish order (at-least-once, with idempotency for exactly-once).
| Metric | Description | SLO Target | Measurement |
|---|
| In-Order Delivery Rate | % of events delivered in sequence order per partition. | ≥ 99.999% (out-of-order <0.001%) | Consumer-side sequence validation (e.g., compare publish timestamp/sequence ID). |
| Partition Ordering Guarantee | Strict FIFO within partition. | 100% | No reordering detected; measure via offset monotonicity. |
Error Budget: 0.001% (~100 violations/month at 10k EPS).
Alerting: Immediate on any out-of-order event (logged to DLQ with metadata). Supports consumer-side dedup via sequence IDs.
4. Monitoring SLOs
Monitoring ensures observability; SLOs target metric freshness and alerting reliability.
| Metric | Description | SLO Target | Measurement |
|---|
| Metric Freshness | % of metrics scraped/exported within 1min. | ≥ 99.9% | Prometheus/Grafana scrape success rate. |
| Alert Delivery | % of fired alerts delivered within 1min. | ≥ 99.95% | PagerDuty/Alertmanager delivery logs. |
| Dashboard Availability | Core dashboards (latency, durability, etc.) accessible. | ≥ 99.99% | Synthetic probes (e.g., every 5min). |
Key Metrics to Monitor (exported to Prometheus):
eventing_publish_latency_seconds_bucket (histogram).
eventing_delivery_success_total (counter).
eventing_out_of_order_total (counter).
eventing_replication_lag_seconds (gauge).
eventing_throughput_eps (gauge, target >95% of peak).
- Traces via Jaeger/OpenTelemetry for end-to-end.
Dashboards:
- SLO burn rates (SLO Calculator Grafana panel).
- Heatmaps for latency/ordering violations by stream.
- Topology view (producers → brokers → consumers).
Alerting Rules (PromQL examples):
# P99 Latency violation
sum(rate(eventing_e2e_latency_seconds_bucket{le="0.5"}[5m])) by (le) < 0.99 * sum(rate(eventing_e2e_latency_seconds_count[5m]))
- SLO-specific alerts + capacity (CPU>80%, backlog>1M events).
Reliability Budget & Postmortems
- Overall Availability SLO: ≥99.95% (combines all; downtime = any SLO breach).
- Error Budget Policy: If exhausted, stop new features; focus on reliability.
- SLO Reviews: Quarterly; postmortems for all Critical incidents (root cause, action items).
This SLO set supports 10k+ EPS scale with <0.1% customer impact. Customize per workload (e.g., stricter latency for trading events). For implementation, use tools like Prometheus, Grafana, and NATS/Kafka operators.