Skip to content

CDC Webhooks

CDC Webhooks

Status: Production-Ready (85% Complete) Last Updated: January 4, 2026


Overview

HeliosDB’s CDC-to-Webhook integration enables real-time event streaming from database changes (INSERT, UPDATE, DELETE) to external systems via HTTP webhooks. The system provides exactly-once delivery, circuit breaker protection, and comprehensive monitoring.

Key Capabilities

CapabilityDescriptionStatus
Event CaptureWAL-based Change Data CaptureProduction
Event DeliveryHTTP webhooks with retryProduction
Delivery GuaranteeExactly-once semanticsProduction
Event FilteringTable/operation/column filtersProduction
Event TransformationJSONPath, Jinja2 templatesPlanned
Circuit BreakerAutomatic failure detectionProduction
MonitoringPrometheus metrics, dashboardsProduction

Performance Characteristics

MetricValue
Event Capture Rate100K events/sec
Webhook Delivery Latency (P50)5-10ms
Webhook Delivery Latency (P99)30-50ms
Delivery Success Rate99.9%
Exactly-Once Guarantee100% (within 24hr window)
Max Concurrent Webhooks10,000
Queue CapacityUnlimited (disk-backed)

Architecture

CDC-to-Webhook Pipeline
┌─────────────┐ ┌─────────────────┐ ┌──────────────┐
│ Database │ --> │ WAL/CDC │ --> │ Event │
│ Changes │ │ Processor │ │ Queue │
└─────────────┘ └─────────────────┘ └──────────────┘
v
┌─────────────┐ ┌─────────────────┐ ┌──────────────┐
│ External │ <-- │ Webhook │ <-- │ Worker │
│ Endpoints │ │ Delivery │ │ Pool │
└─────────────┘ └─────────────────┘ └──────────────┘
│ │ │
v v v
┌─────────────────────────────────────────────────────────┐
│ Monitoring & Observability │
│ (Prometheus metrics, Grafana dashboards, Audit logs) │
└─────────────────────────────────────────────────────────┘

Feature Highlights

1. WAL-Based Event Capture

Capture database changes directly from the Write-Ahead Log for maximum performance and minimal overhead.

2. Exactly-Once Delivery

Idempotency keys ensure each event is delivered exactly once, even in the presence of retries and failures.

3. Circuit Breaker Protection

Automatic failure detection prevents cascading failures when webhook endpoints are unhealthy.

4. Flexible Filtering

Filter events by:

  • Table name
  • Operation type (INSERT, UPDATE, DELETE)
  • Column changes
  • Custom predicates

5. High Throughput

Process 100K+ events per second with low latency and high reliability.

Quick Example

SQL Interface

-- Create a CDC stream to Kafka
CREATE CHANGE DATA CAPTURE ON users
TO KAFKA 'localhost:9092' TOPIC 'users-changes'
FORMAT JSON;
-- Monitor the stream
SHOW CDC STREAMS;
SHOW CDC STREAM STATUS users_cdc_stream;
-- Pause during maintenance
ALTER CDC STREAM users_cdc_stream PAUSE;
-- Resume
ALTER CDC STREAM users_cdc_stream RESUME;

Rust API

use heliosdb_cdc::{CdcConfig, EventProcessor};
use heliosdb_webhooks::{WebhookServer, WebhookConfig};
#[tokio::main]
async fn main() -> Result<()> {
// Create CDC processor
let cdc_config = CdcConfig::default();
let processor = EventProcessor::new(cdc_config).await?;
// Create webhook server
let webhook_config = WebhookConfig {
bind_address: "0.0.0.0:8081".to_string(),
max_retries: 3,
timeout_secs: 30,
..Default::default()
};
let server = WebhookServer::new(webhook_config).await?;
// Register webhook endpoints
server.register("https://api.example.com/webhooks/db-changes").await?;
// Start processing
processor.start().await?;
Ok(())
}

Use Cases

Use CaseDescription
Real-time AnalyticsStream changes to analytics systems
Event-Driven ArchitectureTrigger downstream services on data changes
Data SyncKeep external systems in sync with database
Audit LoggingCapture all changes for compliance
Cache InvalidationInvalidate caches when data changes
Search IndexingUpdate search indexes in real-time

API Modules

ModuleDescription
heliosdb_cdc::EventProcessorCDC event processor
heliosdb_webhooks::WebhookServerWebhook delivery server
heliosdb_webhooks::CircuitBreakerCircuit breaker manager
heliosdb_webhooks::ExactlyOnceExactly-once delivery

See Also: HeliosDB Feature Index