Event Streaming Pipeline
High-Volume Pub/Sub & Stream Processing
Problem Statement & Investigation
Modern event-driven architectures require decoupling producers from consumers while guaranteeing zero message loss and predictable dead-letter queue (DLQ) behavior during downstream outages.
GCP Pub/Sub offers lower latency for global fan-out message distribution, whereas AWS SQS FIFO provides superior ordering guarantees and strict per-message deduplication for transactional events.
System Runtime Flow
Producers publish synthetic JSON events with timestamps and unique partition keys.
AWS EventBridge routes to multiple SQS queues; GCP Pub/Sub pushes to multiple topic subscriptions.
Concurrent Python workers consume batches of 10 messages with simulated downstream latency.
Failed messages route to Dead Letter Queues with CloudWatch and Cloud Monitoring capturing p95 latency.
Multi-Cloud Comparative Matrix (AWS vs. GCP)
Empirical measurements collected using the SymmetricCloud benchmark harness (scripts/benchmark-event-pipeline.py) across AWS us-east-1 and GCP us-central1 under 10k msg/s bursts.
| Benchmark Dimension | AWS (EventBridge + SQS) | GCP (Pub/Sub) |
|---|---|---|
| Synthetic Ingestion Burst | 7,820 msg/sec (EventBridge + SQS) | 9,450 msg/sec (Cloud Pub/Sub) |
| p95 Transit Latency | 18.5 ms (Standard) / 24.2 ms (FIFO) | 14.2 ms (Global Anycast Ingestion) |
| Message Ordering Guarantees | Strict Total Order via SQS FIFO (MessageGroupID) | Partitioned Order via Ordering Keys |
| Dead-Letter Queue (DLQ) Isolation | MaxReceiveCount = 3 with redrive policy | Dead letter topic with max_delivery_attempts = 5 |
| Cost per 1 Million Events | $0.40 (SQS) + $1.00 (EventBridge) = $1.40 | $0.40 (First 10GB free per month) |
| Ephemeral Lifecycle Teardown | Terraform destroy + SQS purge (4h TTL) | Terraform destroy + Pub/Sub topic deletion (4h TTL) |
Architecture Decision Records (ADRs)
Failure-Mode & Resilience Analysis
Key Engineering Takeaways
- Pre-allocating dead-letter queues is critical before running high-throughput stress tests to prevent message loss.
- GCP Cloud Pub/Sub is ideal for globally distributed event streaming and multi-region fan-out pipelines.
- AWS SQS FIFO is superior when strictly sequential financial or inventory state machines must be maintained across multiple worker containers.
Empirical Benchmarks
Technology Primitives
- frontend
- React Observability Dashboard (Private)
- backend
- Python Event Processors
- database
- DynamoDB Streams
- infra
- Terraform + Multi-Region
Architecture Tags
Private Lab Investigation · Brief Public, Deep Code & Deploy Keys Sealed. Operational lifecycle commands (Deploy, Scale, Destroy) and raw cloud credentials remain sealed in the private control plane.