VeUP
← All case studies
Amazon OpenSearch · OpenSearch aggregation tier
Feroot logo

Hardening a ~3-billion-events/month client-side threat-detection pipeline on AWS

AdvisoryTarget-state architecture design & costed POCCost-optimization deep diveStreaming ingest & data-lake designMarketplace listing launchManaged billing & resell
3 billion
browser-side telemetry events a month, at peak scale
Costed plan
every reliability and cost driver paired with a fix
Amazon OpenSearch ServiceAWS LambdaAmazon KinesisAmazon S3

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

KPIResult
Analytics scaleOpenSearch 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 diagnosedFirst-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 governanceIndex 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 & continuationIn 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.
AWS services in production
Amazon OpenSearch Service (analytics tier, ILM)AWS Lambda (consumers)Amazon Kinesis Data StreamsAmazon Kinesis Data FirehoseAmazon S3 (replay archive)Amazon API Gateway (edge)Amazon CloudWatch