Sub-Second Real-Time Risk Analytics on Hundreds of Terabytes
How to decompose a sub-second latency claim, size the hot working set, choose architecture patterns, and run an acceptance test on hundreds of terabytes of risk data.
"Sub-second" and "hundreds of terabytes" are two claims that vendors, buyers and engineers routinely read past each other on. A vendor means one thing by sub-second — usually a median query on a warm cache over a narrow slice of data. A buyer hears another — the risk decision that has to land before a payment clears, over the full estate. The gap between those readings is where projects fail, and hundreds of terabytes is the number that makes the gap expensive to discover late.
This guide closes that gap. It decomposes the latency claim into components you can measure separately, explains why a large estate is tractable at all, lays out the architecture patterns that earn sub-second response and what each one costs, catalogues the failure modes that break naive designs, and gives you an acceptance test you can run on your own exposures. It also covers what hot/cold separation really costs in money and auditability, and how to read a vendor's published number — including Singdata's — without being misled by it.
One evidence rule governs everything below: vendor-published figures are claims to reproduce in your environment, not facts to accept. That applies to every number in this article, including the ones from Singdata. Where a figure appears, it is attributed and framed as a hypothesis about a workload until your own test confirms it.
What "Sub-Second" Actually Measures: A Decomposition Buyers Can Use
A sub-second claim is only meaningful when it names a percentile, a concurrency level, a data volume and a freshness bound. Strip any of those away and the number describes a benchmark, not a system you can run risk decisions on.
The first thing to separate is the average from the tail. A service that averages 100ms can still have a meaningful share of requests taking several seconds, and at any real traffic volume that slow slice is enough users to matter — the Redis guide to p95 latency makes this point directly, and notes that one production service set its objective against a synthetic well-behaved client while the worst 5% of requests ran 5–10× slower than the rest. For risk analytics the tail is the whole point: the fraud check that takes three seconds is the one that either blocks a legitimate trade or lets a bad one through.
The second thing to separate is query time from data freshness. ClickHouse's documentation frames end-to-end time-to-insight as three components — time to ingest, time to transform and prepare, and time to query — and asks the question that actually decides the user experience: can the system return a 50ms answer on data that arrived a second ago, while ingestion is still running, and while other users are querying? A 50ms answer on a static dataset is a different claim from a 50ms answer on a live one, and vendors rarely volunteer which they measured.
Component | What it measures | How it gets gamed | What to demand in writing |
|---|---|---|---|
Data scanned per query | Bytes the engine reads to answer | Report a pre-aggregated hit, not the underlying scan | Bytes scanned per query shape, measured on your data |
Bytes served | Result size returned to the client | Truncate or page results silently | Row and byte limits per response, stated |
Query latency | p50 / p95 / p99 execution time | Quote p50 or an average only | p95 and p99 at your concurrency, per query shape |
Concurrency | Simultaneous queries sustained | Measure single-user, publish as system capacity | Target QPS with latency held at that load |
Freshness | Ingest + transform + query lag | Measure query latency alone | End-to-end lag from event to queryable, at p95 |
The compound claim the rest of this guide tests is therefore: sub-second p95 at a stated concurrency, on data no older than a stated freshness bound, over a stated working set. Anything less specific is a marketing number.
Why Hundreds of Terabytes Is Tractable: The Hot Working Set Argument
Hundreds of terabytes is tractable because the sub-second target applies to the hot working set, not to total history — and those are different quantities that vendors and buyers routinely conflate.
The documented pattern is a sharp time-range distribution: most queries touch the last few minutes to hours, with a long thin tail reaching back months. The hot-tier Iceberg serving guide describes instrumenting queries to record the time range each one touches, then setting the hot window where the marginal query served stops justifying the storage. The same guide is blunt about why one storage layer cannot serve both a nightly report over three years of history and a lookup an automated system waits on: those workloads have opposite requirements, and the tiered architecture exists because no single system serves both well.
What follows from that is a separation of concerns. Data that must be instantly queryable lives in a store tuned for point lookups and short-range scans. Data that must merely be queryable stays in the lakehouse. The historical side gets precomputed: a ninety-day baseline recomputed on every request is enormous waste, so compute baselines on a schedule, store them small, and let the spanning query join recent activity against a precomputed row rather than against ninety days of raw events. That single move converts most boundary-spanning queries into a fast recent-range lookup plus a small join. Queries are then routed by shape to whichever store serves them.
The counter-case deserves stating plainly. A workload whose queries genuinely scan full history at random is not made sub-second by tiering. If your analysts run ad hoc detail analysis across the entire estate, expect that class of query to stay in the seconds range — the VeloDB crypto-exchange case study reports exactly that split, with risk and AML queries at P95 within 500ms while a separate 400TB+ ad hoc analysis workload runs at P95 of 1–3 seconds. Tiering does not rescue the second workload, and no architecture should be sold as if it does.
The prerequisite is measurement. Before choosing a window, instrument the query time-range distribution on your own traffic. The hot-tier guide warns specifically against sizing the window by intuition — someone picks one hour because it sounds right, half the queries span the boundary, and nobody measured anything. Use observed queries rather than stated requirements, because what people say they need skews toward the longest range anyone ever wanted, and what they actually run is much tighter.
The Architecture Patterns That Make Sub-Second Achievable
No single pattern earns sub-second response on a large estate; the achievable designs combine several, and each one carries a cost you should price before adopting it. The five below are the load-bearing choices, presented as trade-offs rather than features.
Hot/cold separation. A dedicated hot tier in front of the lakehouse drops the freshness floor to sub-second, but you now operate two systems, carry real consistency work, and gain a second governance boundary. The hot-tier comparison lays out the trade directly: lakehouse-only keeps one system and one governance surface but is bounded by commit cadence and performs poorly on point lookups; adding a hot tier buys sub-second freshness and fast key lookups at the cost of a second system and real consistency work. The consistency work is not optional — it is the overlap-and-dedupe logic that prevents a record from existing in neither store at the boundary.
Pre-aggregation and materialized views. Storing the result of a query and rewriting future queries to read it is the standard way to make dashboards fast as data grows. The costs are consistent across engines: refresh latency staleness-bounds the dashboard, write amplification bills your storage, and the rewrite layer fails silently when it cannot match — falling back to the original query with correctness preserved and latency not. The pre-aggregation cost analysis puts numbers on the failure: the rewrite search is bounded by the optimizer's planning budget, typically 100–500ms, and complex shapes can push past it, so a miss runs the full scan plus the wasted planning time. It also flags the hit-rate threshold — below roughly 70% hit rate the maintenance cost typically exceeds the read savings. Distinct counts need special handling because they are not additive: Monday's 1.2M distinct members plus Tuesday's 1.3M does not give the two-day count. HyperLogLog-style mergeable states solve this by storing a sketch you can union across days rather than a number you can add.
Risk-bucket design. Partition and key around business facts and retention requirements, not one topic per rule. A partition key should match the stateful computation — account_id preserves account order, while network detection may need device_id — so derive separately keyed streams rather than expecting one key to serve every use case. The streaming risk-control lakehouse write-up makes the related point that a transaction needing consistently low tens-of-milliseconds latency needs an independently deployed serving path, so scheduler delays, backpressure or checkpoint pauses cannot enter the critical request path.
Streaming ingestion with point-in-time correctness. Event time, watermarks and allowed lateness are what let a stream produce a stable answer when events arrive out of order. The Flink event-time documentation covers how watermarks signal that event time has passed and how allowed lateness handles elements that arrive after their window. The same discipline applies to features: training datasets require point-in-time joins that use only information available at decision time, which prevents future leakage into a model that will run in production.
Query routing. Each query shape goes to the store that serves it. The boundary-spanning case is the one that needs care, and the pattern is a union with deliberate overlap plus deduplication on a stable key:
WITH combined AS (
SELECT event_id, customer_id, event_time, amount_usd, 'hot' AS src
FROM hot.events
WHERE event_time >= current_timestamp - INTERVAL '2' HOUR
UNION ALL
SELECT event_id, customer_id, event_time, amount_usd, 'cold' AS src
FROM lakehouse.gold.events
WHERE event_time >= current_timestamp - INTERVAL '90' DAY
),
deduped AS (
SELECT *, row_number() OVER (
PARTITION BY event_id ORDER BY (src = 'hot') DESC
) AS rn
FROM combined
)
SELECT customer_id, count(*) AS events, sum(amount_usd) AS total_usd
FROM deduped
WHERE rn = 1
GROUP BY customer_id;
The overlap region is deliberately present in both stores; the dedupe prefers the hot copy. Without the overlap, a boundary-spanning query at the exact moment the hot tier expired a record the lakehouse had not yet committed finds the record nowhere.
Query shape | What it looks like | Pattern that serves it |
|---|---|---|
Point lookup by key | Single entity, latest state | Hot tier |
Short recent range | Last minutes to hours | Hot tier |
Precomputed baseline | Rolling 30/90-day metric | Materialized view or scheduled aggregate |
Boundary-spanning | Recent activity joined to history | Overlap union + dedupe view |
Full-history ad hoc | Random scan across the estate | Lakehouse, seconds-range latency |
What Breaks Naive Designs: Five Failure Modes and Their Responses
Most sub-second risk platforms work in the demo and break in production for one of five reasons. Each failure mode below is concrete, and each has a design response you can build before it bites.
Backfills corrupt the watermark. A backfill writing historical rows to the lakehouse does not move the watermark forward in a useful way, and a naive watermark query over a table receiving backfilled rows produces a wrong answer. The hot-tier guide calls this a real bug that appears months after a working system has been running: someone runs their first backfill, the watermark query sees old event times, and the hot tier expires two hours of live data. The response is to compute the watermark over the streaming write path only, or track it separately rather than deriving it from table contents. The same guide recommends expiring records the lakehouse has confirmed committing rather than on a timer, and sizing the safety margin from the worst observed commit lag over a month multiplied by three, because commit-lag distributions have long tails.
Late-arriving data silently changes past decisions. Late does not mean wrong — a payment can be structurally valid and economically correct while arriving after the decision window, and discarding it preserves the wrong state. The late-arriving events guidance recommends a correction ledger that tracks, per correction, the affected aggregate, effective and detected time, source and evidence, state and decision impact, and status through detected, validated, replayed, downstream rebuilt, reconciled and closed. That ledger is what lets you answer an auditor's question about why a decision changed.
Restatements erase the audit trail. When a restatement lands, never delete known-state history. Bitemporalize only where late correction, decision reproducibility and audit value justify the storage and query complexity — the same guidance is explicit that the second time axis should not be applied to every field automatically. For risk, the known-state history is the evidence that a decision was correct given what was known at the time.
Multi-tenant contention degrades the tail. Tail latency spikes rarely come from every request getting a little slower; they come from a smaller slice of requests hitting a queue, pause or dependency slowdown that gets lost in the average. The Redis p95 guide names garbage collection pauses as a usual source, and notes that hedged requests — sending a duplicate to a second instance after a short delay and using whichever responds first — reduce tail exposure in exchange for some additional backend load, most practical in read-heavy, idempotent call patterns. The hot-tier guide adds compaction stalls and rebalancing to the usual sources, along with the operational criterion: an automated system issuing hundreds of queries per second needs p99 close to the median, and a store with occasional multi-second pauses breaks the loop even when its average looks fine.
Permission checks blow the latency budget. Simple policies — a single equality predicate or a range condition — are typically absorbed by the optimizer without measurable overhead. But realistic governance requires compositional policies, where a policy on one table depends on a policy on another, and the arXiv study of structural policies finds that as tiered cross-table dependencies accumulate, standard cost-based optimizers produce policy-violating plans in the majority of cases when compliance constraints are present. Secure views close the leak at the cost of optimizations and scan-volume visibility — Snowflake's secure view documentation states that secure views do not use those optimizations and that the amount of data scanned is not exposed for queries containing them. Treat governance cost as a line item in the latency budget, tested on the hot path, not as an afterthought applied after the performance work is done.
How to Run an Acceptance Test on Your Own Exposures
You can settle the latency question without vendor cooperation beyond access, using your own data and your own query shapes. The test below is a procedure, not a benchmark: it supplies the method and the recording template, and you supply the results.
Prerequisites. A representative extract of your own exposures — not a vendor demo dataset — at a volume that reflects your real working set. A defined query set spanning the shapes the business actually runs: point lookups, short recent ranges, precomputed baselines, boundary-spanning joins and at least one full-history ad hoc query. An agreed concurrency level, stated as target queries per second with the latency you require held at that load. And a way to record results per query shape, because a single blended number hides exactly the variation you are testing for.
Step 1: instrument the time-range distribution. Record the time range each query touches across a representative period. This sizes the hot window and tells you what share of traffic is boundary-spanning. Checkpoint: you have a distribution, not an anecdote, and the window is set where the marginal query served stops justifying the storage.
Step 2: prototype the highest-value query shape. Pick the single query that matters most to the business, stand it up against real data, and measure end to end. The hot-tier guide frames this as one shape, one store, real data — it answers whether the latency is achievable before you commit to the consistency work. Checkpoint: an end-to-end number for that shape, including ingestion lag.
Step 3: run the full query set at target concurrency with ingestion live. Record p50, p95 and p99 separately for each shape, plus bytes scanned and bytes served per query. Checkpoint: p95 and p99 both hold at your concurrency, and you can see which shapes miss.
Step 4: inject a backfill and a late-arriving batch mid-test. Verify that results remain correct and that freshness recovers. Checkpoint: the watermark did not regress and no live data expired.
Step 5: test a boundary-spanning query at the moment the hot window expires a record. This is the silent-gap test. Checkpoint: the record is found exactly once, with the correct value.
Step 6: test a compositional permission policy on the hot path. Apply a cross-table policy of the kind your governance team will actually require and re-measure. Checkpoint: latency holds, and the plan does not violate the policy.
Claim component | Threshold you set | Test performed | Observed value | Pass / fail |
|---|---|---|---|---|
p95 query latency | e.g. < 1s at target QPS | Step 3, per shape | ||
p99 query latency | e.g. < 2s at target QPS | Step 3, per shape | ||
End-to-end freshness | e.g. < 5s event to queryable | Steps 2 and 4 | ||
Boundary correctness | Zero missing or duplicate records | Step 5 | ||
Backfill safety | No live-data expiry | Step 4 | ||
Policy overhead | Within latency budget | Step 6 |
The thresholds are yours to set from the business requirement; the table is the deliverable you take into negotiation, because it converts a vendor's claim into a result you observed.
Cost and Auditability: What Hot/Cold Separation Actually Costs
Hot/cold separation buys latency and bills you in four currencies: duplicated storage, a second system to operate, real consistency work, and a second governance surface. The honest way to evaluate it is to price all four against the value of the decisions the latency enables.
Storage duplication is the visible cost. The consistency work is the hidden one — the overlap-and-dedupe view, the watermark coordination between the hot tier and the lakehouse, and the quarterly rebuild test that confirms you can reconstruct the hot tier from the stream. The hot-tier guide recommends wiping the hot tier in a non-production environment and rebuilding it quarterly, because an untested recovery procedure is a hope. The governance surface is the cost that gets underestimated: where an individual has a right to erasure, satisfying it against the lakehouse table and not against the hot tier does not satisfy it, and the hot tier is frequently a database on a network with different defaults that gets less scrutiny because it feels like infrastructure rather than a data store. All three costs shrink as the hot window shrinks, which is why the window is the parameter to revisit first whenever cost, recovery time or deletion exposure becomes a problem.
Auditability depends on two disciplines already covered: preserving known-state history through restatements, and maintaining a correction ledger that records what was known when. A risk platform that cannot reproduce the state it saw at decision time cannot defend the decision, regardless of how fast it answered.
Singdata's positioning bears on this trade, and it should be read as a claim to test rather than a conclusion. The company describes a single-engine lakehouse with one copy of data in open formats in the customer's own object storage — an architecture that, if it holds in your environment, would reduce the two-boundary governance problem that hot/cold separation creates. Singdata also publishes a customer figure of 500TB queried in under a second in a risk-analytics deployment at Shumei, and a benchmark report with published methodology that invites reproduction. Both are vendor-reported. The useful question is not whether the number is impressive but whether the same claim survives your acceptance test on your exposures — and whether the single-boundary architecture actually removes the governance cost you would otherwise carry, which you can check by testing deletion and permission policies across the whole estate rather than only the hot path.
How to Read Vendor Performance Numbers, Including Singdata's
A vendor number is a hypothesis about your workload until your acceptance test confirms it. Reading one well means extracting seven things before you are impressed: the percentile (p50, p95 or p99), the concurrency at which it was measured, the data volume actually scanned versus merely stored, whether ingestion was running during the test, the freshness of the data queried, the query shapes included and excluded, and the hardware and configuration.
Vendor-reported figures from one unnamed top-5 crypto exchange, as published by VeloDB. These are four separate workloads measured under different conditions, not one benchmark: dataset size is not stated for the point-query workload, and the 400TB+ ad-hoc analysis workload is not sub-second. Read each bar with its own concurrency and percentile; the chart does not show that a larger dataset causes lower latency.
A real published claim shows why the discipline matters. The VeloDB crypto-exchange case study reports, for risk control and AML on a Kafka-to-Flink-to-VeloDB pipeline, peak QPS reaching 5,000 with P95 latency stable within 500ms on multi-TB data. The same post separately reports a 400TB+ trading-analysis workload at 200+ QPS with P95 of 1–3 seconds, and a commission-calculation workload at 100+ QPS with P95 of 30ms and P99 of 100ms. Those are three different claims about three different workloads at three different concurrency levels. Merging them into one headline — "sub-second on 400TB" — would misrepresent all three. The risk workload is the one that resembles a real-time decision path; the analysis workload is the one that resembles an analyst's ad hoc query; and neither should be quoted without its concurrency and percentile attached.
Apply the same lens to Singdata. The 500TB-under-a-second figure from the Shumei risk-analytics deployment and the 6× faster-than-Spark figure from the TPC-DS 10TB benchmark are vendor-published, and the right response is to open the published methodology, check which of the seven attributes above it discloses, and then reproduce the claim that matters to you. A benchmark that discloses its configuration and invites reproduction is more useful than a larger number that does not, because it gives you something to test against.
The rule to carry into every vendor conversation: ask for the percentile, the concurrency, the scanned volume, the freshness and the query shapes, in writing. A vendor who can supply all five has given you a testable claim. A vendor who cannot has given you a slogan.
FAQ
Is sub-second latency actually possible on hundreds of terabytes?
Yes, but only for the hot working set under stated conditions. The tiered pattern exists precisely because a lakehouse-only design has a freshness floor set by commit cadence, and object storage adds a per-request latency that a 50ms budget cannot absorb across many files (hot-tier serving guide). Arbitrary full-history scans at random are a different claim and should be evaluated separately.
Does a lower average latency mean a better system?
No. A service averaging 100ms can still have a meaningful share of requests taking several seconds, and at real traffic volume that 5% is enough users to notice (Redis on p95 latency). Ask for p50, p95 and p99 separately, at the concurrency you actually run, and check whether the tail sits close to the median.
Can I get sub-second freshness and sub-second queries from one lakehouse table?
Not reliably. In a lakehouse-only design, a row becomes queryable after a snapshot commits, and frequent commits produce small files and heavy metadata, so practical cadence sits in minutes for most tables (hot-tier serving guide). The tiered pattern exists because of that gap, not despite it.
How short should the hot window be?
As short as your measured query time-range distribution allows. Instrument the time range each query touches, then set the window where the marginal query served stops justifying the storage; observed queries are tighter than stated requirements (hot-tier serving guide). Shorter windows also bound cost, recovery time and deletion exposure.
Do permission checks slow the hot path?
Simple policies — a single equality predicate or a range condition — are typically absorbed by the optimizer without measurable overhead. Compositional, cross-table policies are different: as tiered dependencies accumulate, standard cost-based optimizers produce policy-violating plans in the majority of cases when compliance constraints are present (policy overhead study). Test your actual policy shape rather than assuming either answer.
How do I verify a vendor's number?
Run the acceptance test on your own exposures, not the vendor's demo data. A published figure is a hypothesis about your workload until your own query set, at your concurrency, against your data, reproduces it.
Where to Go Next
Start with step one of the acceptance test: instrument your query workload and record the time range each query touches. That single measurement sizes the hot window, tells you how much of your hundreds of terabytes is genuinely hot, and reveals whether your boundary-spanning share is small or dominant.
Then prototype the single highest-value query shape against real data and measure end to end before committing to consistency work. One shape, one store, real data answers whether the latency is achievable before you build anything permanent (hot-tier serving guide).
For depth on a specific pattern, three resources go further than this guide can: the hot-tier serving guide for tier sizing, overlap and watermark scoping; the pre-aggregation cost analysis for refresh latency, write amplification and rewrite hit rates (pre-aggregation costs); and the policy overhead study for how compositional compliance policies interact with query planning (policy overhead study).
The deliverable you leave with is the acceptance checklist: claim component, threshold, test performed, observed value, pass or fail. Fill it in with your own numbers, keep it with the vendor evaluation file, and re-run it when the workload or the window changes.