Risk-free A/B testing of every system decision
KalDB can run a second setup for a dataset next to production, fed the same data from Kafka, so you can compare storage formats, partitioning, embeddings, and search plugins on real traffic before you commit.
KalDB lets you test a change to how data is stored, indexed, or searched against production data, without putting production at risk. A second setup reads the same data as the first, you compare the two on real searches, and then you promote the winner or drop the loser.
The problem
Most decisions in a search cluster are hard to undo. Shard count, partitioning, mappings, analyzers, storage formats, and embedding models are fixed when an index is created. Changing them means reindexing into a new index or building a new cluster, and you only find out whether the change helped after you’ve paid for it.
Testing first doesn’t help much. Staging clusters have different data and different queries, so their results don’t carry over. Testing in production risks slowing down or breaking search for everyone sharing the cluster. So teams make these decisions once, on intuition, and live with them for years.
How it works
KalDB is built from isolated, independently configured pieces. A dataset has its own Kafka partitions, the indexers that read them, the snapshots they write to S3, and the cache and query nodes that serve them. Kafka keeps the raw data, so more than one setup can read it.
- Production runs on setup A. Indexers read the dataset’s Kafka partitions, write snapshots to S3, and the query layer serves searches from them.
- Stand up setup B next to it. B gets its own indexers configured with the change you want to test. They read the same data from Kafka and write their own snapshots. A’s indexers, snapshots, and cache are untouched.
- Compare on real data. Searches are mirrored to both setups, so A and B are measured on the same data and the same queries. Compare latency, storage size, cost, and the quality of results.
- Promote B or drop it. If B wins, searches switch to B and A’s resources are released. If B loses, delete it. Nothing in production depended on it.
The same pattern works for any decision that changes how data is indexed or served, not just search settings:
- Storage formats, for example a new chunk layout or compression setting.
- Partitioning strategies, such as the number of partitions or how logs are routed to them.
- Embeddings, comparing embedding models on the same documents and queries.
- Search plugins, such as a new analyzer or ranking change.
Why it matters
- Decisions based on evidence. Every change is measured on your own data and queries before it reaches users.
- No risk to production. B runs in isolation. A and every other tenant keep their capacity and behavior while the test runs.
- Easy rollback. Until A is released, switching back is instant. Dropping B leaves nothing behind.
- Faster improvement. Changes that would otherwise need a migration project become an experiment you can run, read, and repeat.
Trade-offs
- B costs extra while it runs. It needs its own indexers and storage for the length of the test. Keep tests short or test on one dataset at a time.
- B only sees the data Kafka still has. It can index from the oldest offset Kafka retains. Longer comparisons need longer retention, or a test that runs long enough to build its own history. Building B from snapshots in S3 is on the roadmap (see below).
- Mirrored searches add query load. Each mirrored search runs twice. Mirror a sample of traffic if the dataset is busy.
Coming next
These are on the roadmap and build on the same mechanism.
- Dataset versioning. Every A/B test already produces a second, complete version of a dataset. Dataset versioning makes that a first-class feature: publish a new version of a dataset, compare it against the current one, switch searches to it all at once, and roll back by pointing back at the old version’s snapshots, which are still in S3. New versions will also be publishable from batch jobs through offline ingestion.
- Tests built from snapshotted data. Today B indexes from Kafka, so it only covers the data Kafka still retains. Where possible, B will be built from the snapshots already in S3 instead, so a test can cover months or years of history from day one, without longer Kafka retention and without loading the live ingest path.