Observed Signal · May 6, 2026 · Technical Article · Source: DEV Community · Impact: 2/5 · Sentiment: Neutral
WebSockets Disposable; Database as Source of Truth
A developer describes designing a shipment-tracking gateway that treats PostgreSQL as the authoritative store and makes WebSocket delivery a disposable, best-effort layer. Carrier-specific adapters normalize varied inputs (DHL, DPD, GLS) into a single event shape and a deterministic deduplication key. The processor performs a dedup lookup, inserts events with an on-conflict no-op, and updates shipment projections only when an event timestamp is newer than the stored last_event_at. Redis Streams are used for fanout; the broadcaster acknowledges malformed messages and uses XAUTOCLAIM to reclaim stuck entries. Polling is intentionally simple and rate-limited; tests and metrics gaps are acknowledged and a 24-hour soak test remains outstanding. Published 2026-05-06.
Practical engineering patterns for real-time delivery and data correctness are useful to backend engineers and system designers but do not constitute industry-shifting news.
Track Redis Signals & Market Shifts in Real-Time
Polaris7 autonomous intelligence agents track regulatory filings, primary sources, executive changes, and deal flow 24/7. Create your free Explorer workspace to monitor these entities.
Key Takeaways & Evidence Grounding
- The gateway treats PostgreSQL as the source of truth and makes WebSocket streaming the delivery layer.
- Events are normalized into a single shape and assigned a deterministic dedupKey from carrier, tracking number, carrier status, and carrier timestamp (ISO).
- The processor does a dedup lookup, inserts into tracking_events with onConflictDoNothing(), and updates shipment projection only if the new carrier timestamp is newer than last_event_at.
- Redis Streams are used for delivery: the processor writes one stream entry to tracking:events; the broadcaster consumes as group ws-broadcaster, acknowledges malformed payloads, and uses XAUTOCLAIM to reclaim pending messages after 60 seconds.
- Polling defaults: POLL_BATCH_SIZE = 10, PRD target 100 active shipments across 3 carriers, carrier polling cycle < 30s, and WebSocket delivery < 200ms once in pipeline.
Connected Companies & Entities
2 Entities mappedOntology Mapping & Concepts
Related Market Signals & Shifts
Recent verified developments and strategic activity across this market segment.
Scaling to 100k WebSockets: Realtime Orchestration Case Study
A developer post describes failures encountered when a realtime AI-streaming product reached ~100,000 WebSocket connections: latency spikes, message loss, duplicated and out-of-order events, and operational complexity from Redis pub/sub and sticky session assumptions. The team replaced brittle Redis-only fanout with a focused realtime orchestration layer, introduced an event router with topic partitioning and consumer groups, added a lightweight persistent event stream for short replays, and implemented client-side idempotency with per-message sequence numbers. They also adopted the managed platform DNotifier for pub/sub, connection lifecycle, and short-term replay. These changes reduced tail latency, eliminated message loss on worker restarts, constrained fanout work, and materially lowered operational overhead at scale.
How I Built a Reliable Webhook Delivery System
A developer describes building a production-grade webhook delivery system using FastAPI, PostgreSQL and Redis to solve common reliability issues. The post explains design changes: make delivery asynchronous (return 202 Accepted), add a watchdog to requeue stale IN_FLIGHT jobs, implement exponential backoff retries via a Redis sorted-set delay queue, apply a per-subscription circuit breaker (5 failures, 60s cooldown) and sign payloads with per-subscription HMAC‑SHA256 verified with hmac.compare_digest. Observability is provided with Prometheus and Grafana. The author reports achieving 99.9% delivery reliability across 10,000+ daily webhooks and promises a deeper technical deep-dive later.
Resilient Real-Time Systems with WebSockets & Redis Pub/Sub
This technical guide explains how to build resilient, low-latency real-time systems by combining persistent WebSocket client-server connections with Redis as a central pub/sub broadcast layer, distributed state store, and cache. It describes architectural patterns for scaling (single server, multiple WebSocket servers + single Redis, and Redis Cluster), and explains when to integrate durable queues (Kafka/RabbitMQ/AWS SQS) for persistence and guaranteed delivery. The article includes a concrete Node.js example (ws and ioredis: server.js, publisher.js, client.html) and Docker, plus client reconnection best practices (exponential backoff) and session persistence in Redis to allow resuming on another instance. Operational topics covered are Redis high availability (Sentinel/Cluster), sharding and serialization, backpressure handling, load balancing, security, idempotency, and monitoring. It also discusses operational deployment patterns, monitoring metrics, and security practices for production environments.
Track Real-Time Market Signals & Shifts
Set up custom watchlists to receive automated, evidence-grounded executive digests whenever material signals or shifts occur across your tracked landscape.
