Key findings
Building systems that respond to bidding requests in under 200 milliseconds requires a fundamentally different architectural approach than traditional request-response applications. Through our work on the vendor bidding system in Dynabric — where contractors bid on maintenance jobs in near real-time — we documented the architectural patterns that consistently achieve sub-200ms response times at scale, and the common approaches that fail.
Finding 1: The database is almost always the bottleneck
In our initial architecture, 73% of request latency was spent in database operations. Not because the queries were complex, but because the connection establishment, query parsing, and result serialisation overhead dominated at the scale of tens of thousands of concurrent bids. Moving hot data into an in-memory cache (Redis) reduced database-attributable latency from 145ms to 12ms. The critical insight is that real-time bidding systems are essentially cache-first architectures — the database is the system of record, but the cache is the system of execution.
At sub-200ms latency targets, every network hop is a luxury you cannot afford. Minimise hops ruthlessly: co-locate services, pre-compute results, and cache aggressively.
Finding 2: Pre-computation beats real-time calculation
Evaluating a bid involves multiple factors: contractor rating, historical performance, current workload, distance to job site, price competitiveness, and qualification match. Computing these in real-time for every bid exceeded our latency budget. Instead, we pre-compute contractor scores on key dimensions whenever their profile changes and store the results in the cache. At bid time, the system combines pre-computed scores with the bid-specific variables (price, availability for this job) — reducing the real-time computation from 80ms to 8ms.
Finding 3: WebSocket connections halve perceived latency
Traditional HTTP request-response adds connection overhead on every interaction. For real-time bidding, where users are watching a live auction and submitting multiple bids, WebSocket connections eliminate the per-request connection overhead and enable server-push updates. When a new bid comes in, all participants see the updated state within 50ms — compared to 500ms+ with polling. The perceived responsiveness improvement was rated as the single most impactful UX change by our users.
Finding 4: Optimistic concurrency control outperforms locking
In a bidding system, multiple contractors may submit bids simultaneously. Traditional database locking creates contention that adds latency proportional to concurrency. We use optimistic concurrency control: each bid is accepted provisionally and validated asynchronously. If a conflict is detected (e.g., a bid arrives after the auction closes), the bid is rejected and the user is notified within 100ms. This approach handles 50x more concurrent bids than our original locking implementation with lower average latency.
Finding 5: Geographic distribution matters more than compute power
Adding more CPU did not meaningfully reduce our P95 latency because the bottleneck was network round-trip time, not compute. Deploying bidding service instances in multiple regions — co-located with our heaviest user concentrations — reduced P95 latency by 40%. For a UK-focused service like Dynabric, running in London rather than a US-East data centre saved 60ms of round-trip latency that no amount of code optimisation could recover.
Methodology
These findings are based on 14 months of production data from the Dynabric vendor bidding system, covering approximately 2.3 million bid submissions across 180,000 job listings. Latency measurements were collected using distributed tracing (OpenTelemetry) with traces spanning from the client-side bid submission through the WebSocket gateway, bidding service, cache layer, and database. Load testing was conducted using realistic traffic patterns derived from production data.
Recommendations
- Design cache-first: the cache should be the primary data source for all latency-sensitive operations, with the database as the eventual consistency target
- Pre-compute everything you can: if a calculation can be done before the user requests it, do it then, not at request time
- Use WebSocket connections for any interaction where users benefit from real-time updates
- Adopt optimistic concurrency control for high-contention operations
- Deploy close to your users — geography trumps compute power for latency
- Profile end-to-end, not just server-side — client-side serialisation and network time are often the dominant factors