# Repository Briefing: Endgame-Labs/blowfish
> Source: https://repoforai.com/repo/Endgame-Labs/blowfish (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/Endgame-Labs/blowfish
- **Official Docs / Website**: https://open.endgame.io/blowfish
- **Category**: RAG, Data & Memory (知识库 / 爬虫 / 记忆层)
- **Primary Language**: Rust
- **License**: MIT
- **Engineering Health**: A (82/100 · Maintenance 35/35 · Adoption 7/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v0.1.131 (2026-12-04) — https://github.com/Endgame-Labs/blowfish/releases
- **Review Snapshot**: 2026-12-03 (Note: v0.1.131 on 2026-12-04 shipped after this review; verify latest release notes)
- **Deployment / Stack Signals**: Docker, Self-Hosted, API
- **Momentum**: 31 ★ total (+11 24h / +18 7d) · 2 forks
- **Topics**: `bm25`, `object-storage`, `rust`, `search`, `turbopuffer`, `vector-search`
- **When to Use**: Best for: Teams that want account-free turbopuffer development and CI or modest self-hosted RAG retrieval on a bucket they control, with a corpus they can re-ingest. Skip if: You need a mature managed deployment at scale, multiple active writers per namespace, tight cold-query latency over a distant bucket, or durable storage for data you cannot re-ingest.

## Overview
```text
### Architecture & Core Mechanics
blowfish packages a turbopuffer-compatible HTTP service in a single Rust binary from a Rust 2024 Cargo workspace. With an S3-compatible backend, the bucket is authoritative for the write-ahead log, immutable index segments, and manifest; there is no separate database or dedicated WAL disk. Namespace writes are group-committed through create-only conditional puts (`If-None-Match: *`) and epoch fencing. A write is acknowledged only after its WAL slot is durable. A startup probe checks that the storage backend supports conditional writes.

The background indexer compacts WAL records into columnar documents, IVF vector indexes with 1-bit RaBitQ codes and full-precision reranking vectors, chunked BM25 postings, and filter indexes. A namespace-wide cluster directory directs cold ANN reads; large reclustered namespaces use a paged slab directory and compact manifest reader copy to limit sequential round trips. Memory and local disk are caches, so `--read-only` replicas hold no authoritative state. Each namespace has one active writer: adding query replicas does not add write parallelism within that namespace.

### Key Capabilities & Differentiators
The API covers dense f32/f16 and int8 vectors, sparse vectors, exact kNN, ANN, and late-interaction multi-vector scoring. Late interaction scans document columns rather than taking the indexed ANN path. Hybrid retrieval combines single- or multi-field and prefix BM25 with vector results via `multi_query` and reciprocal rank fusion. Attribute filters, highlighting, aggregations, and paginated export support applications that need more than top-k IDs. The API also supports both strong and eventual consistency and namespace copy and branch operations.

Compatibility is demonstrated for a defined test surface: 121 recorded scenarios through the official Python SDK pass in normal and forced-indexing CI modes. Python and TypeScript retry checks exercise backpressure, and a TypeScript smoke test covers ANN, BM25, and async copy polling. This is useful evidence for switching endpoints, not a guarantee of parity for untested calls. On the measured 10M-vector in-region S3 workload with v0.1.14 and 48 probes, recall@10 was 0.953, with warm p50/p90 of 18.2/25.7 ms versus 626/924 ms from a fresh process. Test both paths when setting a latency budget.

### Trade-offs & Limitations
The object-store-first layout reduces the authoritative state on each node, but it puts bucket latency on the critical path for durable writes and some reads. Strong-consistency queries can still require a bucket round trip with warm caches. Even in-region, the measured 100M-vector cold query read about 160 MB, so cold-query frequency matters to both latency and storage request and transfer costs. The pre-1.0 format and ongoing failure testing make re-ingestion and rollback plans important; avoid making the bucket the only recoverable copy of irreplaceable data.

Against Qdrant, the choice can flip with memory. In the 2.68M-vector Linux VM test at roughly matched recall, blowfish v0.1.15 delivered 710 q/s at 2 GiB, versus 83–96 q/s for the two Qdrant disk configurations. At 8 GiB, Qdrant delivered 5,616–5,752 q/s versus 1,805 q/s for blowfish. Treat this as a workload-specific sizing result, not a general ranking. For large-scale managed production, turbopuffer preserves the API and offers the simplest migration path. Pinecone is also a managed alternative, but requires a separate integration evaluation.

### Hardware & Deployment Guide
For development, run `docker compose up --build --wait blowfish`. The default service binds to loopback on port 8000, mounts a Docker volume at `/data`, and leaves authentication off. The `s3` profile runs a SeaweedFS-backed test service on port 8001. Alternatively, use stable Rust and run `cargo run -p blowfish -- serve --storage-url file:///tmp/blowfish --listen 127.0.0.1:8000`. Before exposing a shared endpoint, configure `BLOWFISH_ADMIN_KEY` and `BLOWFISH_REQUIRE_AUTH`. For bucket-backed deployments, keep compute close to storage and size caches against your working set.

The container build targets x86_64 and arm64. A plain release build is available without PGO; the profile-guided build uses `llvm-tools-preview` and `scripts/pgo-build.sh`. Optional in-process `llama.cpp` GGUF embedding and reranking uses the `local-models` feature and requires `cmake`, `clang`, and `libclang`. Version v0.1.123 can replace v0.1.122 without a bucket-format change, but rolling back past v0.1.104 requires a pre-upgrade backup. A vector base built by v0.1.97 or later also makes that namespace's manifest unreadable by v0.1.96 and older. Pin versions and rehearse restores before upgrades.
```

## Key Capabilities
```text
- Durability: Writes are acknowledged after the object-store WAL slot is durable; create-only puts and epoch fencing protect the namespace writer boundary.
- Vector layout: IVF uses 1-bit RaBitQ codes for candidate selection and full-precision vectors for reranking.
- Hybrid retrieval: Multi-field and prefix BM25, ANN, attribute filters, and reciprocal rank fusion through multi_query.
- Compatibility coverage: 121 recorded Python SDK scenarios pass in CI in normal and forced-indexing modes, alongside retry checks.
- Read scaling: Read-only replicas use memory and disk caches without owning authoritative data; each namespace has one active writer.
- Rollback boundary: v0.1.123 is a binary swap from v0.1.122; rolling back past v0.1.104 requires a pre-upgrade backup.
```

## Quick Start / Clone
```bash
docker compose up --build --wait blowfish
curl --fail http://127.0.0.1:8000/
```
