← Blog
2025-12-03
architecturerelayspython

Listening to Relays: How Big Ears Works

A deep dive into the lightweight event listener architecture. How we stay close to the base Nostr protocol while efficiently ingesting millions of events into BigQuery.

The Design Philosophy

Big Ears is a special kind of Nostr client. Not a relay, not a full node — a listener. It connects to public relays via WebSocket, subscribes to a broad filter covering all public kinds, and streams the JSON events straight into a pipeline.

Data Pipeline

Events are batched and written to BigQuery in near real time. The schema stays faithful to the raw Nostr event structure: id, pubkey, created_at, kind, tags, content, sig. No re-encoding. No lossy transforms.

Relay Etiquette

We believe relay etiquette is non-negotiable. Big Ears sends proper CLOSE messages after subscription windows, respects rate limits, and avoids hammering the same relay with overlapping filters.

This article is also published as a kind:30023 NIP-23 event on Nostr.