An analytics pipeline has an awkward load profile: long quiet stretches punctuated by bursts when a customer's site is featured somewhere. Serverless suits that shape well, provided you respect where it stops being cheap.
Accept fast, process later
The ingest endpoint does almost nothing. It validates the payload, writes it to a durable queue and returns. That keeps the latency the customer's visitors experience low and independent of downstream health.
Everything expensive — enrichment, aggregation, rollups — happens in workers reading from the queue. When a burst arrives the queue absorbs it and the workers drain it. Nothing is dropped and nothing times out at the edge.
Batch aggressively
Per-event writes are the single fastest way to make a serverless pipeline expensive. Both invocation count and write throughput are billed, and per-event processing maximises each.
Batching events into windows before writing cut our costs by roughly an order of magnitude. The trade is a small ingestion delay, which for analytics is entirely acceptable — nobody makes a decision on a five-second-old page view.
- Batch by both size and time, whichever threshold trips first.
- Make writes idempotent so retries cannot double-count.
- Keep a dead letter queue and actually monitor it.
- Pre-compute the aggregates your dashboards read, rather than querying raw events.
Store columnar, query pre-computed
Analytics queries scan few columns across many rows, which is the case columnar storage is built for. Row-oriented stores make these queries slow and costly at the same time.
We also pre-compute the rollups the dashboard actually requests. Users are not querying raw events; they are asking a small, predictable set of questions, and those answers can be maintained incrementally as data arrives.
Where serverless stops making sense
Sustained, predictable high load is cheaper on reserved capacity. If your pipeline never goes quiet, the per-invocation premium is money spent for elasticity you are not using.
Cold starts also matter on any synchronous path. We keep them off the ingest route by keeping that function tiny and its dependencies minimal, and we tolerate them freely in the asynchronous workers where nobody is waiting.
Key takeaways
- Validate and enqueue at the edge; do the expensive work asynchronously.
- Batching cut pipeline cost by roughly 10x for a negligible delay.
- Columnar storage plus pre-computed rollups beats querying raw events.
- Reserved capacity wins when load is sustained and predictable.
Ready to make the switch?
Try Zero Delay Analytics free. No credit card required, and no cookie banner needed.
Get Started