Analytics & usage
bytetourist records every request as an event and aggregates it for usage, billing, and dashboards — without slowing the proxy down.
The event pipeline
Section titled “The event pipeline”The hot path stays fast: core publishes a request-event to Kafka
asynchronously after each response, then returns to the caller. The scaler
consumes that topic and writes to ClickHouse. Kafka is the immutable
source of truth for billing; ClickHouse is the queryable materialised view.
core ──async──▶ Kafka (request-events) ──▶ scaler ──▶ ClickHouse ──▶ dashboards / rollupsWhat’s recorded per request
Section titled “What’s recorded per request”Each event carries: timestamp, org id, request id, node id and node IP, target
host, method, URL, status code, latency (measured at the node), bytes in/out,
region, country, ip_type, and any error. Events are retained for 90 days.
Usage & billing rollups
Section titled “Usage & billing rollups”A materialised view aggregates events per org per hour (client_usage_hourly),
which a periodic rollup turns into per-cycle usage for metered billing. Because
the raw event log is immutable, usage is auditable and re-computable.
What you can see
Section titled “What you can see”In the dashboard:
- Today — request count, success rate, data used, active keys.
- Usage vs. quota — requests and bytes spent against your plan, with remaining quota and % utilisation.
- Recent requests — a paginated, org-scoped log with status, latency, and target host.
- Trends — success/error-rate time series.
Fleet metrics
Section titled “Fleet metrics”Separately, the scaler exposes a metrics API (node health, in-flight counts)
that core polls every few seconds to drive lowest_latency routing and the
circuit breaker, and that the scaler itself uses to make
autoscaling decisions.