Commands icon
If icon
SlackIncomingWebhook icon
Schedule icon

Microsoft Azure Cosmos DB 429 Request Unit Rate Limit Sentinel

Audits Azure Cosmos DB for HTTP 429 Request Rate Too Large exceptions indicating provisioned RU/s exhaustion.

Categories
CloudData

How it works

This workflow audits Azure Cosmos DB for capacity saturation by monitoring the TotalRequests metric filtered by HTTP status code 429 (Request Rate Too Large) via the Azure CLI container. In Cosmos DB, transactions that exceed provisioned Request Units (RU/s) or autoscale limits are throttled with 429 errors, resulting in elevated application latency or request retries. The flow parses metric samples with jq and dispatches alerts when rate-limiting exceeds thresholds.

What you get

  • Immediate awareness when Cosmos DB database or container throughput limits are exceeded.
  • Prevents downstream user-facing API degraded performance and query timeouts.
  • Quantitative metrics on throttled database requests.

Who it's for

  • Database Administrators (DBAs) and Application Developers utilizing Azure Cosmos DB.
  • SRE and Cloud Operations teams maintaining high-availability database tiers.

Why orchestrate this with Kestra

  • Continuous Capacity Guard: Scheduled monitoring ensures persistent throughput headroom.
  • Cloud-Native CLI Execution: Uses standard Azure CLI inside an isolated container execution environment.
  • Centralized Incident Dispatch: Direct alerts to Slack with resource IDs and breach metrics.

Prerequisites

  • Azure Service Principal with Monitoring Reader permissions on the Cosmos DB account.
  • Secrets AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_TENANT_ID, and SLACK_WEBHOOK configured in Kestra.

Quick start

  1. Import the blueprint.
  2. Fill in Azure Subscription ID, Resource Group, and Cosmos DB account name.
  3. Run the workflow to verify current rate-limit metrics.

How to extend

  • Integrate with Azure REST API to automatically bump autoscale max RU/s during workload surges.
  • Store historical 429 breach frequencies in Kestra KV store for weekly capacity reviews.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.