Schedule icon
Webhook icon
Log icon
Parallel icon
Request icon
Query icon
Script icon
Sequential icon
If icon

Automated API SLA and Data Drift Quarantine Pipeline

Orchestrate parallel API health checks, DuckDB telemetry queries, Python SLA evaluation, and partition quarantine with Kestra.

Categories
Data

Prevents silent data corruption and upstream API regressions from polluting downstream analytics tables by combining parallel pre-flight checks, embedded DuckDB aggregations, Python threshold scoring, and sequential consumer watermark synchronization.

How it works

  1. A Schedule trigger (every 15 minutes) or an upstream deployment Webhook initiates the audit run.
  2. A Parallel block simultaneously probes primary and replica gateway endpoints while logging heartbeat telemetry.
  3. A DuckDB task queries active ingestion micro-batches in memory to verify batch counts and schema state.
  4. A Python script compares observed p95 latency against configurable SLA thresholds and exports a structured health manifest.
  5. A Sequential block updates watermarks in order across billing, fraud scoring, and warehouse consumer services.
  6. An If branch either promotes clean partitions to production or isolates anomalous batches into quarantine before closing the audit ledger.

What you get

  • Multi-layered protection combining network reachability, SQL batch extraction, and programmatic SLA scoring.
  • Ordered watermark coordination across dependent microservices via Sequential.
  • Immediate quarantine isolation when p95 latencies breach defined guardrails.

Who it's for

  • Data and Analytics Engineers protecting warehouse tables from broken upstream producer deployments.
  • Platform and SRE teams automating post-deploy verification gates.

Why orchestrate this with Kestra

  • Combines Parallel, Sequential, and If flowable constructs in a single declarative pipeline.
  • Full execution topology and task-level duration tracking across all 12 workflow stages.

Prerequisites

  • Standard Kestra v2.0 instance with DuckDB and Python script plugins enabled.

Secrets

  • No secrets required.

Quick start

  1. Import this blueprint into your Kestra instance.
  2. Click Execute with the default inputs to see the healthy promotion path, or lower max_latency_ms to 200 to test the quarantine branch.
  3. Enable the 15-minute schedule or connect your CI/CD deployment webhook.

How to extend

  • Point the DuckDB query at real S3/Parquet staging files or attach PostgreSQL/BigQuery tables.
  • Replace the quarantine log task with a PagerDuty, Slack, or Opsgenie incident trigger.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.