- Updated: March 18, 2026
- 3 min read
Alerting Guide for the CRDT‑Based Token‑Bucket Rate Limiter in OpenClaw Rating API Edge
Alerting Guide for the CRDT‑Based Token‑Bucket Rate Limiter in OpenClaw Rating API Edge
The OpenClaw Rating API Edge uses a CRDT‑based token‑bucket rate limiter to protect the service from overload while maintaining eventual consistency across distributed nodes. This guide defines the key metrics you should monitor, recommended threshold values, and concrete Prometheus and Grafana alerting rules. It also outlines operational best‑practices and references the design and observability guides that were published earlier.
Key Metrics
- token_bucket_capacity – Total number of tokens the bucket can hold.
- token_bucket_fill_rate – Tokens added per second.
- token_bucket_current_usage – Tokens currently consumed (requests in the last interval).
- token_bucket_refill_delay – Time since the last successful refill.
- token_bucket_rejection_rate – Percentage of requests rejected due to rate limiting.
Recommended Threshold Values
| Metric | Warning Threshold | Critical Threshold |
|---|---|---|
| token_bucket_current_usage / token_bucket_capacity | > 70% | > 90% |
| token_bucket_refill_delay | > 5s | > 15s |
| token_bucket_rejection_rate | > 2% | > 5% |
Prometheus Alerting Rules
- alert: TokenBucketHighUsage
expr: (token_bucket_current_usage / token_bucket_capacity) > 0.7
for: 2m
labels:
severity: warning
annotations:
summary: "Token bucket usage is above 70%"
description: "The token bucket for the OpenClaw Rating API Edge is consuming a high proportion of its capacity."
- alert: TokenBucketCriticalUsage
expr: (token_bucket_current_usage / token_bucket_capacity) > 0.9
for: 1m
labels:
severity: critical
annotations:
summary: "Token bucket usage is above 90%"
description: "Immediate action required – the token bucket is near exhaustion."
- alert: TokenBucketRefillDelay
expr: token_bucket_refill_delay > 5
for: 3m
labels:
severity: warning
annotations:
summary: "Token bucket refill delay exceeds 5 seconds"
description: "Refill process may be lagging, potentially causing throttling."
- alert: TokenBucketRejectionRateHigh
expr: token_bucket_rejection_rate > 0.02
for: 5m
labels:
severity: warning
annotations:
summary: "Rate limiter rejecting >2% of requests"
description: "Check traffic spikes or mis‑configured limits."
Grafana Alerting Rules
In Grafana, create alerts based on the same Prometheus queries used above. Set the evaluation interval to 1 minute and configure notification channels (Slack, email, etc.) for warning and critical severities.
Operational Best‑Practices
- Regularly review and adjust
token_bucket_capacityandtoken_bucket_fill_ratebased on traffic patterns. - Implement a back‑off strategy for clients receiving 429 responses.
- Monitor the
token_bucket_rejection_rateduring peak load to avoid cascading failures. - Use the design guide for detailed architecture: see the UBOS design guide retrieved earlier.
- Refer to the observability guide for instrumentation details.
For a step‑by‑step deployment of OpenClaw on UBOS, see our hosting guide.
By following these metrics, thresholds, and alerting rules, you can ensure the CRDT‑based token‑bucket rate limiter remains healthy and your OpenClaw Rating API Edge delivers reliable performance.