Naboria Ads — Technology Stack
A high-performance analytics and ad delivery pipeline built with Rust, Kafka, ClickHouse, and an ML layer powered by dbt and XGBoost.
Back to Stack OverviewEvent Tracking Pipeline
How page views, clicks, and ad events flow from client to ClickHouse.
Tracking & Storage Flow
Async Page tracking is fire-and-forget — the server responds immediately and processes the event in the background, keeping client latency minimal. Sync Ad tracking is synchronous — the server confirms the write before responding, ensuring impressions and clicks are reliably recorded.
Ad Delivery Flow
How ads are served from MongoDB to clients in real time.
Ad Serving — Server-Sent Events (SSE)
SSE (Server-Sent Events) A persistent one-way connection from the server to the browser. The web client connects once and receives personalised ads as they rotate every 30 seconds — no polling required. The mobile app fetches ads on launch and rotates them locally on a timer.
Analytics & ML Pipeline
How raw events become dashboards and trained models.
Analytics & ML Flow
Components
Every piece of the Naboria Ads stack and what it does.
Rust / Axum
A fast, reliable backend that handles all tracking requests and serves ads to clients.
Apache Kafka
A message queue that absorbs high volumes of events, ensuring no data is lost under load.
ClickHouse
A high-performance analytics database purpose-built for querying billions of events in real time.
MongoDB
A flexible document store for ad definitions, supporting banner and video ad formats.
Redis
Caches per-user ad scores and click history so the SSE stream can serve the most relevant ad without blocking the request path.
naboria-tracker.js
A lightweight JavaScript library that integrates into any web or mobile app with a single init() call.
dbt
Transforms raw events into clean, analytics-ready datasets using version-controlled SQL.
XGBoost + MLflow
Predictive models for ad click-through rate and booking conversion, with full experiment tracking.
Analytics UI
Real-time dashboards for views, clicks, ad performance, and user activity — refreshed automatically.
Dagster
Schedules the feature materialisation pipeline every 10 minutes, keeping the online feature store fresh for ML inference.
Caddy
Handles HTTPS termination with automatic Let's Encrypt certificate provisioning. Zero configuration for production TLS.
Prometheus + Grafana
Scrapes request rates, latency percentiles, and active SSE connections every 15 seconds. Pre-built dashboard included.