Loading...
Initializing...
Loading...

OVERVIEW PULSE is a distributed, high-concurrency real-time auction engine engineered to eliminate race conditions, dirty reads, and database row-lock contention under heavy concurrent bidding loads. Built with Next.js 15, Socket.io, Redis Lua scripts, BullMQ, and PostgreSQL 16, it delivers predictable sub-millisecond bid execution and automated financial settlement. CORE ENGINEERING & ARCHITECTURE 1. Sub-Millisecond In-Memory Bid Arbitration (Redis Lua) Concurrent bid resolution is shifted entirely into Redis memory using pre-compiled atomic Lua scripts (EVALSHA), guaranteeing single-threaded atomic execution in under 1 millisecond. This completely prevents double-bid collisions, negative increments, and stale state anomalies without relying on traditional heavy database table locks. 2. Dynamic Anti-Sniping Soft-Close Engine The engine implements an automated soft-close algorithm that dynamically extends the auction countdown by 60 seconds whenever a valid bid is registered in the final 30-second window. This neutralizes algorithmic sniping bots, guaranteeing fair price discovery for genuine human bidders and maximizing final lot closing values. 3. Decoupled Asynchronous Settlement (BullMQ & PostgreSQL 16) High-throughput bidding arbitration is decoupled from relational persistence through a durable BullMQ 5 delayed job queue. Once an auction reaches its final soft-close cutoff, worker processes execute atomic SQL transactions, generate SHA-256 cryptographic audit hashes, and commit immutable financial records and winner ledgers into PostgreSQL 16. 4. Real-Time Telemetry & Clustered WebSocket Synchronization Built on a clustered Socket.io gateway broadcasting live price updates, room state telemetry, and client clock synchronization with sub-2ms latency. The frontend architecture pairs optimistic UI state updates with automatic reconciliation routines if a bid fails server validation. 5. Cloud Infrastructure & Production Deployment The application runs as a containerized multi-service architecture on AWS EC2 in the Mumbai region, fronted by Caddy reverse proxy with automated TLS/SSL certificate provisioning, HTTP/2 multiplexing, and zero-downtime WebSocket routing at auction.himansh.co.in.