top of page

Detection in the pipeline isn’t the problem. Missing correlation is.

Writer: Ting Wang
Ting Wang
Nov 11
11 min read

Updated: 2 hours ago

By Ting Wang, Co-Founder and CEO of Timeplus


Clint Sharp's post, How I think about detection in the pipeline, is the best argument I've read against running detection in the pipeline. He shows why judging one event at a time produces noisy alerts you can't trust. He's right about the pipelines we have. He's wrong that correlation has to move downstream, where it can only see and react after the data lands.


Most telemetry pipelines have been sold as plumbing: ingesting data, moving it and cutting costs. That's one job. The more valuable one is running correlation, detection and response in the stream itself, once the pipeline has the context.


I treat this as a data engine challenge, and I've built on both sides of it. I started at SAP building BI and data warehousing, then spent six years at Splunk building the GDI (getting data in) pipelines. They got data in with add-ons, but they were brittle, clunky and per-event, with little they could compute in flight. Anything that needed more than one event waited for a scheduled search after indexing, often every 15 minutes or longer. So now I build Timeplus, a stateful streaming pipeline that security engineers build their own correlations and detections on.


The challenge is the engine, not the location


A rule that sees one event at a time can fire a detection, but it cannot tell a trivial event from a story. That is why stateless detection is noisy wherever it runs, in the pipeline or in the SIEM. Another route is to bolt on a second tool for state. Even Falcon Onum, CrowdStrike's pipeline product, does this: its own example (Impossible Traveler example for Falcon Onum) retrieves the user's prior login location from Redis. That works, but the state lives outside the pipeline. Every login has to read it and write it back, and it's one more system to run, manage and keep fresh. The real ask is to keep state, history and lookup tables in the same engine as the stream, so a rule can use all three without leaving it.


A detection you can trust takes three ingredients:


  • State. What has this source, user or session done in the last few minutes or hours? Windows, distinct counts, ordered sequences.

  • History. What is normal behavior for this entity, and what would this rule have done last month? Without history there are no baselines, no backtests and no hunting backward.

  • Enrichment. Who owns this account, how critical is this host, is this IP already known? A hit on a privileged finance account and a hit on a test user are different alerts.


Correlation ties them together: failures to a success, a login to a baseline, an account to its role. It cuts the most noise, because a single-event check can only guess. A stateless rule sees one failed login. A stateful rule sees the failures per source over the last few hours, whether the account was just targeted, and whose account it is. It is also the hardest part for a pipeline: joining live streams, holding state and handling out-of-order events at full data rates. Here is the high-level picture:


Detection in the pipeline: high-level architecture


Where this fits in a detection engineer's day


Detection engineers already work in layers: EDR on the endpoint, NDR on the network, a SIEM for scheduled searches and correlation, and scripts or detection-as-code in between. The pipeline usually gets treated as plumbing for fast single-event checks. That sets up a trade-off: seconds with one event, or full context minutes to hours later.

Layer

Latency

What it sees

EDR / NDR

Milliseconds to seconds

Local host or packet

Event-at-a-time pipeline

Seconds

One event, no context

SIEM / data lake

Minutes to hours

Full cross-system history

Stateful correlation pipeline

Milliseconds to seconds

Windows, history, and multiple streams

Correlation doesn't have to wait for the data to land.


Why the pipeline is still the right place


Once the rule can correlate, the question becomes where to run it. I see three reasons the pipeline wins:


  • It is the freshest point. The event is there as it happens, before it is stored, indexed or sampled.

  • It sees everything before the data is split. Once data is routed to different tools or filtered, a rule that needs two sources has to rebuild the picture. In the pipeline the sources already meet.

  • Compute once, use everywhere. A result computed in the pipeline can serve the SIEM, the data lake, the SOAR and an AI agent at the same time, instead of each one recomputing it.


For the SOC, that means:

  • Better alerts, in real time. Clint is right that a bad alert can cost an analyst twenty minutes, and that a noisy alert wired to automated response can cause an outage. Correlating first means what reaches the SOC is a signal with its evidence attached, not "50 failed logins."

  • Control over cost, content and routing. Rules are your queries, versioned like code. The full-fidelity copy still goes to S3 or the data lake you choose, for cost-effective long retention.

What Timeplus is & isn't

Timeplus is the data engine under your detections. It ships no detection content: no rule library and no case management. You write the rules in SQL, and Timeplus AI agent skills can draft them from MITRE ATT&CK or Sigma rules for you to tune against your own data.

Example: distributed password spraying (MITRE ATT&CK T1110.003)


Rather than argue it further, let's build a detection in Timeplus. Password spraying means trying a few common passwords against lots of accounts, so every account stays under its lockout threshold. The textbook version comes from one IP, and a per-source rule catches it.



That's fine for the lazy attacker, and that's still the problem. When a real campaign spreads out in an org with 100,000 identities across Entra ID, Okta and others, it can use thousands of IPs against tens of thousands of accounts over several hours. Each IP fails a few times. Each account sees a handful. Nothing crosses a per-source threshold. Only the aggregate gives the campaign away, and the pipeline sees the aggregate as it forms.


So the pipeline has to ask deep questions. Do the sources share a network or a user agent? Did a targeted account then log in successfully? Is that login unusual for that account? The rule needs state to see the campaign, history to judge the login, and enrichment to rank it. Authentication events from every identity provider land in one stream, enriched upstream with the source network (src_asn), user agent and provider (idp).



Step 1: state. Group failures by network and user agent over a six-hour window, re-evaluated every 10 seconds. Flag groups where at least 100 sources hit at least 500 accounts, with about three failures or fewer per source. Each IP looks harmless on its own, and the group is the campaign. The 10-second hop is deliberate: it is the containment clock, so a campaign is flagged within seconds, not at the next scheduled search.


In production, a downstream LATEST JOIN or deduplication view collapses overlapping 10-second hops into a single incident per (src_asn, user_agent) campaign so analysts aren't paged every 10 seconds.


Step 2: correlation (sequence). Join those campaigns to a successful login from the same network and user agent, within an hour after the campaign window.


Step 3: enrichment and history. A success is only interesting if the account matters, or if it's a network that account has never used. Two lookups answer that. account_networks is kept current by a small materialized view over past successful logins.

Then the alert:

One thing to watch: the history view and the alert both read the same logins. That is why the history view keeps first_seen and the alert compares it with the campaign start: a network first seen after the spray begins counts as new. 


Step 4: replay. Before the rule pages anyone, replay stored history through the Step 1 rule and see what it would have fired. Steps 2 and 3 replay the same way.



Steps 1 to 3 run live as events arrive, and Step 4 replays the same SQL over what you stored. It keeps running until you stop it, so bound it with a time filter when you backtest. All four steps run in one engine. The thresholds and the grouping by network and user agent are examples: picking the features that define a campaign in your data is detection engineering, and the engine won't do it for you.


What should reach the SOC looks closer to this, with illustrative numbers: possible distributed password spraying, 1,200 accounts targeted from about 3,000 sources across three providers; one targeted account then authenticated from an unfamiliar network and made an IAM change. It should carry timestamps, the affected entities and pointers to the raw events, and it should separate observed facts from analytical conclusions.

Example: DDoS detection with multiple correlations, at burst scale, within a second


The password spraying example is not unusual: most detections need correlation with state, history and enrichment. One of the global online gaming platforms we work with built DDoS detection on Timeplus to find the malicious IPs within a second and block them at the router. Unlike the spray, the attack is a burst, so the window is 5 seconds with a 1-second hop, not six hours with a 10-second hop. The ingredients are the same, in a different shape:


  • State is a live 5-second window per source IP, sliding 1 second.

  • History is a moving baseline, overall and hourly, because traffic has a daily and weekly shape and a fixed threshold fails.

  • Enrichment is a versioned rules table that holds the thresholds, plus host and IP information such as allow and block lists. These are mutable streams, so changing one is a row update with no reload.

  • Correlation is the join where live traffic meets the baselines and the enrichment, and it decides when an alert fires. It runs on every 1-second slide, across hundreds of thousands of source IPs.


The load is IPFIX flow records at millions of events per second at peak, hundreds of thousands of source IPs and hundreds of concurrent rules, across many points of presence worldwide. The query below is simplified from the deployment; the detailed case study is in From Logs to Context. Two upstream views normalize the raw IPFIX records and enrich each flow with allow and block lists and asset info. The detection starts from that enriched stream, flows_enriched.



Three signals meet in one correlation step, and one alert drives sub-second detection and two actions:


Stage 4 is where the three signals meet. A live 5-second rate means little on its own: a spike might be an attack or might be Friday night. Joined to the IP's own overall and hourly baselines, it becomes a spike ratio, and the rule can ask how unusual this is instead of how big it is. Only then does the alert fire. When it does, the pipeline names the sources, an application blocks them at the router (the response), and the attack window is persisted to the data lake for long-retention investigation and postmortem.


What made both examples possible


Neither example works unless the engine underneath can do a few specific things at high rates. These are the ones I'd check on any engine:


  • Incremental computation. A materialized view is a long-running query that updates as events arrive and keeps its history, instead of rescanning the same data on a schedule. This is what makes sub-second latency feasible and affordable.

  • Time as a first-class idea. Tumbling, hopping and session windows, event time and watermarks, so late and out-of-order events are handled on purpose and not by accident.

  • Joins that hold state. A stream joined to a dimension (identity, asset, threat intel) with LATEST JOIN, and two streams joined within a time bound with date_diff_within, so enrichment and correlation are part of the query. That's Step 2 and Step 3 of the spray rule.

  • History in the same engine. Mutable streams for lookups and baselines, and replay through the same query, so a rule can be backtested before it pages anyone and a new indicator can be searched backward. That's Step 4, and the DDoS baselines.

  • Reliability & Recovery. State that survives restarts through checkpoints, because a detection that forgets everything when a node restarts is not a reliable detection.


Clint's five questions


Clint ends with five questions for any vendor selling in-stream detection. Real challenges. Here are my thoughts, including the limits.


  • Can I backtest a rule against historical data before deploying it, and how much history is available? Yes. Replay stored history through the same query before the rule goes live. Limit: Depth equals what you retain in the engine. Built-in tiering to object storage or federated queries to external data sources can extend it.

  • When new threat intelligence arrives, how do I search data the stream has already processed? Query retained history in the same engine and join the new indicators to past events. Limit: retention. Keep longer-retention, full-fidelity copies in object storage if you need more.

  • Can you show me a cross-source, time-windowed correlation running in the pipeline rather than a single-event match? Yes. The password-spray example above uses a window, a correlation join and an enrichment lookup.

  • When a rule becomes noisy, what is the tuning workflow and who carries the operational burden? Rules are queries. Version them as code, replay against history, adjust thresholds, redeploy. Limit: You carry it. This is detection engineering, not a case-management UI. 

  • Whose detection content runs here, where does the data route by default, and what happens if I change SIEMs? Yours. The rules are your queries, no destination is the default, and changing SIEMs means changing a destination, not rewriting rules.  


Where I'd draw the line


Clint splits the work like this: single-event tripwires and enrichment in the pipeline, correlation downstream on stored history. Cribl Detect takes the same hybrid approach: in-stream detections ("immediate signals pre-storage") run in the pipeline, and correlation detections run after storage in a lakehouse engine. Panther, now part of Databricks, makes a similar split: its streaming rules look at one event at a time with no joins, and its correlation rules run on a schedule over the data lake. I read both as workarounds for an engine that can't hold context. I'd move the line: the pipeline can correlate continuously, as long as it keeps state and history, and it can still send a full-fidelity copy downstream.


The cost of a hybrid is two or more stacks (or license charges), a lake on the critical path but slow, and rule logic that has to stay in sync across both. Correlation also waits until the data lands. With state, history and enrichment in the stream, correlation runs on live data, and the same query replays history.


None of this argues against storing security telemetry. Hunting, forensics and retroactive search need history. Streaming computation and historical analytics are complements. The pipeline doesn't replace the SIEM or the data lake. It's just the best place to run lookup, correlation and detection. Keep the original evidence, though: filtering or summarizing before storage must not weaken forensic or compliance requirements.


Maintaining streaming state has real costs. Plan for them:


  • State has a price. Windows, distinct counts and per-entity state use memory and storage, and they grow with cardinality. A six-hour window over 100,000 identities is not the same bill as a five-minute window over one IP. A 10-second hop over a six-hour window also puts every event in 2,160 overlapping windows, so the hop is the knob that trades latency for state. We have put a lot of work into keeping this state compact, but measure it against your own cardinality.

  • Logs or telemetry data are messy. Identity-provider logs arrive late, out of order and duplicated, and a success can arrive before the failures that preceded it. Event time, late-data limits, deduplication, state expiry and recovery all affect detection quality. 


Go Break It


Whoever the vendor is, ask four things about a rule: can it correlate across sources, across time, against the past, and with what you know? If any answer is no, the detection will be noisy wherever it runs, in the pipeline or in the SIEM. And measure it: test cost, latency and detection quality against your current architecture, not against my claims.


Ting Wang, Co-Founder and CEO, Timeplus



Further reading 


 
 
bottom of page