Back to Case Study Catalog
⚡
Event-Driven · Multi-Cloud
PRIVATE LAB SPECStatus: EXPERIMENTING

Event Streaming Pipeline

High-Volume Pub/Sub & Stream Processing

Execution Profile: Disposable Test Run (4h TTL Auto-Destroy)
Cost Guardrail:Ephemeral Provisioning Guardrail

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.

Architectural Hypothesis

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

11. Event Ingestion

Producers publish synthetic JSON events with timestamps and unique partition keys.

22. Queue Fan-out

AWS EventBridge routes to multiple SQS queues; GCP Pub/Sub pushes to multiple topic subscriptions.

33. Consumer Processing

Concurrent Python workers consume batches of 10 messages with simulated downstream latency.

44. DLQ & Telemetry

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 DimensionAWS (EventBridge + SQS)GCP (Pub/Sub)
Synthetic Ingestion Burst7,820 msg/sec (EventBridge + SQS)9,450 msg/sec (Cloud Pub/Sub)
p95 Transit Latency18.5 ms (Standard) / 24.2 ms (FIFO)14.2 ms (Global Anycast Ingestion)
Message Ordering GuaranteesStrict Total Order via SQS FIFO (MessageGroupID)Partitioned Order via Ordering Keys
Dead-Letter Queue (DLQ) IsolationMaxReceiveCount = 3 with redrive policyDead 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 TeardownTerraform destroy + SQS purge (4h TTL)Terraform destroy + Pub/Sub topic deletion (4h TTL)

Architecture Decision Records (ADRs)

ADR-001: Comparative Benchmark ProtocolACCEPTED
Decision: Deploy identical load-generating containers to both AWS us-east-1 and GCP us-central1.
Alternatives Evaluated: Synthetic mocking in unit tests; Local Kafka cluster.
Consequences: Measures real cloud network transit latency and provider-specific throttling behavior.

Failure-Mode & Resilience Analysis

Scenario: Consumer Service Outage
Observed Behavior: Messages accumulate in queue buffers.
Architectural Mitigation: 14-day retention policy on SQS and Pub/Sub ensures zero message loss while alerts notify operators.

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

Target Burst Rate10,000 msg/s
Planned throughput for comparative stress test
Target Delivery Latency< 25ms
End-to-end publish-to-consume benchmark goal
TTL Guardrail4 Hours
Automated teardown timer armed upon stack deployment
Estimated Test Cost$0.14
Total cloud spend for a complete 4-hour benchmark run

Technology Primitives

frontend
React Observability Dashboard (Private)
backend
Python Event Processors
database
DynamoDB Streams
infra
Terraform + Multi-Region

Architecture Tags

KafkaSQSPub/SubLambdaCloudWatchTerraform
Security Notice

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.