Headless distributed Kenyan event aggregation service in Go (zero JS) crawling 10 live ticketers, deduplicating with pg_trgm, mirroring posters to SeaweedFS S3, and streaming via REST, GraphQL, gRPC, SSE & WebSockets.
docker compose up -d --build curl http://localhost:8080/readyz curl "http://localhost:8080/api/v1/events?county=Nairobi&limit=10"
Architecture & Resilience
- 13-service Go system solving duplicate crawls across replicas, dual-write Postgres/Kafka inconsistency, cache stampedes, and cascading downstream timeouts across 10 Kenyan ticketers (47 counties).
- Consistent Hash Ring (32 vnodes/worker) + Redis SETNX/Lua locks for mutually-exclusive sharded crawling.
- ACID Transactional Outbox in Postgres relaying to Redpanda/Kafka (events.discovered + events.dlq) & Redis Pub/Sub.
- PgBouncer -> Postgres Primary for writes; WAL-streaming Read Replica + Redis Cache-Aside (Singleflight + TTL jitter) for reads.
- Per-domain Circuit Breaker, Exponential Backoff with Full Jitter, Bulkhead semaphore, SSRF IP/DNS validation, slog JSON, OpenTelemetry OTLP gRPC, Prometheus & Grafana.
Verified Code Proofs
- Consistent Hashing (32 vnodes) · Redis SETNX + Lua Locks
- Transactional Outbox · Kafka Consumer Groups & DLQ
- Postgres Primary + Replica + PgBouncer · TSVECTOR + pg_trgm Dedup
- Singleflight + TTL Jitter · SeaweedFS S3 + SHA-256 · Nginx L7 + gRPC + GraphQL + SSE
- SSRF Protection · JWT + RBAC + HMAC · slog + OTel + Grafana · Multi-Stage Alpine Docker