Hardening a ~3-billion-events/month client-side threat-detection pipeline on AWS
At the end of Feroot’s detection pipeline, Amazon OpenSearch Service is where ~3 billion browser events a month become the hourly aggregates its security customers query. VeUP’s engineering review hardened that tier: it diagnosed write-amplification from the pipeline’s update pattern as a primary cost driver and scoped the append-only, materialized-aggregate design that removes it while keeping near-real-time freshness.
The challenge
The pipeline’s consumers wrote aggregates into OpenSearch with frequent in-place updates during each document’s first hour of life — and in OpenSearch, an update is a delete plus a reindex. At this volume that pattern becomes write-amplification: the cluster doing multiples of the logically necessary work, with segment churn driving both cost and pressure on query performance. Meanwhile index growth without a lifecycle policy meant yesterday’s hot data aged on expensive storage. The tier had to keep serving sub-real-time security analytics — freshness is the product — while its unit economics were rebuilt.
The solution
VeUP scoped the target pattern around a simple principle: write once, aggregate deliberately, age out automatically. Events append immutably instead of updating in place; the customer-facing hourly aggregates become materialized views computed from the append-only stream, so the cluster’s write load tracks event volume rather than update churn. Index lifecycle management tiers indices as they age — hot for the query-heavy first window, then progressively cheaper storage and eventual deletion — aligned with the Firehose → Amazon S3 raw-event archive that guarantees any index can be rebuilt by replay. The de-skewed Kinesis distribution and edge throttling upstream shape the write traffic the cluster receives, and per-tier FinOps telemetry makes the OpenSearch cost curve a measured quantity. Success criteria: hourly rollups plus sub-60–90-second freshness on the live path, at a materially lower cost per ingested event.
Production outcomes
| KPI | Result |
|---|---|
| Analytics scale | OpenSearch serving as the aggregation and analytics tier for up to ~3 billion events/month of security telemetry — the query surface of a production compliance-detection product. |
| Cost driver diagnosed | First-hour in-place update churn identified as write-amplification at the cluster — a measured driver, mapped to the append-only + materialized-aggregate remediation rather than to bigger instances. |
| Lifecycle governance | Index lifecycle management scoped across the aggregate indices, with the S3 replay archive underwriting aggressive aging — storage cost aligned to query value at every index age. |
| Lessons & continuation | In OpenSearch, write patterns are the bill: append-only plus materialized aggregates does the same product work at a fraction of the cluster effort — and an upstream replay store is what makes lifecycle deletion and reindexing decisions reversible. |