Today, we're open-sourcing Kosha. Kosha is a search engine built on object storage: S3 is the source of truth, local NVMe is a cache, and compute nodes are disposable.
Search goes from clusters you babysit to a bucket you own.
An open-source alternative to turbopuffer. Apache 2.0, written in Rust.
https://t.co/IPJ0Sa7OCZ
@XP_Ehsaan@bot useful for agentic memory, rag and keyword/vector search engines
compatible with elastic DSL and so can replace elasticsearch cost by up to10x
Today, we're open-sourcing Kosha. Kosha is a search engine built on object storage: S3 is the source of truth, local NVMe is a cache, and compute nodes are disposable.
Search goes from clusters you babysit to a bucket you own.
An open-source alternative to turbopuffer. Apache 2.0, written in Rust.
https://t.co/IPJ0Sa7OCZ
we released v0.5.1 today
3 ingest optimizations we shipped in kosha today, all from one bulk backfill:
1. get slow work off the request path. a write that crossed the flush threshold built the segment and published the manifest itself, and every other write to that namespace waited behind it. publish was 5.2 s of a 6.1 s average write. now background workers flush and publish, and writes just return.
2. make the hot index small. to tell upserts from appends, each writer keeps a map of every document id. it cost ~300 bytes per id and was deep-copied on several write paths. interned segment ids, inline storage and a shared copy-on-write index bring it to ~77-91 bytes per id, 3.5-3.8x less, and cold starts now build incrementally instead of restarting.
3. give memory back. under sustained writes the ingest pod grew by roughly the size of everything it was sent and never shrank. the live heap was small, glibc was just holding freed pages. switching to jemalloc with background purging: 80 mb through ingest now leaves 2.8 mb allocated.
find us at: https://t.co/IPJ0Sa7OCZ
The takeaway: Amdahl's law in practice. Your speed is capped by the part that runs one at a time. On S3, the cost usually isn't storage, it's standing in line, so find the serial step and give it more lanes.
Kosha is open source (Apache-2.0, Rust). S3 is the source of truth, and NVMe is a cache.
https://t.co/2s72EX0pq9
1/6 We made Kosha's S3-backed ingest 9.56× faster on the exact same machine, with no extra hardware:
Throughput: 3,479 → 33,262 rows/s
p99 write latency: 3,879 ms → 104 ms (37× lower)
Today, we're open-sourcing Kosha. Kosha is a search engine built on object storage: S3 is the source of truth, local NVMe is a cache, and compute nodes are disposable.
Search goes from clusters you babysit to a bucket you own.
An open-source alternative to turbopuffer. Apache 2.0, written in Rust.
https://t.co/IPJ0Sa7OCZ
Optimization 3: shrinking the critical section, and striping.
Do the slow chores off to the side, and open more checkout lanes. We moved compression out of the commit lock, which gave 5.67× and a 35% smaller log. Then the big one: only one S3 upload could happen at a time. Striping the log across 8 lanes let uploads run in parallel. That gave 33,262 rows/s (9.56×), with p50 at 64 ms and p99 at 104 ms.
The takeaway: Amdahl's law in practice. Your speed is capped by the part that runs one at a time. On S3, the cost usually isn't storage, it's standing in line, so find the serial step and give it more lanes.
Kosha is open source (Apache-2.0, Rust). S3 is the source of truth, and NVMe is a cache.
https://t.co/2s72EX0pq9
Optimization 3: shrinking the critical section, and striping.
Do the slow chores off to the side, and open more checkout lanes. We moved compression out of the commit lock, which gave 5.67× and a 35% smaller log. Then the big one: only one S3 upload could happen at a time. Striping the log across 8 lanes let uploads run in parallel. That gave 33,262 rows/s (9.56×), with p50 at 64 ms and p99 at 104 ms.
@mishrashashan14@ravi_tandon@trydecoverai that's our bad there. only the GET calls go to NVMe. the PUT calls go to s3 directly.
so PUT will have the same costs
GET will have much lesser costs
we will soon push out the benchmark numbers for the same
kosha vs OpenSearch: no cluster to babysit. S3 is the source of truth, so there are no replicas to manage, no shard rebalancing, and no 3am disk-full pages. Lose a node and you just warm another cache, while keeping the queries you know: analyzers, per-field BM25, fuzzy, aggregations, highlighting.
kosha vs turbopuffer: same object-storage architecture, but Apache-2.0 and running in your own bucket and your own cloud account. No vendor lock-in and no data leaving your perimeter, and on the same queries we're within a few ms of their server time.
kosha vs LanceDB: Lance is a great file format and library; Kosha is a full search server on S3. Hybrid BM25 + vector with RRF, filtered kNN, Elasticsearch-style queries and aggregations, multi-tenant keys, and durable writes through an S3 WAL.
Today, we're open-sourcing Kosha. Kosha is a search engine built on object storage: S3 is the source of truth, local NVMe is a cache, and compute nodes are disposable.
Search goes from clusters you babysit to a bucket you own.
An open-source alternative to turbopuffer. Apache 2.0, written in Rust.
https://t.co/IPJ0Sa7OCZ
kosha vs. turbopuffer
turbopuffer is a fast, managed search service, but it has its own query api and its own client. if you already run elasticsearch, moving means rewriting every query, every client call and every dashboard that depends on them. your data also lives in their service, not in a bucket you control.
kosha speaks elasticsearch-style queries: bool, match and multi-field search, per-field bm25, fuzzy, prefix and glob filters, nested fields, aggregations (terms, metrics, histograms, percentiles), highlighting and geo distance. most of your existing query shapes carry over, so moving is a port, not a rewrite. it's not a byte-for-byte drop-in, so check the docs for the exact surface.
underneath it's the same s3-first design: s3 is the source of truth and nvme is just a cache, so there are no replicas to manage and losing a node means warming another cache. it's apache-2.0 and runs in your own bucket, with vector and hybrid search too.
link: https://t.co/IPJ0Sa7OCZ
Today, we're open-sourcing Kosha. Kosha is a search engine built on object storage: S3 is the source of truth, local NVMe is a cache, and compute nodes are disposable.
Search goes from clusters you babysit to a bucket you own.
An open-source alternative to turbopuffer. Apache 2.0, written in Rust.
https://t.co/IPJ0Sa7OCZ