Engineering

Introducing Kosha: A Disaggregated Alternative to OpenSearch

A search engine where S3 is the source of truth, local SSD is just a cache, and every node is disposable. Open source, written in Rust, Apache-2.0.

November 26, 2026
View on GitHub →

A search engine where S3 is the source of truth, local SSD is just a cache, and every node is disposable. Open source, written in Rust, Apache-2.0.

Your search cluster is paying rent on data nobody is reading

Picture a legal case that goes quiet for six months. No one opens it, no one searches it. Then one morning a deadline lands, and suddenly ten lawyers need to search every email, contract and deposition in it, right now.

On a traditional Elasticsearch or OpenSearch cluster, that dormant case was never really dormant. Its shards sat on expensive, replicated SSD volumes the whole time, holding heap and disk, provisioned for a peak that might come once a quarter. Multiply that by thousands of cases and you get the bill most search teams know too well.

At Decover, we build search for legal documents, and this pattern is our everyday reality: bursty, multi-tenant, mostly idle, occasionally urgent. Our search ran on OpenSearch, and it worked. But we kept fighting the same thing underneath every problem: compute and storage were welded together. Scaling queries meant moving data. Losing a node meant shard relocation. Every new tenant meant more index sprawl.

So we built something different. Today we’re introducing Kosha.

What Kosha is

Kosha is a storage-disaggregated search engine. In one sentence: S3 is the source of truth, local NVMe SSD is a transparent cache, and compute nodes are disposable.

The name comes from Sanskrit, where kosha means a treasury or storehouse. That’s the idea: your index lives safely in the vault (object storage), and nodes simply borrow what they need, when they need it.

Kosha does hybrid search out of the box: BM25 lexical search, kNN/ANN vector search, and Reciprocal Rank Fusion to blend the two. Around that core sit the features you’d expect from a production engine, including filters, aggregations, highlighting, cursor pagination, compaction, a Postgres-backed control plane and a pluggable rerank hook.

It was built to replace Elasticsearch/OpenSearch inside Decover, but it’s designed as a general-purpose, schema-driven service. Onboarding a new document type, tenant or embedding model is meant to be a config change, not a fork of the engine.

The goal was never “a faster Elasticsearch.” It was an index format and runtime that assume object storage is the only place data must survive, and that treat every machine in front of it as replaceable.

How it works

Kosha splits the job across three kinds of stateless nodes. Ingest nodes buffer writes in a write-ahead log, build immutable segment files and flush them to S3. Query nodes serve searches from a local SSD cache, reading through to S3 on a miss. Indexer nodes run compaction, merging small segments into bigger ones and publishing a new manifest. A small control plane in Postgres keeps the namespace registry and points at the current manifest for each index.

Because durable data only ever lives in S3, losing a node is not a data event. It’s a cache event. Start another process, let it warm up, and carry on.

Reading only what you need

Object storage is cheap but far away, so Kosha works hard to avoid fetching whole files. Segments load lazily, and a cold query issues ranged GETs for just the postings and document bytes it needs, typically in three sequential S3 round trips. Bloom filters let it skip segments that can’t match without reading them. A columnar filter index fetches only the columns a query actually names. When one pod is already fetching a cold segment, its peers stream the bytes from that pod instead of stampeding S3.

Search that holds up in production

Lexical search uses block-max WAND for fast top-k BM25, with phrase, wildcard and typo-tolerant fuzzy queries, multi-field boosts and configurable analyzers. Vector search uses an on-disk cluster-and-posting index with optional i8 quantization (about 4x smaller), filtered kNN that switches to exact scoring when few documents pass, multiple vector columns per namespace and ColBERT-style late interaction. Hybrid queries fuse the two with RRF, and you can send the top results to an external reranker such as Cohere.

Built for many tenants

Every API key is scoped to a tenant, and namespaces are cheap to create. You can branch a namespace copy-on-write in the same time for a million documents as for ten, shard large namespaces, and meter usage per tenant. Writers hold fenced leases, so a second writer started by mistake is refused rather than silently corrupting state. And searches default to read-your-writes consistency, so documents are visible immediately, even before they’re flushed.

Why this matters

Here is how the design changes day-to-day operations compared with a classic OpenSearch cluster.

OpenSearchKosha
Source of truthLocal disk per shard, replicatedS3, one durable copy
Idle tenantFull shard footprintA metadata row plus S3 bytes
Adding query capacityShard rebalancingAdd stateless query nodes
Losing a nodeShard relocationCache rewarm, no data risk

Kosha stands on the shoulders of systems like Quickwit, turbopuffer and table formats such as Iceberg and Delta Lake, which proved that manifests over immutable files in object storage can be fast. Kosha applies that pattern to hybrid lexical and vector retrieval.

How Kosha compares

We benchmarked Kosha against OpenSearch and turbopuffer on latency and modeled what each would cost to run the same workload. The short version: Kosha is roughly a quarter of OpenSearch’s cost and nearly 3x faster at the tail on full-text search, while turbopuffer still has the edge on raw latency.

Cost

Bar chart: modeled monthly cost for 10M documents with vectors at 8 queries per second. Kosha $607 (1 node, 16 vCPU), turbopuffer $785 (usage-based pricing), OpenSearch $2,314. Kosha is 74% less than OpenSearch and 23% less than turbopuffer.
Kosha release card · modeled monthly cost, AWS us-east-1 list prices

The gap comes straight from the architecture. OpenSearch pays for replicated SSD sized for peak, while Kosha keeps one durable copy in S3 and caches only what’s being searched. One caveat: our latency runs used a 32 vCPU node, and the 16 vCPU size in this model is derived from measured CPU and memory rather than benchmarked directly.

What it would cost us

Models are one thing, so we also priced Kosha against our own search bill. Kosha isn’t in production at Decover yet, so these are estimates from its design and AWS unit prices, set beside what we actually paid OpenSearch for the same 171 GB.

Range chart: estimated monthly hosting for Decover's 171 GB corpus. Kosha $300–600 (estimate), turbopuffer $200–580 (estimate), OpenSearch $2,612 (actual prior bill). Kosha is 77–89% less than the OpenSearch bill.
Decover internal estimate · monthly hosting for our 171 GB corpus; OpenSearch is our prior bill

Almost all of Kosha’s cost is compute: two i4i.xlarge query servers for high availability come to about $500 a month on-demand. Storing the index in S3 costs about $5, and S3 reads another $5–20. A mostly idle Spot ingest node and a small Postgres control plane add about $80. At our size, turbopuffer lands in the same range, and both are a fraction of what a replicated OpenSearch cluster costs.

Latency

Bar chart: full-text search p99 client time at 10M documents. Kosha 22.3 ms, OpenSearch 62.1 ms, 2.8x lower for Kosha. Different corpora: Kosha on msmarco 10M; OpenSearch (2x r8g.large) on a synthetic 10M corpus, August 2026.
Kosha release card · full-text search, p99 client time, 10M documents

The two runs used different 10M-document corpora, so read this as directional rather than a head-to-head on identical data.

Against turbopuffer, we’ll be straightforward: it’s still faster. On the same 1M msmarco documents, same queries and same region, turbopuffer’s p99 server time was 5 ms to Kosha’s 6.0 ms. On vector search at 10M, turbopuffer’s published p50 is 14 ms against Kosha’s 31.7 ms, though their figure uses 768-d f16 vectors and ours 1024-d f32 at recall@10 of 0.973. Closing that gap is high on our list.

All Kosha runs used 8 queries per second, top_k 10 and a warm cache on a 32 vCPU node.

Try it in five minutes

The fastest path is the local stack, which runs Kosha alongside MinIO as a stand-in for S3. Clone the repo, then:

# Start Kosha and local S3
docker compose up --build

# Install the CLI
cargo install --path crates/kosha-cli

# Point it at your local server
export KOSHA_HOST=http://localhost:8080
export KOSHA_API_KEY=sk-kosha-dev

# Index some sample docs and search them
kosha index -n quickstart-demo --file crates/kosha-cli/examples/docs.jsonl
kosha flush -n quickstart-demo
kosha search -n quickstart-demo "breach"

# Now try vector search
kosha index -n quickstart-demo --file crates/kosha-cli/examples/vectors.jsonl
kosha flush -n quickstart-demo
kosha search -n quickstart-demo --knn-field embedding --knn-vector '[0.85,0.15,0,0.05]'

Prefer a container on its own? docker pull ravidecoverai/kosha:latest gets you the server image.

For application code, there are clients in three languages. The Python client, pip install kosha-client, is OpenSearch-compatible: it translates the familiar Elasticsearch query DSL into Kosha’s native shape, which makes migrating an existing app much less painful. TypeScript (@decover/kosha) and Go SDKs, both in preview, speak the native /v1 API directly.

What’s next, and how to get involved

Kosha is young, and we’d rather be honest about the edges than oversell. HTTP/JSON is the only transport today, though gRPC is defined in the proto. Analyzers cover English stemming but not yet synonyms, n-grams or other languages. Fuzzy queries don’t use WAND pruning yet. And the 16 vCPU size in our cost model comes from measured CPU and memory but hasn’t been benchmarked on its own yet.

On the roadmap: a namespace-level centroid index for vector search, incremental ANN updates, broader analyzer support and gRPC.

If you run search on Elasticsearch or OpenSearch and you’ve ever winced at the bill for data nobody is reading, we’d love for you to kick the tires. Star the repo, try the quickstart, open an issue when something breaks, or send a pull request. The design doc walks through every decision in detail, and CONTRIBUTING.md covers the workflow.

Your data belongs in the vault. Your compute should be free to come and go.

Kosha is open source
Star the repo, run the quickstart, and tell us what breaks.
github.com/decover-tech/kosha →
About the Author
Ravi Tandon
Ravi Tandon
CEO & Co-founder, DecoverAI

Ravi is the co-founder and CEO of DecoverAI, an AI-native technology platform for legal intelligence. DecoverAI helps law firms and in-house teams turn large volumes of case material into searchable insights, chronologies, fact patterns, and draft work products. Ravi has over a decade of experience in software engineering and technology leadership, including prior roles at Spotnana and ThoughtSpot, selling to large enterprises including Walmart, Apple, Coca-Cola, Amazon, and Meta. He holds a master’s degree in computer science from Princeton University.

LinkedIn
Your data belongs in the vault

Kosha is open source under Apache-2.0. Try the five-minute quickstart, read the design doc, or send a pull request.

Book a demo
to learn more.
Book a Demo