SCADA Critical Alarm Dispatcher and Webhook Engine Specification
Design a high-availability alarm routing and webhook dispatch microservice for safety-critical SCADA environments.
Use this template when designing backend dispatch engines that process, debounce, prioritize, and fan out critical plant floor alarms to on-call engineers, paging systems, and safety dashboards. It guarantees deterministic delivery, prioritization, and failover routing.
Role: Lead Industrial Reliability & Backend Engineer specializing in safety-critical SCADA systems, real-time message routing, and fault-tolerant dispatch architectures.
Context
- Alarm Ingress Rate: Polling and receiving raw alarm states at {{scada_polling_interval_ms}}.
- Priority Taxonomy: Alarm severity categorized across {{alarm_priority_tiers}}.
- Network Boundary: Isolated industrial network topology adhering to {{plant_network_segmentation}}.
- Delivery Retries: Webhook backoff configured using {{webhook_retry_backoff_model}}.
- Poison & Failure Handling: Unroutable alarm state dispatched to {{dead_letter_target}}.
Task
Draft an exhaustive engineering specification for a mission-critical SCADA alarm dispatch engine that deduplicates raw alarm storms, enforces strict priority queuing, and reliably dispatches webhook notifications to downstream safety and paging systems without dropping safety-critical events.
Method
- Define the ingress parser that validates incoming SCADA alarm frames, timestamp integrity, and source station identifiers.
- Design the sliding-window debouncing and alarm-storm suppression algorithm to prevent notification flooding.
- Architect the multi-tiered priority queue infrastructure that ensures Tier-1 emergency alarms bypass all operational queues.
- Specify the worker pool execution model for webhook dispatches, including connection pooling, DNS caching, and timeout policies.
- Detail the circuit-breaker and dead-letter queue forwarding logic when downstream endpoints experience outages.
- Formulate mutual authentication, HMAC signature generation, and webhook security headers for outgoing requests.
- Define health checking, hot-standby failover mechanisms, and memory-safe backpressure throttling.
Constraints
- MUST guarantee that safety-critical alarms are dispatched within 250 milliseconds of edge receipt.
- MUST NOT discard unacknowledged alarms during failover across redundant instances.
- Outbound webhook payloads must be signed using SHA-256 HMAC tokens.
- Alarm storm suppression must dynamically throttle noisy sensors without dropping state change events.
- Memory usage during sustained alarm floods must not exceed allocated process boundaries.
Output format
- Ingress & Storm Suppression Logic: Algorithm details, sliding-window pseudo-logic, and threshold configurations.
- Priority Queue & Worker Pool Architecture: Queue design, concurrency parameters, and latency bounds by tier.
- Webhook Delivery Specification: Payload schema, HMAC signature headers, HTTP status handling, and retry timeline.
- Network Isolation & Security Spec: Gateway traversal, mTLS configuration, and egress firewall rules for {{plant_network_segmentation}}.
- Failover & Dead-Letter Handling: Active-passive failover state machine, replay runbook, and {{dead_letter_target}} alerting.
Self-review
- Confirm that the priority queuing mechanism completely prevents starvation of highest {{alarm_priority_tiers}}.
- Verify that retry backoff curves precisely match {{webhook_retry_backoff_model}} specifications.
- Ensure that all network paths respect the physical zoning defined in {{plant_network_segmentation}}.
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.