Build1 distinct publisher3 min readUpdated
One engineer's trading app hit a three-second P99 tail while average latency looked healthy. The cause sat in Postgres and the feature lookups, not the model, and cache tuning could not reach it.
The Engineer · Build desk
Compiled by The EngineerSomething wrong?How this is made
The arithmetic is what makes this concrete. At 740,000 operations per second, a P99 is not a handful of unlucky users: it is roughly 7,400 operations every second sitting in the slow bucket [13]. While one of those requests waits out its three seconds, about 2.2 million others pass through the same system [14]. In a trading app, that tail is the product.
The mechanism is unglamorous. Each inference call was doing only a handful of reads, and those reads queued behind writes once concurrency rose [4]. Cheap reads, expensive queue. Past a certain write throughput you get lock contention, and at that point retries, bigger caches and connection pool tuning stop moving the number [5]. Averages stay presentable because the median request never meets the lock; Koopmans is blunt about what that means, calling tail latency "a property of your architecture" rather than a bug, and pointing at storage-engine GC pauses landing at exactly the wrong moment [6].
The named culprit was Postgres under pressure, which he is careful to describe as a database asked to do too much rather than a slow one [7]. Read that as a placement error, not a product verdict. A read path with a hard deadline was sharing a store with a write path that had none, and the deadline lost.
The accuracy half of the story has the same shape. Wallet-address profile staleness blew past a five-minute SLA by hours while offline evaluation metrics stayed clean the whole time [8]. If "hours" means even two, the freshness target was missed by a factor of 24 [15]. Koopmans describes the result as metrics that look great offline and performance that is "rubbish" once online data is mixed in [9]. An offline harness scores a model against features it is handed; it never has to fetch them, so the one variable that broke production, the age of the feature at read time, is the variable the harness holds constant.
Then the index. Recall fell to 42 percent, meaning approximate search was missing 58 percent of true best matches, and query latency grew at the same time [16][10]. That combination is worse than either failure alone, because the symptom looks like a performance problem and is also a correctness problem. Worse, the trigger was improvement: re-embedding after each model change added mutations to the HNSW graph and rotted it further each pass [10]. Any change to the similarity function, the search parameters or the embedding model means starting the graph from scratch [11], so the accuracy work funds its own regression unless someone budgets the rebuild.
One caveat on weight. This is a single engineer's account of a single ML-based financial trading app, shared in conversation with a colleague at the same vendor [1]. The numbers are self-reported and the failure modes are common enough to be credible, but nothing here is a benchmark.
Follow any of these and your For You feed starts watching them — no settings page required.
Ranked by verification strength, evidence, and original report placement.
The New Stack piece recounts lessons from Tim Koopmans, a colleague of the author, learned while building an ML-based financial trading app, discussed in a video conversation about what goes wrong with real-time AI at scale.
Latency often looks fine in testing and then spikes at P99 under real concurrent load: as Koopmans' app approached about 740,000 operations per second, its P99 latency reached 3 seconds.
Koopmans said: "I kept blaming the model for being slow, but it turns out the model was fine. It was just that the feature lookups were killing me."
Each inference call was doing only a handful of reads, but those reads queued up behind writes under load, while average latencies still seemed fine.
Once highly concurrent write throughput is reached, lock contention appears and affects tail latencies; at that point retries, bigger caches and connection pool tuning do not help.
Koopmans said tail latency "isn't a bug that you can fix, it's a property of your architecture", giving the example of a storage engine producing GC pauses at exactly the wrong moment causing a latency spike regardless of tuning.
Evidence-backed comparisons of source perspectives and observed adoption signals. Read the methodology
Which Builder, Operator, and Investor concerns the observed source mix emphasized—not a truth score.
Evidence, demonstrated adoption, hype gap, incentives, and confidence are assessed independently, each on its own current evidence. How these are measured.
Detailed but single-source and unverifiable
The figures are unusually specific (740K ops/sec, 3s P99, 42% recall, five-minute SLA) and attributed to a named engineer with direct quotes, which is better than anonymous anecdote. But there is exactly one source, the account is a first-person retrospective told via a video conversation, and nothing reproducible is supplied: no workload description, schema, hardware, Postgres configuration, index parameters or before/after measurements. The mechanisms described (reads queueing behind writes, lock contention under concurrent writes, HNSW degradation under mutation) are plausible and widely discussed, but this cluster does not independently establish them.
No measurable adoption signal
This is a practices-and-postmortem story rather than a product, release or deployment story. The only real-world usage datum is one engineer's self-reported figures from a single unnamed trading app, with no other organisations, no versions, no dates for the deployment itself and no aggregate usage disclosures. That is not enough to score how widely the described architecture or the recommended practices are used, and inferring broader uptake would be guesswork.
Mildly overstated by generalisation and vendor framing
The core diagnosis is deflationary and lands well below typical AI hype: it explicitly says the model was fine and points at the data path, which is a useful corrective. The overstatement is structural rather than rhetorical. One unverified app is elevated into general laws ('tail latency isn't a bug you can fix, it's a property of your architecture'), Postgres is cast as the culprit without showing what was tried first, and the piece closes by steering toward 'a high-performance database' written by a colleague of the engineer whose story supplies all the evidence. The gap is positive but small because the specific numeric claims are modest, internally consistent and presented as one person's experience.
Vendor-adjacent thought leadership, partially disclosed
The article is written by a colleague of the engineer whose experience supplies every fact, is built around a promotional video, and concludes with a section on 'avoiding the doom loop with a high-performance database' after establishing that Postgres was 'asked to do too much'. That is a coherent commercial funnel: name the pain, name the incumbent that buckled, point at a faster datastore. The colleague relationship and the video are disclosed, which is why this is not scored higher, but no conflict statement accompanies the database recommendation and no dissenting vendor or maintainer voice is included.
Moderate-low
Confidence is limited by the one-source cluster, the absence of any verifiable artifact, and clear commercial incentive in the framing. It is raised above the floor because the claims are direct, attributed and internally consistent, the failure mechanisms are conventional distributed-systems and vector-index behaviour rather than extraordinary assertions, and the adoption dimension is left unscored instead of estimated.
build
Notion's agent stack is live, not slideware, and it only changes one of your decisions1 distinct publisher
build
The 680 MB database that was really a 17 GB disk: self-hosted support platforms fail at month six1 distinct publisher
build
Your "Index Only Scan" Did 2,847 Heap Fetches: Covering Indexes Are a Vacuum Problem1 distinct publisher
build
Once the question needs a cube, you own the parser1 distinct publisher
Distinct publishers with included, body-backed reporting in this cluster.
1 article · August 23, 2026