DAU dashboard at 1M+ users for free
A HyperLogLog at precision 14 counts daily-active-users in 16 KB. Per region. Mergeable.
Each region writes into its own HLL on every page view. A daily aggregator merges them. The DAU dashboard reads a single number per day per region — no event-table scan, no Redshift bill, no Spark job.
sql
-- Per-region writer (1 line per page-view).
HLL ADD dau_us 'user:${user_id}';
-- Aggregator (runs at end of day, or on demand).
HLL MERGE dau_global FROM [dau_us, dau_eu, dau_apac];
-- Dashboard query.
SELECT
bucket,
HLL_CARDINALITY(sketch) AS dau
FROM mv_dau_daily
WHERE bucket > now() - INTERVAL '90 days'
ORDER BY bucket;