Twenty thousand event types. That was the count TellApart’s engineers gave when they introduced Taba, and they were careful to add that it covered only the real-time data. Every bid, impression, cache miss and queue length in a retargeting stack wanted to be counted somewhere, and the existing tools of the early 2010s either lagged by minutes or cost too much CPU inside the applications being measured. Taba was the company’s answer: a distributed event aggregation service, written in Python and later published on GitHub under the Apache 2.0 licence. The name comes from the Japanese word for a bundle or sheaf.
Kevin Ballard, the engineer who wrote the introduction, listed four goals. An event should be visible within seconds. The client library should cost the host application almost nothing. Events should survive long enough that monitoring could depend on them. And every tier should scale out by adding machines.
Event aggregation stores states, not events
The design choice that makes Taba worth studying is what it refused to keep. An event in Taba carried three things: the name of its “Tab” (the thing being tracked), a timestamp and a value. Those events flowed to a central server and were folded at once into State objects, and only the States were written to the database.
The engineers gave two reasons. Keeping every raw event would have consumed absurd amounts of space; they noted that the timestamps alone would have run to gigabytes per hour. And a State that is already summarised answers a query far faster than a pile of events that has to be scanned at read time.
At query time a State was reduced to a Projection, which is simply a dictionary of results, and several Projections could be merged into an Aggregate. A Handler could render either one in a form a human would read.
That pipeline (fold on write, project and merge on read) is exactly what a modern time-series system does when it keeps pre-aggregated rollups instead of raw points. It only works if the State is mergeable: a counter, a sum, a fixed-bucket histogram or a sketch such as HyperLogLog can be combined across clients and time windows without going back to the source. A median cannot. Anyone designing event aggregation today should start by asking which of their metrics are mergeable, because that answer decides the whole architecture.
Handlers keep the core ignorant
Each Tab had a type, and the type mapped to a Handler class. The core service did no arithmetic at all. It routed events, persisted States and served queries, while the Handlers owned the schema, the folding logic and the rendering. A counter Tab and a percentile Tab could live side by side, and adding a new kind of aggregation meant writing one class rather than touching the server.
That separation aged well. Prometheus, released publicly in 2015, made a similar split between metric types and the storage engine, though it chose a pull model where Taba pushed.
Client, agent, server: a three-hop pipeline
Applications embedded a Taba Client, which buffered events for a moment and posted them over HTTP to a Taba Agent, usually running on the same machine. The Agent gathered events from several clients, buffered them again and forwarded batches to the Taba Server using the same protocol.
The split was about keeping the client cheap. All the awkward work of retries, durability and batching moved into a separate process, so an ad server under load paid only for an in-memory append and an occasional local HTTP call. The Agent also cut the number of requests the Server had to absorb.
The Server itself followed the pattern TellApart used for its front-end ad servers: a Python service behind an Nginx reverse proxy, running on gevent for cooperative concurrency. It held no state of its own, so the team could run as many copies as they liked and let the Agents spread requests across them. A separate State was kept for every combination of Client and Tab, which meant a single misbehaving host could be inspected on its own.
For storage the engineers chose Redis, with a sharding layer of their own on top to get past the limits of a single Redis process. Shards were built on virtual buckets, the layer supported a subset of Redis data types plus transactions and locking, and the cluster could be re-sharded without downtime.
Here is a small side note. The virtual-bucket trick (hash keys into many more buckets than there are nodes, then move whole buckets) is the same idea Redis Cluster later shipped with its 16,384 hash slots.
The production numbers
At the time of the first write-up, each region ran a Taba cluster of two Server instances and one Database instance, each with eight processes. One cluster took in more than ten million events per minute from about 300 clients across 20,000 Tabs, with an average latency of around 30 seconds from event to query. TellApart used it for fine-grained monitoring, for real-time feedback loops in the systems that bid on retargeted ads and for internal dashboards.
Thirty seconds is not “within seconds”, and the engineers did not pretend otherwise. They went back to it: a later rewrite, described in Pushing Python, took the same service to ten million events per second at lower latency.
What a team would build today
You would not write Taba from scratch in 2026. The default stack is OpenTelemetry for instrumentation, a local collector in the role Taba’s Agent played, and Prometheus, VictoriaMetrics or a managed equivalent behind it. For high-cardinality business events rather than system metrics, Kafka feeding Flink or ClickHouse materialized views fills the same space, with pre-aggregation on ingest.
The ideas, though, transfer one for one. Keep the in-process client trivial. Put a local agent between the application and the network. Store mergeable state rather than raw events whenever the questions are known in advance. Keep the compute tier stateless and push all state into one hardened store. Every one of those choices shows up in the OpenTelemetry Collector’s documentation today, phrased differently.
What Taba lacked was a story for unknown questions. Once events are folded into a State, a question nobody anticipated cannot be answered from it. That trade is the same one discussed in the piece on Lambda Architecture and fast data, and it is why most teams now keep a cheap raw event log next to their rollups. The open question for any metrics pipeline is how long that raw log needs to live before the rollups alone are enough.
Questions readers ask
Why did Taba store States instead of raw events?
Two reasons were given. Keeping every raw event would have used absurd amounts of space, with the timestamps alone running to gigabytes per hour. And a State that is already summarised answers a query much faster than a pile of events scanned at read time. The trade-off is that a question nobody anticipated cannot be answered once events are folded, which is why many teams now keep a cheap raw log beside their rollups.
What does the name Taba mean?
Taba comes from the Japanese word for a bundle or sheaf, which suits a service that gathers many small events into compact summaries. It was a distributed event aggregation service written in Python and later published on GitHub under the Apache 2.0 licence. Kevin Ballard, who introduced it, set four goals: events visible within seconds, a nearly free client library, events durable enough for monitoring, and every tier able to scale out by adding machines.
How large was a Taba cluster in production?
At the time of the first write-up, each region ran two Server instances and one Database instance, each with eight processes. One cluster took in more than ten million events per minute from about 300 clients across 20,000 Tabs. Average latency from event to query was around 30 seconds, short of the within-seconds goal. A later rewrite pushed the same service to ten million events per second at lower latency.
Why did Taba shard Redis with virtual buckets?
A single Redis process has limits, so the engineers wrote their own sharding layer on top. Keys were hashed into many more virtual buckets than there were nodes, and rebalancing meant moving whole buckets, which let the cluster be re-sharded without downtime. The layer supported a subset of Redis data types along with transactions and locking. Redis Cluster later shipped the same idea with its 16,384 hash slots.